Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
Omar Saad edited this page Feb 26, 2019 · 3 revisions

Bender's Roborally game wiki

Currently there is no working prototype.

Server-Client structure specification

Server handles all the logic in a game

Server acts like a master while clients act like slaves. This has a few implications:

  • Inventory and player-state etc. should all be handled by the server. Client requests to view it.
  • Changes to the game-state should be broadcast and the players should update their own game instance to stay up-to-date.
  • To execute an action, the client tells the server what it wants to do, and the server does it for the client if it's allowed. Then the change is broadcast.

Game rooms

Server will handle creation and joining of rooms. The game logic should be implemented in the GameRoom class.

  • Clients can create or join rooms by signaling their intention to the server.

API Documentation: Communication happens through websocket rawtext channel. The format for the commands are as such: <COMMAND> [json-data]

Supported client commands:

CREATEROOM

creates a room and automatically joins it.

takes no data

JOINROOM

Joins an existing room by a roomId

Data:

property Type
roomId String