Netgame - Packets

Overview

Overview These are all of the packet types used in netgame.
Packet: 'cdat' description: 'client data' direction: client to server - 1 byte (player) - 4 bytes (client frame_num of control change) - 1 byte (comp move of control change)
Packet: 'sdat' description: 'server data sent from server to client header: ----------------------------- - 4 bytes (server frame_num) - 4 bytes (game_moves start entry) - 1 byte (number of entries) and then one or more entries: ----------------------------- - 4 bytes (game_moves[x][0]); // frame_num - 1 byte (game_moves[x][1]); // type - 1 byte (game_moves[x][2]); // data 1 - 1 byte (game_moves[x][3]); // data 2
Packet: 'sdak' description: 'sdat acknowledge' direction: client to server - 1 byte (player) - 4 bytes (client frame_num) - 4 bytes (game_moves new entry position) - 4 bytes (chdf late count) - 4 bytes (frames skipped count)
Packet: 'serr' description: 'server error' direction: server to client - 1 byte (error type) - 4 bytes (server frame_num) - 4 bytes (server c sync) - 4 bytes (server c sync errors)
Packet: 'stdf' description: 'state dif' direction: server to client - 4 bytes (source frame_num) - 4 bytes (destination frame_num) - 1 byte (packet sequence num) - 1 byte (packet sequence total) - 4 bytes (data start byte) - 4 bytes (data size)
Packet: 'stak' description: 'state dif acknowledge' direction: client to server - 1 byte (player) - 1 byte (diff corr) - 4 bytes (client frame_num)
Packet: 'CJON' description: 'client join' direction: client to server - 1 byte (requested color) - 16 bytes (client hostname)
Packet: 'SJON' description: 'server join' direction: server to client - 2 bytes (play level) - 4 bytes (server frame_num) - 4 bytes (server game_move entry position) - 1 byte (frame speed) - 1 byte (player number) - 1 byte (player color) - 1 byte (deathmatch_pbullets) - 1 byte (deathmatch_pbullets_damage) - 1 byte (suicide_pbullets)