The sync templates now send a lot less
November 20, 2026 · release
@voicethere/agent 0.37.0
We read our own data-sync templates and found most of what they sent was waste. redis-sync re-sent a full 2 KB world to every session 20 times a second, with about three quarters of it empty slots. world-sync and world-sync-binary answered every incoming pose with a broadcast to every peer, so traffic grew with the cube of the player count. game-sync sent its whole 25-slot buffer at 60 Hz even with a single object in the world.
@voicethere/agent 0.37.0 changes all of that:
- world-sync and world-sync-binary mark the world dirty on a pose and broadcast once per 30 Hz tick, only when something changed.
- game-sync still simulates at 60 Hz but broadcasts at 30 Hz, and the frame holds only the live objects as 16-bit integers: 4 bytes of header plus 18 bytes per object.
- redis-sync sends a keyframe on join and once a second, and otherwise only the slots that changed. A position update is one 6-byte
SETRANGEin Redis instead of a Lua script that copies the whole world. - game-sync also got two fixes: a slow step can no longer delete another worker's lock, and the simulation clock is stored with the world, so more workers do not make it run faster.
The frame layout is a breaking change for any client that decodes game-sync as float32. Our shared world demo now decodes the new frames, draws one broadcast interval behind and blends the last two snapshots, so 30 Hz still looks smooth. A client that meets a format or version it does not know should say so rather than guess, and the demo shows an "update required" notice.
Try it
- Docs: Data-only world sync, with both frame layouts, a decoder for each, and the keyframe and delta rules
- Docs: Project Redis, on
SETRANGEversus a Lua read-modify-write - Docs: Agent templates
- npm: @voicethere/agent