8 Network Protocol
Sara edited this page 2025-10-09 21:58:21 +02:00

Layout

Server: The flatscreen player establishes a server by pressing a "host game" button.

Client: The VR player connects to the IP of the flatscreen player, and enters a 4-digit code shown on the screen of the flatscreen player.

Client->Server Messages

Connection commands

  • CONNECT,CODE: attempt to establish a connection, expects ACK or NAK response.
  • BEAT response to HEART command.

Gameplay Messages

  • PHOTO,CLUE_ID,DATA: Send a PHOTO clue to the server, including which CLUE_ID, and a 64bit encoded data block.
  • REVEAL,CLUE_ID: notify server to reveal a clue to the flatscreen player.

Server->Client Messages

Connection Messages

  • OK,MESSAGE...: acknowledge COMMAND command was valid and has been handled.
  • NOK,REASON,MESSAGE...: refuse to acknowledge CONNECT,CODE command, sends along an error code that explains why.
    • NOK,UNAUTHORIZED_REQUEST: No complete CONNECT,CODE->OK,CONNECT,CODE loop has been completed for this identity.
    • NOK,UNKNOWN_COMMAND: Message type invalid.
  • HEART: check connection activity, expects BEAT within 3s.

Gameplay Messages

  • BEGIN: Notify the client that the game has started.
  • CONCLUSION,METHOD,MOTIVE,MURDERER: Notify the client that the flatscreen player has selected a conclusion.