32 lines
805 B
Markdown
32 lines
805 B
Markdown
# game protocol
|
|
|
|
This is the definition for all of the messages to be sent between client and server to do all the actions.
|
|
|
|
* Action
|
|
- login
|
|
- logs the user in
|
|
- broadcast to all other clients that user logged in
|
|
- schema
|
|
- username: string
|
|
- appearance: string
|
|
- x_pos: float
|
|
- y_pos: float
|
|
- logout
|
|
- logs the user out
|
|
- broadcast to all other connected clients that user has logged out
|
|
- schema
|
|
- username: string
|
|
- move
|
|
- send to server
|
|
- server sends movement to all connected clients for that user
|
|
- schema
|
|
- username: string
|
|
- x_pos: float
|
|
- y_pos: float
|
|
- chat
|
|
- send message to server
|
|
- chat broadcast to all other connected clients
|
|
- schema
|
|
- username: string
|
|
- message: string
|