Lobby Protocol
The client-to-server LOBBY packet has game packet ID 11 and a variable-byte payload. Its request opcode and field layouts are not specified. The related server-to-client LOBBY_REPLY packet has ID 10 and a variable-byte payload that begins with a one-byte opcode. The sections below describe fields after that opcode where their layouts are known.
Packet IDs are direction-specific: client-to-server ID 10 is LOBBY_LEAVE, while server-to-client ID 10 is LOBBY_REPLY. The other lobby actions, including join, leave, chat, and quick chat, use separate game packet IDs. See Game Protocol for shared framing and cipher details.
Reply opcode index
The operation names and IDs are known for all entries. A field layout is available only for the entries whose details are given below; the other payloads are left unspecified rather than guessed.
Reply packet layouts
Opcode 0: Return to room list
Returns the client from the current room view to the room list.
No bytes follow the Opcode.
Opcode 1: Kicked from room
Notifies the client that the player was removed from the room and displays the kicked message.
No bytes follow the Opcode.
Opcode 2: Switch to rated-game setup
Switches the client to the rated-game room setup view.
No bytes follow the Opcode.
Opcode 3: Switch to matchmaking
Switches the client to the matchmaking view.
The payload contains six bytes after the Opcode:
| Order | Field | Encoding |
|---|---|---|
| 1 | Settings value | 4 zero bytes |
| 2 | Boolean value | 1 byte; false (0) |
| 3 | Boolean value | 1 byte; true (1) |
The meanings of these values are unspecified.
Opcode 4: Join room
Opens the room view and provides the room record.
A room record follows the Opcode. Its field layout is unspecified.
Opcode 5: Update lobby player
Adds or refreshes a player's information in the lobby player list.
Fields are serialized in this order:
| Order | Field | Encoding |
|---|---|---|
| 1 | Player ID | 8-byte integer |
| 2 | Normalized display name | JStr |
| 3 | Previous display name | JStr; present in the lobby-player form |
| 4 | Display name | JStr |
| 5 | Additional value | 4 bytes; present in the lobby-player form, meaning unspecified |
| 6 | Rating | 2-byte integer |
| 7 | Additional value | Variable-length integer; meaning unspecified |
| 8 | Staff level | 1 byte |
| 9 | Available-game-options mask | 1 byte |
In the non-lobby form, the previous display name and 4-byte value are omitted.
Opcode 6: Remove lobby player
Removes a player from the lobby player list, optionally showing a tooltip reason.
| Order | Field | Encoding |
|---|---|---|
| 1 | Player ID | 8-byte integer |
| 2 | Tooltip code | 1 byte; see Remove-player tooltip codes |
Opcode 7: Clear lobby players
Removes all entries from the lobby player list.
No bytes follow the Opcode.
Opcode 8: Update room
Adds or refreshes a room in the room list.
A room-list record follows the Opcode. Its field layout is unspecified.
Opcode 9: Remove room
Removes a room from the room list, optionally associating a tooltip with it.
| Order | Field | Encoding |
|---|---|---|
| 1 | Room ID | 2-byte integer |
| 2 | Tooltip code | 1 byte; room-tooltip meanings are unspecified |
Opcode 10: Clear rooms
Removes all entries from the room list.
No bytes follow the Opcode.
Opcode 11: Invitation to room
Notifies the player that they have been invited to the identified room.
| Order | Field | Encoding |
|---|---|---|
| 1 | Room ID | 2-byte integer |
Opcode 12: Join-room request
Identifies the room associated with a join-room request.
| Order | Field | Encoding |
|---|---|---|
| 1 | Room ID | 2-byte integer |
Opcode 13: Room tooltip
Associates a tooltip with the identified room.
| Order | Field | Encoding |
|---|---|---|
| 1 | Room ID | 2-byte integer |
| 2 | Tooltip code | 1 byte; room-tooltip meanings are unspecified |
Opcode 14: Player invitation
Identifies a player invitation to be shown to the client.
| Order | Field | Encoding |
|---|---|---|
| 1 | Player ID | 8-byte integer |
Opcode 15: Remove player invitation
Removes a player's invitation, optionally showing a tooltip reason.
| Order | Field | Encoding |
|---|---|---|
| 1 | Player ID | 8-byte integer |
| 2 | Tooltip code | 1 byte; see Remove-player tooltip codes |
Opcode 16: Player join request
Identifies a player's request to join a room.
| Order | Field | Encoding |
|---|---|---|
| 1 | Player ID | 8-byte integer |
Opcode 17: Remove player join request
Removes a player's join request, optionally showing a tooltip reason.
| Order | Field | Encoding |
|---|---|---|
| 1 | Player ID | 8-byte integer |
| 2 | Tooltip code | 1 byte; see Remove-player tooltip codes |
Opcode 18: Player joins room
Announces that a player has joined the room and supplies their non-lobby player record.
The payload contains a player record in the non-lobby form described for Opcode 5. That form omits the previous display name and the 4-byte value.
Opcode 19: Player leaves room
Announces that a player has left the room, optionally showing a tooltip reason.
| Order | Field | Encoding |
|---|---|---|
| 1 | Player ID | 8-byte integer |
| 2 | Tooltip code | 1 byte; see Remove-player tooltip codes |
Opcode 20: Current-room update
Refreshes the room record for the room the player is currently viewing.
A current-room record follows the Opcode. Its field layout is unspecified.
Opcode 21: Current-settings change
Reports a current-room settings change and the remaining start-button lock time.
| Order | Field | Encoding |
|---|---|---|
| 1 | Start-button lock time | 2-byte integer, in milliseconds; 0 unlocks the button |
Opcode 22: Self information
Provides the client's own rating and available-game-options value.
| Order | Field | Encoding |
|---|---|---|
| 1 | Rating | 2-byte integer |
| 2 | Available-game-options value | Variable-length integer; 0 |
Opcode 23: Self ID
Provides the client's own player ID.
The payload contains the player ID as an 8-byte integer.
Multi-byte values are big-endian. The variable-length integer encodes seven data bits per byte, most-significant group first; the high bit is set on each continuation byte and clear on the final byte. JStr is a zero-terminated, single-byte string.
Remove-player tooltip codes
| Code | Meaning |
|---|---|
0 |
No tooltip |
1 |
Entered a game |
2 |
Joined your game |
3 |
Entered another game |
4 |
Left the lobby |
6 |
Lost connection or could not join because the game is full |
7 |
Could not join because the game had started |
8 |
Declined an invitation |
11 |
Withdrew a join request |
12 |
Removed |
13 |
Dropped out |