Independent game, 2026
Build a kingdom. Knock theirs over.
A real-time strategy game for the browser: five very different factions, twelve maps, heroes, and matches against the computer, friends or whoever is online.
- Role
- Game design and engineering, from the deterministic simulation and multiplayer server to the 3D client, computer opponents and accounts.
- Stack
- Next.js, TypeScript, Three.js, Node.js / WebSockets, Convex, Clerk, Blender, Turborepo
- Status
- Playable browser game
A full Iron Covenant base mid-match, with heroes, army roster, minimap and command panel.
Context
A strategy game asks a lot of the browser: hundreds of units, workers and an economy, fights that have to be fair online, and controls that still work on a phone. Tiny Tyrants is my attempt at the whole thing, from the rules engine to the ladder.
What I did
- Built a headless, deterministic simulation with integer maths, seeded randomness, pathfinding, abilities and replays, run by a dedicated Node WebSocket server at a fixed 20 Hz.
- Built the Three.js client with interpolated snapshots, a compact strategy HUD, a minimap, live hero portraits, day and night, and touch controls for phones.
- Designed five factions with their own economies and tempo, plus computer opponents that scout, expand, tech and counter, and balanced them with headless bot-versus-bot games.
- Added Clerk accounts with guest play, a Convex-backed Elo ladder, friends, saved games, replays, tutorials and practice challenges.
Engineering decisions
An online strategy game has to look instant to each player while staying identical for everyone. I kept the rules in one deterministic simulation and gave the only authoritative copy to the server.
- BrowserTurns a click into an order and renders interpolated snapshots with Three.js.
- Game serverValidates the order, schedules it for an exact tick and steps the simulation at 20 Hz.
- RecordsResults, ratings, saves and replays are stored in Convex for the ladder and profiles.
- Tradeoff
- Orders take a round trip before they happen, so the client hides that delay with interpolation and immediate feedback. One server process owns its rooms; spreading live matches across processes would be further work.
- Result
- Matches against the computer, friends or open players, with the same simulation powering offline tutorials, replays and headless balance testing.
The server owns the match.
The browser sends orders and renders what the server says happened. Commands are scheduled for an exact tick, so every player sees the same game and nobody can win from their own browser.
Same inputs, same game.
The simulation uses integers, a seeded random generator and no clocks. A replay is just the orders, and the same code runs the server, the offline tutorials and the balance tests.
Let the bots do the playtesting.
Balance changes are checked by running hundreds of headless games between computer opponents. A faction that drifts far from winning half its matches gets looked at before it ships.
Scope
An independent game in active development. Models come from free CC0 packs plus a scripted Blender pipeline. No player numbers are claimed.
Reviewed the repository, architecture, networking and balance documentation, and played the public game, its tutorials and a sandbox match.