Types
Every field in a gamehoster-schema.json declares a
type. The type fixes how the value is stored and, for
predicted fields, how it behaves when the client corrects
toward the server: continuous types ease toward the authoritative value so
motion stays smooth, while the rest snap.
| Type | Meaning | When predicted |
|---|---|---|
number | A decimal number: a position, a velocity, an angle. | eases (continuous) |
int | A whole number: a score, a count, a grid cell. | snaps |
bool | Either true or false. | snaps |
string | Free text: a name, a square like e4, or one of a fixed set of choices such as a phase. | snaps |
vec2 | A 2-D vector {x,y}: a point, a direction. | eases (continuous) |
vec3 | A 3-D vector {x,y,z}. | eases (continuous) |
ref | A stable id of another player or entity, named by
"to": "player". Survives reordering, so "my own body vs someone else's" is an id check. | snaps |
list | An ordered list of values. | snaps |
map | A collection of values keyed by id. | snaps |
Notes
- Continuity comes from the type, not a separate attribute, so
number/vec2/vec3ease and everything else snaps. Smoothing only affects what's rendered; reconciliation always corrects the full simulation state exactly. refrequiresto. The other types take no extra keys.- Every field declares a
sync(see Schema keys), one ofserver,sentorshared. Onlysharedfields are predicted and reconstructed, so the type governs how each one eases or snaps when the client reconciles. Asentfield snaps to the server's value, and aserverfield never reaches the client.