@@ -35,28 +35,28 @@ This is the coitus protocol that handles the communication between the game and
35
35
Controller -> Game
36
36
------------------
37
37
38
- ### /controller/new/< port >
38
+ ### /controller/new/& lt ; port& gt ;
39
39
40
- Connect a new controller to the game. Game will answer with /uid/< uid > . This is also known as 'anpymln'.
40
+ Connect a new controller to the game. Game will answer with /uid/& lt ; uid& gt ; . This is also known as 'anpymln'.
41
41
42
- ### /controller/< uid > /ping/< port >
42
+ ### /controller/& lt ; uid& gt ; /ping/& lt ; port& gt ;
43
43
44
44
Tell the game that the controller is still in use and update it's address and port. Use this once a minute or the
45
45
controller will get deleted.
46
46
47
- ### /controller/< uid > /kthxbye
47
+ ### /controller/& lt ; uid& gt ; /kthxbye
48
48
49
49
Disconnect the controller properly. In theory you could just wait 60s but this is the cleaner way and most games would
50
50
be very happy if you use this.
51
51
52
- ###/controller/< uid > /states/< states >
52
+ ###/controller/& lt ; uid& gt ; /states/& lt ; states& gt ;
53
53
54
54
Send the states of your controller keys. Always send all 14 states, even if your controller doesn't have 14 buttons.
55
55
The states should be an array with 0 for key not pressed and 1 for key pressed. So if you're pressing the Up button and
56
56
X the states array should look like this: 10000010000000
57
57
You can lookup all possible buttons and there location in the array in pymlgame/locals.py.
58
58
59
- ### /controller/< uid > /text/< text >
59
+ ### /controller/& lt ; uid& gt ; /text/& lt ; text& gt ;
60
60
61
61
* Optional*
62
62
@@ -67,24 +67,24 @@ without this function but you can use it if your controller is capable of text i
67
67
Game -> Controller
68
68
------------------
69
69
70
- ### /uid/< uid >
70
+ ### /uid/& lt ; uid& gt ;
71
71
72
72
Tell the controller its uid. This is ideally an integer.
73
73
74
- ### /rumble/< duration >
74
+ ### /rumble/& lt ; duration& gt ;
75
75
76
76
* Optional*
77
77
78
78
Tell the controller to rumble. Duration should be given in milliseconds. Not all controllers have the ability to rumble.
79
79
Maybe they do it in an optical way.
80
80
81
- ### /message/< text >
81
+ ### /message/& lt ; text& gt ;
82
82
83
83
* Optional*
84
84
85
85
Send some text to the controller. Be aware that not all controllers can display text, so don't send important things.
86
86
87
- ### /download/< url >
87
+ ### /download/& lt ; url& gt ;
88
88
89
89
* Optional*
90
90
@@ -93,7 +93,7 @@ file so that the player can hear some ingame sounds. Use this function everytime
93
93
could have deleted the files after playing. Controllers should ensure that files already downloaded gets downloaded
94
94
again to reduce loading times for games that have been played before.
95
95
96
- ### /play/< file >
96
+ ### /play/& lt ; file& gt ;
97
97
98
98
* Optional*
99
99
0 commit comments