Making Xero Core: A Browser RTS Built With Claude Code

Making Xero Core: A Brows…Making Xero Core: A Browser RTS Built With Claude Code cover art

Xero Core is a real-time strategy game that runs in a browser tab. You build a base, raise mechs, tanks and aircraft, and race rival commanders to a superweapon. Claude Code wrote nearly all of the code. My side was design direction, playtesting and art choices.

Full disclosure: I run VibeCodeReviewer. This is a dev diary, not a review. Play Xero Core free and judge it yourself.

The pitch

I wanted a browser RTS that competitive players take seriously. You open a link, you're in a match in under a minute, and the game rewards the same skills a top-tier RTS asks for: economy, scouting, army control and decisions under pressure.

The core is StarCraft-style macro and micro: workers, a 200 supply cap, tech tiers and fast fights. On top of that sits a Command & Conquer layer: power grids, build radius, walls and gates, selling buildings, veterancy and superweapons with a public countdown.

A player base mid-build in Xero Core, with Workers on crystal nodes

Documents first, code second

The first commit had no game in it. It held a plan, an art direction guide and full designs for four factions. The next ones added a building style guide and a materials and shaders plan.

With an agent writing the code, those docs are what it checks its work against. When I changed my mind about the design, the doc changed first, with a dated note saying what changed and why.

The biggest change: one roster for everyone

The plan started with four factions, each with its own units. On November 12 I scrapped that. Now every player builds every unit and structure, the way Zero-K does it.

The variety comes from your choices instead. Everyone shares one economy, so nobody builds everything. You pick a route: rush with cheap infantry, turtle behind turrets, take the air, go heavy armor, or mix lines to counter what the enemy fields.

Units come in four families:

  • Human: infantry, crewed vehicles and aircraft.
  • Robot: mechs and drones.
  • Veyl: crystal-grown aliens. Precise, tough and expensive.
  • Void: a savage brood that hatches by itself and guards its nest.

The four factions survived as campaign sides. Each one builds about three quarters of its army from its own family and mixes in the rest.

Five AI opponents with different habits

Each AI personality has its own build order, favorite units and attack timing:

  • Strategist: a balanced army from every production line, built to beat what you field.
  • Rusher: three Barracks and cheap, fast units. It attacks before the three-minute mark and keeps coming.
  • Turtle: rings its base with turrets, techs up and shows up late with siege guns and Titans.
  • Ace: Airfields first. Gunships, strike aircraft and bombers over a thin ground escort.
  • Juggernaut: Mech Stations and heavy armor. Fewer attacks, bigger ones.

A Juggernaut AI army of mechs and tanks advancing

What's in the game

  • Skirmish: Duel, Free for All and Team Deathmatch against the AI, at three difficulty levels.
  • Online play: matchmaking for ranked and casual, lobbies, friends, parties, chat and leaderboards. It went live on November 12.
  • Conquest campaign: a turn-based map of four worlds and 44 territories. You fight each battle in the RTS engine or auto-resolve it.
  • Four superweapons: an orbital rod, a field that turns enemy units to your side for 12 seconds, a pod that hatches a brood and a beam you steer. Everyone sees the 5-minute countdown, and a warning ring shows 3 seconds before a strike lands.
  • Map and model editor: brush-based arenas, material painting and a PLAY button with cheats for testing.
  • Progression: 100 levels, 46 achievements and a player card whose pieces you earn by playing.
  • Windows desktop app: a launcher that updates the game each time you open it.

The art pipeline mixed 270 converted RTS models with 107 models generated in Tripo, plus a library of PBR textures.

How online play works

The simulation is pure TypeScript with integer positions and a seeded random number generator. It runs at 20 ticks a second in a Web Worker, off the main thread. Three.js draws the battlefield, and React handles the menus and HUD.

Because the simulation is deterministic, every player's browser runs the same match. The server (a Cloudflare Worker) never simulates anything. It relays commands in turns, compares checksums to catch desyncs and settles the result and the ratings.

Balancing with 5,200 AI matches

Determinism had a second payoff. If the game gives the same result for the same inputs, you can run it headless and trust the numbers. So Claude Code built a balance runner that plays AI against AI in worker threads.

