Start Offset | Field | Length |
0 | Message type: MSG_TYPE_ACK | 1 |
1 | Client identification number | 1 |
2 | Number of messasges acknowledged. The value must not exceed MSG_MAX_ACK. | 1 |
3 | First acknowledged message ID | 2 |
5, 7, 9, ... | Additional acknowledged message IDs | 2 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_CONN_REQ | 1 |
1 | Broadcast receive capable flag ClientData::bcast | 1 |
2 | Random value for client identification clientRandId | 4 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_CONN_DENY | 1 |
1 | Random value for client identification clientRandId ClientData::randId | 4 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_CONN_ACCEPT | 1 |
1 | Message ID | 2 |
3 | Assigned client ID localPlayer | 1 |
4 | Random value for client identification ClientData::randId | 4 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_CONN_DISCONN | 1 |
1 | Message ID | 2 |
3 | Client ID | 1 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_OPTION | 1 |
1 | Message ID | 2 |
3 | Bit flags GameOptions::flags | 1 |
4 | The maximum game duration GameOptions::duration | 4 |
8 | Current red team score GameOptions::teamScore[TEAM_RED] | 2 |
10 | Current red team score GameOptions::teamScore[TEAM_BLUE] | 2 |
12 | Score needed to win GameOptions::winScore | 2 |
14 | Battle field width GameOptions::width | 2 |
16 | Battle field height GameOptions::height | 2 |
18 | Total number of messages describing all the game's options GameOptions::totalMsgs | 2 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_OBSTACLE | 1 |
1 | Message ID | 2 |
3 | Total number of game option messages. GameOptions::totalMsgs | 2 |
5 | The index of this game option message. | 2 |
7 | Total number of obstacles. | 2 |
9 | Index of the first obstacle in this message. This value must be evenly divisible by MAX_OBSTACLES_PER_MSG (62). | 2 |
11 + n * 8 | X coordinate of upper left corner Obstacle::loc | 2 |
13 + n * 8 | Y coordinate of upper left corner Obstacle::loc | 2 |
15 + n * 8 | Width Obstacle::loc | 2 |
17 + n * 8 | Height Obstacle::loc | 2 |
n is the index of the obstacle in the message starting at zero and increasing to one less than the total number of obstacles in the messgae.
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_SPAWN | 1 |
1 | Message ID | 2 |
3 | Total number of game option messages. GameOptions::totalMsgs | 2 |
5 | The index of this game option message. | 2 |
7 | Total number of spawn areas for the red team (TEAM_RED) | 1 |
8 | Total number of spawn areas for the blue team (TEAM_BLUE) | 1 |
9 | Index of the next spawn area in this message. The index is specific to the owning team.
| 1 |
10 | A field containing:
| 1 |
11 | X coordinate of the upper left corner | 2 |
13 | Y coordinate of the upper left corner | 2 |
15 | Width | 2 |
17 | Height | 2 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_GAME_START | 1 |
1 | Message ID | 2 |
3 | Common game time when the game will begin | 4 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_GAME_OVER | 1 |
1 | Message ID | 2 |
3 | Winning team ID, or -1 for a draw | 1 |
4 | Score of the red team | 2 |
6 | Score of the blue team | 2 |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_SCORE | 1 |
1 | Message ID | 2 |
3 | Number of player score updates | 1 |
4 | Score of the red team | 2 |
6 | Score of the blue team | 2 |
8 + 4 * n | ID of player scoring a kill | 1 |
9 + 4 * n | ID of player killed | 1 |
10 + 4 * n | New score for the player who got a kill | 2 |
This message should be sent with a low priority by using a longer resend time.
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_PLAYER_UPDATE | 1 |
1 | Message ID | 2 |
3 | Update time Player::lastUpdate for all players in the message | 4 |
7 | First player ID | 1 |
8 | Player flags Valid values defined in PLAYER_FLAGS
| 2 |
10 | Update data. The ordering is the same as the flags. See the player data portions for more detail. | Varies |
Start Offset | Field | Length |
0 | Message type: MSG_TYPE_PLAYER_SPAWN | 1 |
1 | Message ID | 2 |
3 | Player ID | 1 |
Start Offset | Field | Length |
0 | Client's ID | 1 |
1 | Client's time | 4 |
Start Offset | Field | Length |
0 | Client's ID | 1 |
1 | Client's time | 5 |
5 | Server's time | 4 |