The match
How a match runs once play has begun, apart from the field: its clock, holds, its end, and players leaving and coming back.
The clock
A server states how long the match has run with ClockSync, and a client
answers on the clock channel with ClockReply. Time says how the
match clock is kept, and which clock each time on the wire is measured
against.
GameSpeed sets how fast the match runs. StatTick hands every unit a span of
seconds.
In 4.1–4.19
A client shows the speed
GameSpeedsets over its champion. A client changes nothing it shows forStatTick.
In 4.1–4.19
Sent during a hold,
GameSpeedtakes effect as the match resumes.
StatTick asks every unit’s stats to advance by that span.
Holding and resuming
A client asks to hold the match with Pause, and to resume it with Resume. A
server MUST attribute each to the connection it arrived on (see Objects and
identifiers).
In 4.18–4.19
A client puts 0 in the client id of
PauseandResume, the same id as the first seat’s, so a server takes no seat from that field.
A server holds the match with Paused.
Paused carries how long the hold can last, in seconds.
In 4.1–4.19
A client begins a hold only where the time
Pausedcarries is above zero and the match is not already held.
In 4.1–4.19
A client shows a tournament’s hold, crediting the seat that asked, where the message says it is one.
A server ends the hold with Resumed.
Resumed ends the hold either at once or after a countdown the client shows,
during which the match stays held.
A client announces in chat who resumed the match.
Input stays locked during the countdown.
The end
A server ends the match with GameEnded, saying which side won, and takes the
interface down with HudDisabled. A client shows the win or loss for its
player’s side and sends ClientFinished.
In 4.1–4.19
A client that receives
GameEndedwhile still loading leaves at once.
A client sends ClientFinished once, and not while playing a replay.
VictoryDance sets units moving as winners or losers do. It ends nothing.
VictoryDance moves every unit.
Leaving and coming back
A client leaving as one abandoning the match sends Exit: as its player quits
or closes the window, as a reconnection fails, or on a server’s Shutdown,
which has it leave at once. A client also leaves at once on BotKick with the
action that means leave.
In 4.1–4.17
The action of
BotKickthat means leave is 4.
In 4.18–4.20
The action of
BotKickthat means leave is 5.
A server tells the others that a player’s client dropped with
PlayerDisconnected.
In 4.1–4.19
A client shows a notice in chat for
PlayerDisconnected.
SoftReconnect rebuilds a client’s world without a new connection, as
Objects and identifiers describes.
A client started again for a match in progress knows nothing of it, and joins
as at the start: a server takes it through Joining a match
from registering to StartGame, with a spawn run that states the field as it
stands, and a ClockSync.
A client the server drops with the reason that means its player was away shows that, and does not connect again.
A server MUST NOT send SpawnStart to a client coming back from a drop: it
returns the client to spawning, from which only another StartGame brings it
back into play.
In 4.1–4.19
Reconnectedannounces that another player came back. A client shows it for an ally, or for anyone while it watches the match, and only notes it where it names its own client.
A client dropped during play connects again by itself, registers again, and
sends ReconnectedInMatch right after the registration answer; one dropped
while loading leaves instead.
A client dropped during play connects again to the same address and port, and
shows its player that it is reconnecting until it is back. It goes on where it
was: it asks for no status and no version, loads nothing, and keeps every
seat, name and identifier it held. A server answers with SoftReconnect,
sending between its two stages a message creating each unit the client is to
hold.
Staying connected
In 4.1–4.19
A client’s view report,
Camera, goes out as its view moves at least 200 units, at most every tenth of a second, and never while its view is locked.
Once loading is done, a client gives up on a connection where a reliable message it sent goes unacknowledged for 15 seconds.
In 4.1–4.19
Before loading is done, a client waits 60 seconds for an acknowledgement rather than 15.
Where it has heard nothing for 5 seconds in play, a client shows its player that it is trying to reconnect, and clears the notice as soon as anything arrives.
In 4.1–4.19
In play a client sends nothing on its own to show it is still there: what it sends answers what it is sent (
ClockReply,TransientAck,WaypointAck) or follows from its player, andCameragoes out only as its view moves.
Messages
Each message of this system in this book, with each layout it has across the book’s patches and every note its definition carries. A layout is the message’s body, after the header its channel’s family puts in front (see Messages).
ClockSync
What a server sends to set a client’s idea of how long the match has run. The header names no object: a server writes zero.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 192 |
| 4.11–4.20 | 193 |
| Field | Type | What it is |
|---|---|---|
| elapsed | f32 | How long the match has run, in seconds. |
Vectors (5)
another-on-4-10, one-on-4-10, one-on-4-17, another-on-4-20, one-on-4-20
ClockReply
What a client sends back when a server states the match clock, carrying both readings so the server can tell how far apart they are. The header names no object: it carries zero.
In every range of this book
Command 8 on clock, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| serverSaid | f32 | What the server last said the clock stood at, in seconds. |
| clientSaid | f32 | What the client’s own clock stood at when that statement arrived, in seconds. |
Vectors (3)
GameSpeed
What a server sends to set how fast the game’s clock runs. A client shows the new speed over its champion. The header carries zero.
In every range of this book
Command 18 on events, sent by the server, reliable.
Sent while paused, it takes effect on resuming.
| Field | Type | What it is |
|---|---|---|
| speed | f32 | How fast, 1 being normal. A client keeps it between 0 and 10. |
Vectors (2)
Resumed
What a server sends to take the match off hold. The header names a champion: that of the player who resumed the match.
In 4.1–4.17
Command 10 on events, sent by the server, reliable.
The header has no effect. Resuming after the countdown, it keeps input locked and the pause panel open until a countdown of its own ends; resuming at once, it unlocks input and closes the panel.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | The client id of the player who resumed the match, announced in chat in their side’s colour where their champion is known; 4294967295 announces no one. |
| how | 1-byte bits | |
| how.afterCountdown | bit 0 | Set where the match starts again after a countdown rather than at once. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
In 4.18–4.20
Command 10 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | The client id of the client that lifted the hold. |
| how | 1-byte bits | |
| how.afterCountdown | bit 0 | Set where the match starts again after a countdown rather than at once. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (2)
Pause
What a client sends to hold a match. The header names no object: it carries zero.
In 4.1–4.17
Carried on requests, sent by the client, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 160 |
| 4.11–4.17 | 161 |
A client sends the same values in every Pause, as each field states.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | A client writes 4294967295, the client id of no client. |
| timeLeft | i32 | A client sends zero. |
| how | 1-byte bits | |
| how.tournament | bit 0 | A client sends it clear. |
| how.unused | bit 1 to 7 | Unused; a client writes zero. |
Vectors (2)
In 4.18–4.20
Command 161 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | The client id of the client that asked. |
| timeLeft | i32 | How much holding time is left to the side that asked, in seconds. |
| how | 1-byte bits | |
| how.unlimited | bit 0 | Set where the hold is not counted against a limit. |
| how.unused | bit 1 to 7 | Unused; a client may leave any value here, and a server ignores it. |
Vectors (1)
Resume
What a client sends to start a paused match again. The header names no object: it carries zero.
In 4.1–4.17
Command 10 on requests, sent by the client, reliable.
A client writes only delayed in how; the rest of the byte carries whatever it held there.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | A client writes 4294967295, the client id of no client. |
| how | 1-byte bits | |
| how.delayed | bit 0 | A client sends it clear. |
| how.unused | bit 1 to 7 | A client leaves these bits unwritten; they carry no meaning, and a server ignores them. |
Vectors (1)
In 4.18–4.20
Command 10 on requests, sent by the client, reliable.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | A client writes zero; a server ignores it. |
| how | 1-byte bits | A client clears its lowest bit; the others vary from send to send, and a server ignores them. |
| how.delayed | bit 0 | Set where the match is to start again after a countdown rather than at once. |
| how.unused | bit 1 to 7 | Unused; a client may leave any value here, and a server ignores it. |
Vectors (1)
Paused
What a server sends to put the match on hold. The header names no object: it carries zero.
In 4.1–4.17
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 160 |
| 4.11–4.17 | 161 |
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | The client id of the client that asked for the hold; it applies only to a tournament’s hold. |
| timeLeft | i32 | The hold time left, in seconds, for any hold. A hold begins only where it is above zero and the match is not already held. |
| how | 1-byte bits | |
| how.tournament | bit 0 | Set for a tournament’s hold: as the hold begins, a client shows its tournament display, crediting seat. A hold still needs timeLeft above zero. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (2)
In 4.18–4.20
Command 161 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| clientId | u32 | The client id of the client that called the hold. |
| timeLeft | i32 | How long the hold can run, in seconds. |
| how | 1-byte bits | |
| how.unlimited | bit 0 | Set where the hold is not counted against a limit. |
| how.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (2)
GameEnded
What a server sends to end the match and say which side won. The header names no object: it carries zero.
In 4.1–4.3
Command 197 on events, sent by the server, reliable.
Arriving while the match still loads, it counts as a win or loss for the player’s side and the client leaves at once. Otherwise the client ends the match on its screen and sends ClientFinished, except while playing a replay.
| Field | Type | What it is |
|---|---|---|
| result | 1-byte bits | |
| result.side100Won | bit 0 | Set where side 100 won, clear where side 200 did. |
| result.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
In 4.4–4.17
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.4–4.10 | 197 |
| 4.11–4.17 | 198 |
Arriving while the match still loads, it counts as a win or loss for the player’s side and the client leaves at once. Otherwise the client ends the match on its screen and sends ClientFinished, except while playing a replay.
| Field | Type | What it is |
|---|---|---|
| result | 1-byte bits | |
| result.side100Won | bit 0 | Set where side 100 won, clear where side 200 did. |
| result.surrendered | bit 1 | Set aside for a match ended by surrender. It has no effect. |
| result.unused | bit 2 to 7 | Unused; a server writes zero. |
Vectors (2)
In 4.18–4.20
Command 198 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| result | 1-byte bits | |
| result.side100Won | bit 0 | Set where side 100 won and clear where side 200 won. A client compares the winning side with its own to show victory or defeat. |
| result.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (1)
ClientFinished
What a client sends when it has finished with the match.
In 4.1–4.10
Command 140 on requests, sent by the client, reliable.
It is sent once, at the end.
No body.
Vectors (1)
In 4.11–4.20
Command 141 on requests, sent by the client, reliable.
It is sent once, as the end of the match is handled, and not while playing a replay. The header names no object: it carries zero.
No body.
Vectors (2)
VictoryDance
What a server sends to set units moving as winners or losers do. It ends nothing and changes nothing else on screen. The header carries zero.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 196 |
| 4.11–4.20 | 197 |
It sets every unit on a side moving as winners or losers do: a winning champion dances, a losing one stands idle, and other units play a win or loss animation where they have one.
| Field | Type | What it is |
|---|---|---|
| orderWon | u8 | Nonzero where side 100 won, zero where side 200 won. |
Vectors (3)
Exit
What a client sends as it leaves. It carries nothing of its own.
In 4.1–4.10
Command 142 on requests, sent by the client, reliable.
A client sends it as it leaves as one abandoning the match: as its player confirms quitting or closes the window, as a reconnection fails, or on Shutdown or BotKick. The header names no object: it carries zero.
No body.
Vectors (1)
In 4.11–4.17
Command 143 on requests, sent by the client, reliable.
A client sends it only as it quits by abandoning the match; a match that reaches its end sends none. The header names no object: it carries zero.
No body.
Vectors (1)
In 4.18–4.20
Command 143 on requests, sent by the client, reliable.
The header names no object: it carries zero.
No body.
Vectors (1)
Shutdown
What a server sends to have a client leave the match at once, as one abandoning it, sending Exit as it goes. It carries nothing of its own. The header carries zero.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 228 |
| 4.11–4.20 | 229 |
No body.
Vectors (3)
BotKick
What a server sends to have a client it takes for a program rather than a player leave the match. The header carries zero.
In 4.1–4.17
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 221 |
| 4.11–4.17 | 222 |
| Field | Type | What it is |
|---|---|---|
| action | u8 | What to do. A client acts on 4 only. Values: 4 leave. |
Vectors (2)
In 4.18–4.20
Command 222 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| action | u32 | What to do. A client acts on 5 only. Values: 5 leave. |
Vectors (1)
PlayerDisconnected
What a server sends as a player’s client drops out. The header carries zero.
In every range of this book
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 151 |
| 4.11–4.20 | 152 |
A client shows a chat notice naming the player in their side’s colour, and nothing where player names no champion it knows, names its own champion, or the match is not under way.
| Field | Type | What it is |
|---|---|---|
| champion | u32 | The player’s champion. |
| flags | 1-byte bits | Who is told. |
| flags.toEnemies | bit 0 | Set to show the notice only to the other side; clear to show it only to the player’s own side. A client with no champion of its own shows it only where this is clear. |
| flags.unused | bit 1 to 7 | Unused; a server writes zero. |
Vectors (4)
SoftReconnect
What a server sends, in pairs, to rebuild a client’s world without a new connection: the first marks what the client holds, the second deletes whatever is still marked. The header carries zero.
In 4.1–4.17
Carried on events, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 238 |
| 4.11–4.17 | 239 |
| Field | Type | What it is |
|---|---|---|
| stage | 1-byte bits | Which half of the pair. |
| stage.stage | bit 0 to 1 | 0 to mark every unit, and every object kept until a checkpoint other than an inhibitor, also clearing floating text, any screen tint and the state of neutral camps; any other value to delete whatever is still marked. |
| stage.unused | bit 2 to 7 | Unused; a server writes zero. |
Vectors (2)
In 4.18–4.20
Command 239 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| stage | u32 | Which half of the pair: 1 to mark every unit, and every object kept until a checkpoint other than an inhibitor, also clearing floating text, any screen tint and the state of neutral camps; any other value to delete whatever is still marked. Values: 1 mark. |
Vectors (1)
ReconnectedInMatch
What a client sends right after the server answers its registration. The header carries zero.
In every range of this book
Carried on requests, sent by the client, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 155 |
| 4.11–4.20 | 156 |
A client sends it once it has connected again to a match it was playing. A client dropped while playing reconnects by itself; one dropped while loading leaves instead. It carries nothing of its own.
No body.
Vectors (3)
Reconnected
What a server sends to say a client has reconnected. The header carries zero.
In every range of this book
Command 15 on events, sent by the server, reliable.
| Field | Type | What it is |
|---|---|---|
| client | u32 | The client, by the seat it occupies. |
Vectors (2)
ClockConvergence
What a server sends about how its clock and a client’s are being brought together. The header carries zero.
In every range of this book
Carried on clock, sent by the server, reliable, under these commands:
| Builds | Command |
|---|---|
| 4.1–4.10 | 117 |
| 4.11–4.20 | 118 |
| Field | Type | What it is |
|---|---|---|
| clientTime | f32 | The client’s clock, in seconds, as the client reported it. |
| roundTrip | f32 | The round trip time the server measures, in seconds. |
Vectors (2)
Empty
A message with no body. The header carries zero.
Unhandled286
A message that changes nothing a client shows. The header carries zero.
In every range of this book
Command 286 on events, sent by the server, reliable.
No body.