Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Movement

A unit is moved by a path: a run of points on the ground plane, the first of which is where the unit is and the last where it is going.

Coordinates

A path names one axis of the ground plane and then the other. The height of a point is not carried, and a receiving end takes it from the ground beneath.

Movement and MovementAtSpeed are compact: a path is a run of integer points, each stated against the one before it, while positions elsewhere are world floats covering a far larger range (see Space). The two are related by an origin and a step:

encoded = truncate_toward_zero((world - origin) / 2)
world   = origin + 2 * encoded

A path resolves a position to two world units, rounded toward the origin.

Other shapes

MovementAtSpeed carries the same points as Movement with the terms of the travel stated before them, and WaypointGroupAtSpeed is what carries it. Other messages carry their points as world floats, and their definitions say so. The message carrying a movement says which shape it holds.

A unit coming into sight while standing carries its place and facing in EnterSight instead.

Resolving a path

A path is read into points by taking the first as it stands and then, for each point after it, taking each coordinate either as it stands or by adding the step to the coordinate of the point before. The point before means as that point resolved, not what the wire carried for it, which matters wherever a coordinate stated afresh is followed by one stated as a step.

conformance/vectors/algorithm records the resolution of the paths the movement vectors carry. They give decoded fields and the points they resolve to.

What a group can carry

A sending end MUST NOT send a movement with no points; a receiving end refuses it.

The origin

The origin is the midpoint of the bounds a map’s navigation data covers, truncated to a whole number on each axis. Nothing on the wire carries it. Both ends hold it before a match begins, and an end holding a different one misplaces every position it reads.

A server MUST take the origin from the map it is hosting. A server MUST NOT derive the origin from anything a client sent.

Space gives the origin of each map, keyed by the map number a server sends in VersionSync. A server hosting a map the table leaves out takes its origin from that map’s navigation data.

Relocating rather than walking

A client answers each group with one WaypointAck, listing every unit in it that carried a token, with an empty list where none did. A server MAY ignore it.

A movement whose flag says so carries a token beside the unit (see Movement). A receiving end remembers one token for each unit, beginning at zero.

A token unlike the remembered one puts the unit where the path begins rather than walking it there, but only where the unit is far enough away to warrant it: either ground axis differing by more than fifty world units, taken on its own. Fifty exactly does not, and height is not weighed.

A token the receiving end already holds changes nothing, and neither does an unfamiliar one arriving while the unit is near enough. In both the path is followed and the remembered token kept, so a token is taken up only once it has moved something.

A client leaves the flag clear in what it sends, so a token travels only from a server.

What a client asks for and what a server answers

An order from a client is a request: what a unit does is whatever the server sends back.

A client does not move its own champion on a right click by itself: the champion moves only along a path a server sends.

A server moves the champion by answering the MoveOrder with a WaypointGroup, and the client returns that group’s syncId in a WaypointAck (see Ordering).

A client sends the path it would take, with its destination beside it in world floats. A WaypointGroup carrying that path back unchanged moves the champion along it.

A server MUST send the WaypointGroup that answers a MoveOrder on the transient channel.

In 4.1–4.19

Where its player has movement prediction on, a client starts its champion toward the point it asked for, and puts it back where it was if no path arrives within 2 seconds. A path carried by WaypointGroupAtSpeed cannot be overridden by the player’s orders, so a server walks a champion with WaypointGroup.

Marking the ground

NavigationFlags marks the ground within circles.

A server MUST NOT send NavigationFlags: a client fails on the first one a match brings.

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).

WaypointGroupAtSpeed

What a server sends to move units along paths of its own choosing, stating how each one travels rather than leaving it to the receiving end. It is what carries a unit thrown, dragged, or carried along by something other than its own walking. The header names no object: it carries zero.

Definition.

In every range of this book

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
4.1–4.1099
4.11–4.20100
FieldTypeWhat it is
syncIdu32Names this statement of movement.
movementCountu16How many units follow.
movementscount in movementCount × MovementAtSpeedWhat each unit is told to do.
Vectors (10)

a-plain-dash-on-4-10, following-a-unit-on-4-10, holding-its-facing-on-4-10, one-on-4-10, through-the-air-on-4-10, one-on-4-17, a-plain-dash-on-4-20, following-a-unit-on-4-20, holding-its-facing-on-4-20, through-the-air-on-4-20

WaypointAck

What a client sends once it has taken in a group of movements, naming which group. The header names no object: it carries zero.

Definition.

In 4.1–4.17

Carried on requests, sent by the client, unsequenced, under these commands:

BuildsCommand
4.1–4.10118
4.11–4.17119

It lists the units the group asked it to relocate.