The first pass played 5,200 matches: every family and AI style against every other, from both start positions, on all 84 two-player maps, with a 30-minute cap.

The results were ugly:

  • The Robot family won 82.3% of its matches. The target is 50%, with 45–55% counting as balanced.
  • The Turtle AI won 29.1%.
  • Turrets earned back only 0.26 to 0.50 of their cost.

Claude Code proposed two sets of new numbers, tested both with the runner and handed them to me. I picked one. On a rerun of 1,300 matches every family landed between 48.6% and 53.0%, and Robot dropped to 46.4%.

Patch 0.1.24 then gave defenses about 35% more damage. The Turtle went from 25.0% to 28.5% on the newer build. That's still short of the target, and the next fix is a smarter Turtle build order, not more turret damage.

Nobody plays 5,200 test matches by hand. Which brings me to the part I care about most.

Troopers raiding an enemy base

Test every mechanic. Then test it again.

I'd argue the most important part of making a game is testing every aspect of it, every single mechanic, over and over. Not the art, not the feature list. Testing.

An AI agent writes code fast. It also writes bugs fast, and it will tell you a feature works before anyone has played it. The only way to know is to play it, measure it and break it on purpose. So that's what I spent most of my time on:

  • Every unit against every other unit. The balance runner set up 776 duels: each combat unit against each other one, 1,500 value a side, from both starts. A unit that loses to everything shows up in the numbers, not in a forum thread a month later.
  • Every map from both sides. The big run covered all 84 two-player maps from both start positions. Nine looked unfair, so they got 1,300 more matches of their own.
  • The simulation itself. Online play only works if every browser computes the same match. The checksum has to come out the same with and without the extra tracking the balance tools add, and the runner checks that.
  • The small stuff. Workers piling onto one crystal node. An order inside a Refinery that the Worker ignored. Holding Alt mid-drag in the editor and losing your selection. None of those break a demo. All of them break a match.
  • Hands on the game. The editor's PLAY button with cheats lets me drop into any map and try one mechanic in isolation, without playing ten minutes to get there.

A mechanic you haven't tested is a guess. Players will find every guess you ship.

Shipping fast, breaking things

Every release gets patch notes. On November 13 alone the game went from 0.1.20 to 0.1.28. A few of the fixes from those first days:

  • The online end screen crashed. Fixed in 0.1.28.
  • Sound could stall the HUD. Fixed in 0.1.26.
  • Workers piled onto a single crystal node. Now two Workers share each node.

Speed has a cost. Ship eight patches in a day and some bugs reach players before you see them.

Where Xero Core is now

Xero Core is a playable prototype on version 0.1.28. Everything in the list above works, online play included. It's not finished, and here's where it stands.

The plan has eleven milestones, from "repo and design" up to a balance beta. Most of them are done: the engine, the economy, combat, the AI, online matches, the ladder, the C&C layer and an art and audio pass. The game is in the last one now, the balance beta. That milestone has two halves. The headless simulations are running. Invited playtesters are next.

What's still missing:

  • Transports, cloaking and detection. None of these are in yet.
  • Support powers. Planned, not built.
  • Superweapon models. The four superweapons work but use stand-in art.
  • Smarter AI. The AI doesn't expand to new bases, and it sees through the fog of war. Both need fixing before it plays fair.
  • Balance. The Turtle AI wins about 28.5% of its matches. The target is 45–55%.
  • More sign-in options. Google is the only account type so far.

So the game works, and the next stretch is about making it fair. That means more testing, and this time with people on the other side of the screen.

What I'd tell you before you try this

  • Test everything, relentlessly. Every mechanic, every unit, every map. This matters more than anything else on this list.
  • Write the design down first. The agent follows the doc, so a vague doc gets you a vague game.
  • Ask for tools, not only features. The editor and the balance runner did more for the game than any single unit.
  • Ask for numbers. "The robots feel strong" starts an argument. "Robots win 82.3%" starts a fix.
  • Keep the calls that matter. Claude Code proposed every balance change. None went in until I signed off.

Play it

Xero Core is free at xerocore.pages.dev. The Windows build is on the same site. Start with a Duel against the Rusher. If you survive the first three minutes, you'll see what the rest of the game is about.

Made a vibe coded game?

List it for free and let players rate it.

More from the BlogAll posts →