From 53d01f80dfeafc2e4e52f1ef3c6c38be94dd87a5 Mon Sep 17 00:00:00 2001 From: Ricardo Band Date: Mon, 23 Jun 2014 22:50:00 +0200 Subject: [PATCH] fixed markdown --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7d70d10..d8ba4fb 100644 --- a/README.md +++ b/README.md @@ -33,28 +33,28 @@ This is the coitus protocol that handles the communication between the game and Controller -> Game ------------------ -### /controller/new/ +### /controller/new/<port> -Connect a new controller to the game. Game will answer with /uid/. This is also known as 'anpymln'. +Connect a new controller to the game. Game will answer with /uid/<uid>. This is also known as 'anpymln'. -### /controller//ping/ +### /controller/<uid>/ping/<port> Tell the game that the controller is still in use and update it's address and port. Use this once a minute or the controller will get deleted. -### /controller//kthxbye +### /controller/<uid>/kthxbye Disconnect the controller properly. In theory you could just wait 60s but this is the cleaner way and most games would be very happy if you use this. -###/controller//states/ +###/controller/<uid>/states/<states> Send the states of your controller keys. Always send all 14 states, even if your controller doesn't have 14 buttons. 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 X the states array should look like this: 10000010000000 You can lookup all possible buttons and there location in the array in pymlgame/locals.py. -### /controller//text/ +### /controller/<uid>/text/<text> *Optional* @@ -65,24 +65,24 @@ without this function but you can use it if your controller is capable of text i Game -> Controller ------------------ -### /uid/ +### /uid/<uid> Tell the controller its uid. This is ideally an integer. -### /rumble/ +### /rumble/<duration> *Optional* Tell the controller to rumble. Duration should be given in milliseconds. Not all controllers have the ability to rumble. Maybe they do it in an optical way. -### /message/ +### /message/<text> *Optional* Send some text to the controller. Be aware that not all controllers can display text, so don't send important things. -### /download/ +### /download/<url> *Optional* @@ -91,7 +91,7 @@ file so that the player can hear some ingame sounds. Use this function everytime could have deleted the files after playing. Controllers should ensure that files already downloaded gets downloaded again to reduce loading times for games that have been played before. -### /play/ +### /play/<file> *Optional*