Expand description
Bounded, versioned network protocol shared by native and browser game clients.
The protocol never accepts client positions or client-selected time steps. Native UDP is intentionally a thin primitive: authentication, encryption, browser transports, and NAT traversal are outside this prototype.
Modules§
- delta
- Versioned byte snapshot differences. Callers acknowledge exact baselines before using a delta.
- history
- Bounded authority history and clock estimates; rendering and transport are independent.
- reliable
- Bounded ordered event delivery over an unreliable transport. This is not encryption.
- udp
- Native sockets are optional by target; packet codecs remain available on wasm.
Structs§
- Input
Frame - Input
Queue - Deduplicates input redundancy and bounds per-client simulation backlog.
- Player
Snapshot - Snapshot
Enums§
Constants§
- BUTTON_
FIRE - BUTTON_
JUMP - BUTTON_
RELOAD - MAX_
INPUTS_ PER_ PACKET - MAX_
PACKET_ BYTES - MAX_
PITCH - MAX_
PLAYERS - MAX_
QUEUED_ INPUTS - PROTOCOL_
VERSION - Version 2 adds session-bound reliable events and individual acknowledgments.
Functions§
- decode_
client - decode_
server - encode_
client - encode_
server - sequence_
newer - RFC-1982-style comparison. Exactly half a sequence space is ambiguous and rejected.