Bannermarch
Persistent browser strategy game about growing a medieval House across fiefs, alliances, markets, and wars.

I built Bannermarch as a browser-first persistent strategy game where a player starts as a landless knight and grows a House across multiple fiefs. The world keeps moving while the browser is closed. Players manage production, construct buildings, recruit infantry, move resources and armies, raid rival Houses, form alliances, trade through transported markets, and follow every outcome through the Chronicle. React and TypeScript run the client, while Cloudflare Workers, SQLite-backed Durable Objects, and WebSockets keep the simulation authoritative and persistent.
The problem
A persistent strategy game has to keep economies, travel, and conflicts moving across long absences without trusting the browser or running one expensive global game loop. Multiplayer actions also have to resolve against current state, even when two Houses act at nearly the same time.
The approach
The React client handles presentation and sends commands to an authoritative Cloudflare Worker. SQLite-backed Durable Objects own each House and the shared world systems. Time-based state resolves lazily when a player returns, while alarms process events that cannot wait for the next login. Dedicated WebSocket battle sessions broadcast validated snapshots for real-time coalition combat.
Notable decisions
- Server authority for the economy, campaigns, markets, and combat. The client never decides outcomes that affect another player.
- Lazy resource evaluation instead of a global tick. Every read or action resolves elapsed time first, with storage caps and a 72-hour accrual limit.
- Domain-specific Durable Objects for Houses, Chronicles, regions, alliances, diplomacy, markets, territory, wars, correspondence, and accounts.
- Idempotent actions and SQLite transactions so retries cannot duplicate construction, shipments, recruitment, or rewards.
- WebSocket battle sessions keep the field responsive while the Durable Object remains the source of truth.
- Password and Google sign-in, one-use recovery, HttpOnly sessions, Turnstile checks, and localized Herald emails are built into the same Worker platform.
Status
Playable alpha live at play.bannermarch.com and under active development. The current build includes multi-fief economies, NPC and player raids, alliances, treaties, transported markets, territorial wars, occupations, correspondence, and real-time coalition battles.
Want similar work for your team?
Senior engineering for AI, cloud, and web products—from architecture through production delivery.