Engineering, disclosed
How It's Built
Branchwars is designed, coded, deployed, and operated end-to-end by an AI — Claude Code — working from a design document toward a set of pass/fail gates. The one human on staff handles credit cards, legal signatures, and consent, and writes no code. This page explains the whole machine in plain English: the concepts are free; only the last 20% — tuning values, protocols, anti-cheat — stays in the building.
Org chart
Headcount: one AI, one human, three duties
Every part of the operation runs from an AI coding session: the game simulation, the servers, the website you're reading, the test infrastructure, the voice acting (more on that below), the deployment pipeline, and live logistics. There is no studio, no contractors, no hand-edited dashboard anywhere in the loop.
Because no human reviews the work, the machine reviews its own: every change passes a wall of automated gates before it ships, deploys go to a staging environment first and production the same day, and a rollback path always exists. The gates are described at the bottom — they're the actual management structure of this company.
The load-bearing wall
Two computers, one hallucination
The entire game rests on one property: the simulation is deterministic. Given the same starting conditions and the same player commands, your browser and our server compute the exact same battle, bit for bit — every shell, every crumb of falling terrain.
That's harder than it sounds, because computers quietly disagree about decimals: the same floating-point math can come out microscopically different across browsers and chips, and in a game where a pixel decides a hit, microscopic is fatal. So the simulation bans decimals entirely — positions, angles, and physics all run on whole numbers at a fine-grained scale. It also bans surprise: every random event comes from a seeded generator, so “random” is reproducible on demand.
Each volley, both sides compute the result and compare fingerprints of the world state. If they ever disagree, alarms go off — and across every match played, live and under load testing, they haven't.
Why go to this trouble? Three reasons: anti-cheat (the server independently simulates everything, so a hacked client can lie to itself but not to the building), instant shot preview (your browser runs the same physics the server does), and the third reason, which gets its own section below.
The servers
One meeting room per meeting
There is no game server in the traditional sense — no machine humming in a rack waiting for players. Each match gets its own tiny isolated server object, spun up on Cloudflare's edge network when the meeting starts and destroyed when it ends. A million matches means a million short-lived meeting rooms, not one giant server melting down.
Between volleys — while everyone is aiming — the match object hibernates: it goes to sleep and costs nothing, waking only when the shells fly. A typical six-and-a-half-minute match is awake for about eight seconds of it. Infrastructure that sleeps between volleys, like everyone else.
Turn-based play is what makes this shape possible: matches are rounds, rounds end, and billing stops when they do. A persistent-world game can never scale to zero. Ours does it every night.
The dataset
The replay is the database
Because the simulation is deterministic, a full match replay is just the starting seed plus everyone's commands — a few kilobytes. Re-run the simulation and the entire battle reconstructs itself perfectly.
That makes replays the game's entire analytics system. No stat is hand-logged; every number — accuracy, weapon balance, win rates — is computed by re-simulating matches. The best part: any statistic we invent next year is computable retroactively across every match ever played, because the raw material was never a spreadsheet. It was the matches themselves, archived in cloud object storage for fractions of a cent.
Radical cost transparency
What the war costs
Two numbers, and most places show neither: what it costs to run, and what it cost to build. A page called "radical cost transparency" that only published the hosting bill would be lying by omission. So here's the whole receipt.
1 · What it costs to run
Measured, not estimated — from a scripted load test of 200 concurrent matches at realistic pacing, priced at full paid rates:
The game currently runs on the platform's free tier, by policy: stay free until a real limit is actually hit, then pay the $5/month floor and scale from there. If a viral day ever exceeds the free tier's daily allowance, that's not an outage — it's the pre-authorized trigger to flip to paid, where the same traffic costs pocket change.
2 · What it cost to build
Running it is basically free. Building it was not. There is no studio and no payroll here — the whole thing is designed, coded, tested, shipped, and voiced by an AI agent — so the build cost isn't salaries. It's compute, and it's real money. To date, all-in:
| Line item | What it bought |
|---|---|
| AI build sessions | The entire codebase, config, CI gates, and this website — authored by an AI coding agent across hundreds of sessions, not by a team. The single largest line. |
| Memory & knowledge systems | The persistent memory and knowledge-graph the agent runs on — what lets it resume the build session after session without losing the thread. Compute for indexing and recall. |
| Voice generation | The System plus nine department mentors — 125 lines and counting — generated via ElevenLabs at build time, and re-recorded for free every time a script changes. |
| Image & asset generation | Devlog thumbnails and promo art. The game itself is 100% code-drawn vector, so in-game art costs nothing — this is purely the marketing surface. |
That's the honest all-in: low four figures, almost entirely compute, no payroll at all. It buys a velocity a staffed studio can't match — and it's the reason the runtime bill can be three cents. The expensive part was making it, once. Nobody else publishes either number. We think that's strange.
The cast
Voice acting by build step
The announcer is a text-to-speech voice on purpose — real corporations don't have humans announce things, so the synthetic flatness is the performance. All voice lines (the System plus nine department mentors — 125 lines and counting) live as scripts in the repository, and the build pipeline generates the audio via ElevenLabs. Change a line, rebuild, and the game re-records itself. No studio, no actor re-bookings, no drift between script and audio — and captions can never disagree with the voice, because they're the same file.
The stack
Tools & services, in plain English
| Piece | What we use | Why |
|---|---|---|
| Language | TypeScript, everywhere | The same simulation code must run in your browser and on the server — one language makes that literal, not aspirational |
| Game core | A pure simulation library with zero dependencies | No platform code, no clocks, no built-in randomness — enforced by automated lint rules, so determinism can't rot |
| Rendering | Plain HTML5 Canvas, no game engine | The whole game downloads in about the size of one photo (~136 KB) and runs on the worst laptop in the office — which is the point |
| Art | 100% code-drawn vector graphics | Every tank, map, and UI panel is drawn by code from one design-token file — no sprite packs, no asset store, nothing to license |
| Servers | Cloudflare Workers + Durable Objects | One isolated object per match, hibernating WebSockets, scale-to-zero — the “one meeting room per meeting” section above |
| Storage | Cloudflare R2 object storage | The replay archive — the game's entire dataset — for fractions of a cent |
| Voice | ElevenLabs text-to-speech API | The whole cast, generated from scripts in the repo at build time |
| Testing | Vitest + Playwright | Unit tests, plus three real browser engines re-simulating matches to prove they all agree |
| CI/CD | GitHub Actions + Wrangler | Every commit runs the full gate wall; deploys go staging first, production same-day, rollback always available |
| Payments | None | There is nothing to buy yet, which simplifies the architecture considerably |
Quality control
The gates: management by robot
No change ships unless every gate passes. These run on every single commit:
1,000 random matches, twice
Every commit simulates a thousand randomized matches two different ways and demands bit-identical results — then re-runs a corpus across Chrome, Firefox, and Safari engines.
The past must not change
A library of stored matches is re-simulated on every commit. If any battle resolves differently than it did before, the build fails — physics changes must be deliberate, never accidental.
100 unattended bot matches
Bots play full matches to completion, one hundred times, with no one watching. If the game can't finish itself, it doesn't ship.
The worst volley must stay fast
A worst-case volley — twelve tanks, maximum ordnance — is benchmarked on every commit against a hard millisecond budget, so server costs can't quietly creep.
Colorblind-checked, by machine
All nine department colors are verified distinguishable under three types of simulated color-vision deficiency, and every piece of text is checked against minimum size and overlap rules.
Small enough for office Wi-Fi
The client bundle is size-gated in CI. If the game ever gets heavy, the build turns red before players ever feel it.
The disclosure policy
What we publish, and what we don't
Freely published: the architecture (this page), the design thinking, the real bills, and honest aggregate metrics — including the launch retention numbers, pass or fail.
Kept in the building: balance tables and tuning values, wire protocols and replay formats, anti-cheat internals, and copy-pasteable core code.
An honesty note: the mechanics descend from a 1991 game — anyone competent could clone them without our help. The moat was never secrecy. It's velocity, tone, and the live war. Openness about the first 80% costs nothing; we just don't hand over the last 20%.