NET-1: Game state at a distance, cheaply: khel's events as a log, sent small
Size: W · Needs first: — · Done when: two rigs in different houses share a hunt through one BEAM node, the state as a log of small binary events, and its bytes a second measured
Parked 2026-11-01: an idea to come back to, not today's work.
Next step
Write down khel's handful of shared messages (a bearing, a find, a key-up, a position report, a task) and lay each out as an Elixir bitstring: how many bytes each really needs.
Parts
Software only; nothing to buy (no paid hosting until something earns).
- ☐ The home machine reachable from outside (a tunnel, or Steam's relayed networking), free
Ideas (2026-11-01)
- The world's a seed; the rest is events. khel's world comes from a seed and a small shared world (foxes, side tracks, obstacles). After that, few and specific messages, not an open world (yet): exactly the case where a compact, typed log wins.
- State as bucket updates, broadcast like video: an append-only log in segments. Old segments never change, so a CDN can cache them for good; a small head says what's new (as HLS does: a playlist and chunks). Clients replay it, near lockstep. The BEAM node writes the log rather than relaying every message; spectators, the NPC director and replays just read.
- Small on the wire: Elixir's bitstrings for the layout (bitmasks for flags, deltas against the last state acknowledged), as Quake 3's snapshots did.
- The technique once read about, to recognise when found again; candidates: the Tribes networking model (streams by importance, latest-state guarantee, ghosting), Quake 3's snapshot deltas (Glenn Fiedler's Gaffer on Games articles), deterministic lockstep and rollback (GGPO), CRDTs (Automerge, Yjs), interest management (SpatialOS).
From a "distributed game state architecture" summary (2026-11-01; not checked)
A summary of an architecture write-up, kept for its pointers; its claims are leads, not facts, until read at the source.
- Anycast at the edge: one address routed to the nearest node, no DNS juggling, handshakes kept off the game logic.
- Cross-region egress costs: fully meshed nodes get chatty and the bandwidth bill grows; its answer, custom delta compression and local pub/sub, not general database sync.
- Kubernetes for game servers: Agones for session allocation; OpenKruiseGame (OKG) for in-place updates (new server code without dropping players).
- Build or buy: build state and entities in memory on an actor system (the BEAM); use an open-source orchestration layer rather than writing one.
- For khel, later: anycast, regions and Kubernetes are for scale and cost money; now, one BEAM node at home. What carries over today: the BEAM for the state, delta compression, pub/sub kept local.