Multiplayer Server Client for Dani's Race
api.py | ||
client.py | ||
config.json | ||
handler.py | ||
LICENSE | ||
README.md | ||
server.py |
Dani's Race Multiplayer
The server / client stack for Dani's Race.
Methods
START GAME
Starts a new game on the server
Request
{"new_game":"Game"}
Response if the game isn't yet created:
{"new_game":"Game"}
Response if the game is already created:
{"new_game":"Game_2"}
LIST GAMES
Lists all games currently on the server
Request:
{"games":null}
Response:
{"games":["Game", "Game_2"]}
JOIN GAME
Join a game on a server.
Request:
{"join":"Game"}
Response if game is found:
{"join":"Game"}
LIST USERS
Lists all users on the server
Request:
{"players":null}
Response:
{"players":["Player_1", "Player_2"]}
GET USERNAME
Gets your current username
Request:
{"username":null}
Response if the name is not taken:
{"username":"BlenderDumbass"}
CHANGE USERNAME
Request:
{"username":"BlenderDumbass"}
Response if the name is not taken:
{"username":"BlenderDumbass"}
Response if the name is taken:
{"username":"BlenderDumbass_2"}
ALLOCATE IDS
Request from the server to give proper IDs that can be used for object's netIds in the game.
Request ( int for the number of IDs ):
{"ids":3}
Response ( list of the ids ):
{"ids":["hy4g","is8j", "5yg4"]}