Client-Server Communication Protocol

Table of Contents
Game startup
Player interaction
Game flow

The Kamikaze server and client communicate via messages encoded in raw binary format for performance reasons. Most messages consist of a major opcode, a minor opcode and the payload of the message.

Interactions are presented here categorically. For a complete reference of client-server interactions, please see the appendix.


Game startup

The first player, called game host, selects a map and a set of rules for the game. It gets notified about the number of player by the server first: OP_MAP The map and the final number of participants (which may range from 1 to the number received from the server) is then sent to the server via a similar OP_MAP message. A rule set might not be sent at all (in which case the default rules are used), unless the OP_RULES message is sent by the client.

Once a game starts, the server builds the map and sends it back to all participating players with the OP_MAP command. The same applies for the game rules which are sent via the OP_RULES message.