Skip to content

Territory Wars

Multiplayer territory capture game built with Yjs CRDTs on Durable Streams. Read the blog post for more details.

How it works

Built with y-durable-streams on Durable Streams. Game state is managed via StreamDB. The game board is a Yjs Y.Map where each cell is a last-writer-wins register. Players move to claim cells and enclose territory. Player presence is tracked via ephemeral awareness streams with built-in TTL that garbage-collects stale state from disconnected players.