FieldTypeWhat it is
syncIdu32Which group is being acknowledged, as the group named itself.
relocationCountu8How many relocations follow.
relocationscount in relocationCount × record
relocations[].unitu32The unit the token belonged to.
relocations[].tokenu8The token that arrived with it.
Vectors (2)

one-on-4-10, one-on-4-17

In 4.18–4.20

Command 119 on requests, sent by the client, unsequenced.

It lists the units the group asked it to relocate.

FieldTypeWhat it is
syncIdu32Which group is being acknowledged, as the group named itself.
relocationCountu8How many relocations follow. It counts every movement in the group that carried a token, whether or not the token moved anything.
relocationscount in relocationCount × record
relocations[].unitu32The unit the token belonged to.
relocations[].tokenu8The token that arrived with it.
Vectors (2)

no-relocations-on-4-20, one-relocation-on-4-20

MoveOrder

What a client sends to tell a server what it wants a unit to do. The header names the sender’s champion.

Definition.

In every range of this book

Carried on requests, sent by the client, reliable, under these commands:

BuildsCommand
4.1–4.10113
4.11–4.20114

The path it carries is what the client would take; where the unit actually goes is whatever the server answers with.

FieldTypeWhat it is
kindu8What is being asked for. Values: 2 moveToPosition, 3 attack, 10 stop.
targetXf32Where the order points, along one ground axis. Carried in world units rather than in the units a path uses.
targetZf32Where the order points, along the other.
targetu32The network object the order is aimed at, or zero where it is aimed at open ground.
movementMovement
Vectors (16)

a-long-path-on-4-10, at-a-target-on-4-10, both-afresh-on-4-10, one-on-4-10, one-point-on-4-10, one-step-on-4-10, stopping-on-4-10, z-steps-on-4-10, one-on-4-17, a-long-path-on-4-20, at-a-target-on-4-20, both-afresh-on-4-20, one-point-on-4-20, one-step-on-4-20, stopping-on-4-20, z-steps-on-4-20

WaypointGroup

What a server sends to move units. It carries a number a client returns to say it has taken the group in. The header carries zero or names the object this is about, and a client accepts either.

Definition.

In every range of this book

Carried on transient, sent by the server, unreliable, under these commands:

BuildsCommand
4.1–4.1096
4.11–4.2097
FieldTypeWhat it is
syncIdu32Names this group. A client returns it to say the group arrived.
movementCountu16How many units the group moves.
movementscount in movementCount × Movement
Vectors (12)

both-afresh-on-4-10, long-path-on-4-10, one-on-4-10, one-unit-on-4-10, teleport-on-4-10, z-steps-on-4-10, one-on-4-17, both-afresh-on-4-20, long-path-on-4-20, one-unit-on-4-20, teleport-on-4-20, z-steps-on-4-20

NavigationFlags

What a server sends to mark the ground within circles, in place of the circles it marked before: each circle’s flags apply to the ground within it. The header carries zero.

Definition.

In every range of this book

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
4.1–4.1064
4.11–4.2065

A client fails on the first of these in a match: it stops, marking no circle and sending no answer.

FieldTypeWhat it is
countu16The count of circles that follow.
syncIdi32A number naming this marking.
circlescount in count × recordThe circles.
circles[].xf32The circle’s centre, along one ground axis, in world units.
circles[].zf32The circle’s centre, along the other ground axis, in world units.
circles[].radiusf32Its radius, in world units. A circle of radius 1000 or more marks nothing.
circles[].flagsu32The flags to add to each cell. Only the low 16 bits take effect.
Vectors (3)

one-on-4-10, one-on-4-17, one-on-4-20

DrawPath

What a client sends as its player draws a path with the right mouse button, once a server has turned drawing on (DrawPathMode). The header names the sender’s champion.

Definition.

In every range of this book

Command 262 on requests, sent by the client, reliable.

FieldTypeWhat it is
unitu32The sender’s champion.
nodeu8Where in the stroke this point falls. Values: 0 start, 1 update, 2 end.
xf32Where the cursor points on the ground, along one axis, in world units.
yf32Its height, in world units.
zf32Where the cursor points on the ground, along the other axis, in world units.
Vectors (2)

one-on-4-17, one-on-4-20

DrawPathMode

What a server sends its player’s champion to have the player draw paths with the mouse. The header names the champion. While on, each right click on the world also sends DrawPath. A client sets how often a held right click repeats a move to the interval, at least 0.1 seconds, whether on or off.

Definition.

In every range of this book

Command 261 on events, sent by the server, reliable.

FieldTypeWhat it is
unitu32It has no effect.
modeu8Zero to turn drawing off, any other value to turn it on.
intervalf32Seconds between repeats of a held right click.
Vectors (2)

one-on-4-17, one-on-4-20

FaceDirection

What a server sends to turn a unit to face a direction. The header names the unit acting.

