[Update 09.12.2002: see below]

This is the Kamikaze protocol.
It is not stable yet, so don't rely on it.

Handshake:
----------

Server: SND_TABLE
		(int tablewidth, int tableheight, int** tablecontent)
		SND_PLAYERS
		(int numplayers, int* playertypes, int *positions, char** playernames)
		SND_ITEMS
		(int itemnumber, int *itemtypes)
		REQ_READY

Client: RSP_READY

Game action:
------------

Server: SND_ACTION
		(int actionid, int op, int x, int y)

Client: SND_ACTION
		(int actionid, int op, int x, int y)

End:
----

Server: SND_GAMEOVER

))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

The game can use either TCP or UDP, because TCP should be fast enough.
It is designed to avoid any responses during the game, always leaving the
client in an unstable state. It's the client's responsability to keep all
necessary information.

))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

Action IDs:

action_bomb_placed: op = 0				A bomb has been placed at (x, y)
action bomb_exploded: op = 0			The bomb has exploded
action_player_move: op = player_id		The player with the given id has moved
action_player_damage: op = player_id	This player has lost a life
action_item_erase: op = 0				The item at (x, y) has been erased
action_ground_damage: op = 0			This tile has been damaged by a bomb

Items:

item_bomb		A bomb, either active or non-active
item_life		Gives you an extra life

=============================
Update 09.12.2002
=============================

Startup
-------
When launched via GGZ, the game is in [state_launched].
Kamikaze lets the first player select a map (entering [state_map])
and the number of bots (which is the number of pre-selected GGZ bots at a
maximum).
After the selection, the game enters [state_waiting], until all players have
joined and no open seats are left, which can happen right after the selection
finished.
Then the game enters [state_playing].

Robustness
----------
When the client receives an unknown opcode, it will stop all communication.
If such an incident happens server-side, the game keeps running but the
offending player is cut off.
If the game host exits during map selection, this privilege is given to the
next player.
If any other player exits before the game start, nothing special happens, he
might be replaced with a bot.
Likewise, leaving and joining is possible during the game.

Game
----
All movement actions are sent to the server and broadcasted from there.
However, for performance reasons, moves are executed immediately to guarantee a
smoother gameplay.


