-
Notifications
You must be signed in to change notification settings - Fork 0
WebSocket Messages
tesserahub edited this page Mar 12, 2013
·
1 revision
Quickgame uses JSON data passed through websockets to communicate between the client and server.
Each message is a JSON object of the form {"kind": [KIND], "data": [DATA]}
.
Below lists all currently supported message types, in the form [KIND]: [DATA]
- members: {players, others}. A list of players (in order) and a list of other members.
- gamestate: Object encoding of the game state (specific to each game)
- message: String message from server
- update: No data. Sent by the client in order to force the server to send data to the client.
- changerole: Number specifying the role to take. Sent by the client to request a change of player role.
- changename: String specifying the name to take. Sent by the client to request a change in name (multiple people in the room can have the same name).
- move: Object encoding of a single move (specific to each game). Sent by the client to request a move.
- start: No data. Request the game be started or resumed.
- stop: No data. Request that the game be stopped so a new one can begin.
- chat: String chat message from the client.