Definition.

In 4.1–4.17

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
4.1–4.1079
4.11–4.1780
FieldTypeWhat it is
towardXf32The direction faced, along one ground axis.
towardYf32The direction faced, in height.
towardZf32The direction faced, along the other ground axis.
how1-byte bits
how.turnOverTimebit 0Set to turn over turnTime, at least 0.0001 seconds; clear to face the direction at once, with turnTime having no effect and the usual turn rate restored.
how.unusedbit 1 to 7Unused; a server writes zero.
turnTimef32How long the turn takes, in seconds.
Vectors (2)

one-on-4-10, one-on-4-17

In 4.18–4.20

Command 80 on events, sent by the server, reliable.

FieldTypeWhat it is
how1-byte bits
how.turnOverTimebit 0Set where the turn takes the time named below rather than happening at once.
how.unusedbit 1 to 7Unused; a server writes zero.
towardXf32The direction faced, along one ground axis.
towardYf32The direction faced, in height.
towardZf32The direction faced, along the other ground axis.
turnTimef32How long the turn takes, in seconds.
Vectors (2)

another-on-4-20, one-on-4-20

FacePosition

What a client sends when a script it runs turns a unit to face a point. A server need do nothing with it. The header names the unit turned.

Definition.

In 4.1–4.8

Command 79 on requests, sent by the client, reliable.

FieldTypeWhat it is
directionXf32Which way the unit now faces, as a direction of length one, along one ground axis.
directionYf32Which way the unit now faces, as a direction of length one, in height.
directionZf32Which way the unit now faces, as a direction of length one, along the other ground axis.
unusedu8A client writes zero.
unknownf32A client writes 0.1.
Vectors (1)

one-on-4-1

MovementBounds

What a server sends to set a circle that a client keeps its view or its champion’s orders within. The header carries zero.

Definition.

In every range of this book

Command 6 on events, sent by the server, reliable.

A client pulls an order to a point outside onto the circle’s edge before sending it, and drops an order at an object outside.

FieldTypeWhat it is
xf32The circle’s centre, in world units.
yf32The centre’s height, in world units.
zf32The circle’s centre, in world units.
radiusf32The circle’s radius, in world units. Zero lifts the bounds; a negative radius counts as zero.
flags1-byte bitsWhat else the circle holds.
flags.camerabit 0Set to keep the camera within the circle too. Clear leaves the camera as it was, bound or not.
flags.unusedbit 1 to 7Unused; a server writes zero.
Vectors (2)

one-on-4-17, one-on-4-20

Path

What a server sends to set a unit walking along a path, facing the way it walks. The header names the unit.

Definition.

In every range of this book

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
4.1–4.10184
4.11–4.20185

A client answers every one at once, unsequenced on the transient channel, with ten bytes: WaypointAck’s command, a net id of zero, this sync id, and one byte that is arbitrary and carries no meaning. It applies it only where the sync id is not older than the last the unit took (as UnitStopped).

FieldTypeWhat it is
syncIdi32The unit’s movement count.
pointsto the end × recordThe path’s points, to the end of the message. A client takes the ground’s height for each.
points[].xf32A point on the path, in world units.
points[].zf32A point on the path, in world units.
Vectors (3)

one-on-4-10, one-on-4-17, one-on-4-20

PathWithSpeed

What a server sends to set a unit moving along a path at a speed of its own, perhaps in an arc. The header names the unit.

Definition.

In 4.1–4.14

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
4.1–4.10130
4.11–4.14131

A client answers every one at once, as it answers Path, whatever its sync id. It applies it only where the sync id is not older than the last the unit took (as UnitStopped). A unit can follow another unit.

FieldTypeWhat it is
syncIdi32The unit’s movement count.
speedf32The speed to move at, in world units a second.
gravityf32The arc’s gravity, for a leap, in units of 150 world units a second squared. Zero or less moves the unit flat.
arcXf32Where the arc begins, in world units.
arcZf32Where the arc begins, in world units.
facingi8Which way the unit faces as it moves. Values: 0 along, 1 keep.
followu32A unit to follow, or zero for none.
followDistancef32How near to keep to it, in world units. It takes effect only where follow is not zero.
backOfff32How far to fall back from it, in world units. It takes effect only where follow is not zero.
travelTimef32How long the move takes, in seconds. It takes effect only where follow is not zero.
pointsto the end × recordThe path’s points, to the end of the message. A client takes the ground’s height for each.
points[].xf32A point on the path, in world units.
points[].zf32A point on the path, in world units.
Vectors (2)

along-on-4-1, along-on-4-11

In 4.15–4.16

Command 131 on events, sent by the server, reliable.

