-
Notifications
You must be signed in to change notification settings - Fork 7
Development: ServerFu
xmeadow edited this page Mar 13, 2026
·
1 revision
Notes by Aaron Bishop (Dunlar)
ServerFu describes the server-side network protocol for multiplayer. It covers shard discovery, joining a game, room handshakes, and heartbeating.
| Field | Type |
|---|---|
| executable_version | unsigned short |
| data_version | unsigned short |
| continent | unsigned char |
| direction | unsigned char |
| Field | Type |
|---|---|
| shard_valid_flags (32 bits, 26 used) | unsigned int |
| ip_address_of_whoever_requested | unsigned int |
| map_server_ip_address (per valid shard) | unsigned int |
(no payload)
| Field | Type |
|---|---|
| number_of_players | unsigned short |
| Field | Type |
|---|---|
| required_executable_version | unsigned short |
| required_data_version | unsigned short |
| Field | Type |
|---|---|
| executable_version | unsigned short |
| data_version | unsigned short |
| continent | unsigned char |
| direction | unsigned char |
| letter | unsigned char |
| number_of_players | unsigned char |
| password (optional, check packet size) | 20 bytes |
(only accepted from main_server or machines already in game)
| Field | Type |
|---|---|
| continent | unsigned char |
| direction | unsigned char |
| letter | unsigned char |
| password_okay (213 = okay) | unsigned char |
| ip_address_of_joiner | unsigned int |
| game_seed (only if sent to joining machine) | unsigned int |
| Field | Type |
|---|---|
| sun_time | unsigned int |
- Machine sends
REQUEST_JOINto server - Server checks password, sends
COMMAND_JOINto a machine already in game - That machine sends
COMMAND_JOINto the joiner (repeated) - Joiner rogers with
REPLY_ROGER, waits (abort if not received in 10s) - Machine sends
COMMAND_JOINto all others in game - Others roger; machine notifies main server
- Machine sends
REPLY_JOIN_OKAYto joiner - Joiner requests up to 16 IP lists (64 IPs per list)
- Joiner is now in the game
| Field | Type |
|---|---|
| list_portion (0=0–63, 1=64–127, etc.) | unsigned char |
| Field | Type |
|---|---|
| list_portion | unsigned char |
| Per machine (up to 64): room x/y/z, password_okay, ip_address | unsigned char ×3 + unsigned char + unsigned int |
| Field | Type |
|---|---|
| room x / y / z | unsigned char each |
| Field | Type |
|---|---|
| room x / y / z | unsigned char each |
(no payload)
| Field | Type |
|---|---|
| character number | unsigned short |
| lots of data... |
| Field | Type |
|---|---|
| particle number | unsigned short |
| lots of data... |
| Field | Type |
|---|---|
| time orders should run | unsigned int |
| 16-bit flags for which players have orders | unsigned short |
| actual order per player (2–6 bytes each) | variable |
| Field | Type |
|---|---|
| main_game_frame (frame client begins operation) | unsigned int |
- Client sends
REQUEST_ROOM_JOINto all machines in nearby area - Hosting machine backs up character data, sends
REPLY_ROOM_JOIN - Client sends
REQUEST_ALL_ROOM_DATA(must be received within 3s or server stops handling) - Room server sends one packet per frame per character/particle
- Client rogers each; server resends unacknowledged (up to 10 times)
- Timeout: 3s server-side, 6s client-side
| Field | Type |
|---|---|
| continent | unsigned char |
| direction | unsigned char |
| letter | unsigned char |
| ip_address | unsigned int |
| minutes_in_game (only if ip=0.0.0.0, sent to main server) | unsigned short |
(no payload) — machines heartbeat the IP directly above them (wraps at end) every ~1 minute. Failure for 3 minutes = reported as down by the machine above.
| Field | Type |
|---|---|
| room x / y / z | unsigned char each |