cd /news/ai-products/how-warship-workshop-runs-a-1000-pla… · home › topics › ai-products › article
[ARTICLE · art-181882] src=dev.to ↗ pub= topic=ai-products verified=true sentiment=↑ positive

How WARSHIP WORKSHOP runs a 1000-place online ladder from one browser page

Ant Games released WARSHIP WORKSHOP, a free browser-based 3D warship auto-battler with a 1000-place online ladder, built as a single 127 MB HTML file. The developer reports that the fight simulation is a pure, clock-free rules layer of 74 source files whose identity is a hash-of-hashes, so the page and server can verify they run identical rules and reject mismatched fights with a 409. The ladder server is a single Node program using only node: built-ins, with fights run in a worker thread and state kept in a JSON file backed by an append log, atomic-rename snapshots and hourly backups.

recommendation

Version your deterministic simulation as a hash-of-hashes of its source files and have the server return 409 on mismatch, so stale clients reload instead of desyncing.

more in playbook: Running AI in production
by read3 min views1 publishedDec 4, 2026

WARSHIP WORKSHOP is a free 3D warship builder that runs in the browser: you design a warship part by part, press FIGHT, and watch it battle on its own, then climb a shared ladder of 1000 places. It is an original release by Ant Games. Free to play, no pay to win, no sign-up, on desktop and phone with nothing to install.

This is a technical devlog: how the game is put together, and the three decisions that made a networked auto-battler possible inside a single HTML file.

An auto-battler where you fight the server's ships is usually two programs: a client that renders, and a server that simulates. The obvious split works, but then a fight is a black box — the player sends a ship and waits for a result.

We wanted fights you watch. So the browser has to run the exact same simulation the server runs, and both must agree down to the byte, or every fight between them is a lie.

The fight rules are 74 source files: 59 in src/sim, 13 in src/content, the RNG, and one entry file. They obey a single import rule: they import nothing from the game, render, UI, online, platform, input or asset layers — and they never read a clock or call Math.random.

Every one of those files is hashed, and the rules layer's identity is a hash-of-hashes: the first 16 hex digits of a sha256 over the sorted list of every file's path and sha256. The page carries that value; the server's fight bundle carries it too. A fight request sends the page's value with the ship. If the server runs a different rules value, it answers 409 and the page asks to reload — one changed byte in a rules file cannot silently desync a fight.

Because the sim is pure — ships in, a seed in, no clock, no Math.random — the same fight replays identically everywhere. The fight seed is an FNV-1a hash of fight|<id>|<place>|<version>, made by the server, so neither side can pick its own dice.

The build is deliberately extreme: dist/index.html is a single file — one minified script, the CSS, and every asset embedded as base64 blocks in <script type="application/octet-stream"> tags, 127 MB in total. It runs from a server page, and the same script boots both of the page's workers from a single text Blob.

Why: a browser game that loads no other file has no race, no missing-asset path, and one artifact to publish and version. The cost is size, so assets stream in by family — backdrop, hulls, icons, bodies, maps, VFX, props, debris, music, atlas — with a load manifest, and meshes are glTF in gzip blocks the page inflates with DecompressionStream as they are needed. Rendering is three.js on a WebGL2 canvas.

The online ladder is one Node program with only node: built-ins. 1000 places, each held by a player or by a computer ship; every holder or ship change bumps that place's version, which is what lets the rules hash catch a stale page. Fights run in a worker thread. The ladder is a single JSON file: each write appends a line to a log beside it, and periodically the log is folded into a snapshot by atomic rename, with an hourly backup.

Saves never touch a database either: the page keeps the save in localStorage under a per-game prefix, uploads it (at most 64 KiB, one in 10 s), and the server keeps three revisions. A SAVE LINK carries the save to another browser. The newest tab holds the save; other tabs stay read-only, so two tabs can never overwrite each other.

The server also makes every name (a word, a creature and a number), stores players under sha256 hashes of their id and token, and answers every JSON with Cache-Control: no-store and X-Robots-Tag: noindex.

From our server logs, last 7 days, as of 2026-12-04: Small numbers, but honest ones, and the ladder makes every one of them count.

── more in #ai-products 4 stories · sorted by recency
── more on @ant games 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-warship-workshop…] indexed:0 read:3min 2026-12-04 · —