A client answers every one at once, as it answers Path, whatever its sync id. It applies it only where the sync id is not older than the last the unit took (as UnitStopped). A unit can follow another unit.

FieldTypeWhat it is
syncIdi32The unit’s movement count.
speedf32The speed to move at, in world units a second.
gravityf32The arc’s gravity, for a leap, in units of 150 world units a second squared. Zero or less moves the unit flat.
arcXf32Where the arc begins, in world units.
arcZf32Where the arc begins, in world units.
facingu8Which way the unit faces as it moves. Values: 0 along, 1 keep.
followu32A unit to follow, or zero for none.
followDistancef32How near to keep to it, in world units. It takes effect only where follow is not zero.
backOfff32How far to fall back from it, in world units. It takes effect only where follow is not zero.
travelTimef32How long the move takes, in seconds. It takes effect only where follow is not zero.
pointsto the end × recordThe path’s points, to the end of the message. A client takes the ground’s height for each.
points[].xf32A point on the path, in world units.
points[].zf32A point on the path, in world units.
Vectors (1)

along-on-4-15

In 4.17

Command 131 on events, sent by the server, reliable.

A client answers every one at once, as it answers Path, whatever its sync id. It applies it only where the sync id is not older than the last the unit took (as UnitStopped). A unit can follow another unit.

FieldTypeWhat it is
syncIdi32The unit’s movement count.
speedf32The speed to move at, in world units a second.
gravityf32The arc’s gravity, for a leap, in units of 150 world units a second squared. Zero or less moves the unit flat.
arcXf32Where the arc begins, in world units.
arcZf32Where the arc begins, in world units.
facingi8Which way the unit faces as it moves. Values: 0 along, 1 keep.
followu32A unit to follow, or zero for none.
followDistancef32How near to keep to it, in world units. It takes effect only where follow is not zero.
backOfff32How far to fall back from it, in world units. It takes effect only where follow is not zero.
travelTimef32How long the move takes, in seconds. It takes effect only where follow is not zero.
pointsto the end × recordThe path’s points, to the end of the message. A client takes the ground’s height for each.
points[].xf32A point on the path, in world units.
points[].zf32A point on the path, in world units.
Vectors (1)

along-on-4-17

In 4.18–4.20

Command 131 on events, sent by the server, reliable.

A client answers every one at once, as it answers Path, whatever its sync id. It applies it only where the sync id is not older than the last the unit took (as UnitStopped). A unit can follow another unit.

FieldTypeWhat it is
syncIdi32The unit’s movement count.
speedf32The speed to move at, in world units a second.
gravityf32The arc’s gravity, for a leap, in units of 150 world units a second squared. Zero or less moves the unit flat.
arcXf32Where the arc begins, in world units.
arcZf32Where the arc begins, in world units.
facingu8Which way the unit faces as it moves. Values: 0 along, 1 keep.
followu32A unit to follow, or zero for none.
followDistancef32How near to keep to it, in world units. It takes effect only where follow is not zero.
backOfff32How far to fall back from it, in world units. It takes effect only where follow is not zero.
travelTimef32How long the move takes, in seconds. It takes effect only where follow is not zero.
pointsto the end × recordThe path’s points, to the end of the message. A client takes the ground’s height for each.
points[].xf32A point on the path, in world units.
points[].zf32A point on the path, in world units.
Vectors (1)

one-on-4-20

UnitLookAt

What a server sends to turn a unit toward something. Its identifier is wider than a byte, so it travels behind the escape. The header names the unit acting.

Definition.

In every range of this book

Command 271 on events, sent by the server, reliable.

FieldTypeWhat it is
kindu8What the unit’s model turns to look at; not which way it faces. A client ignores 3 and above, keeping what it looked at before. Values: 0 direction, 1 point, 2 unit.
xf32Where to look, along one ground axis, in world units.
yf32Where to look, in height, in world units.
zf32Where to look, along the other ground axis, in world units.
targetu32The network object being looked at, where one is named.
Vectors (2)

one-on-4-17, turning-to-a-target-on-4-20

UnitStopped

What a server sends to stop a unit where it stands. The header names the unit.

Definition.

In every range of this book

Carried on events, sent by the server, reliable, under these commands:

BuildsCommand
4.1–4.1048
4.11–4.2049

A client applies it only where its sync id is not older than the last the unit took, counting a wrap: this message, PathWithSpeed and Path share one count per unit, starting at -1.

FieldTypeWhat it is
xf32Where the unit stands, in world units; a client keeps this height rather than the ground’s.
yf32Its height, in world units.
zf32Where it stands, in world units.
facingXf32The way it faces.
facingYf32The way it faces.
facingZf32The way it faces.
syncIdi32The unit’s movement count.
Vectors (3)

one-on-4-10, one-on-4-17, one-on-4-20