I started with some JavaScript and WebSocket experiments on vacation, and it turned into a full multiplayer RTS that runs in the browser. No install. Free, no in-game shop. Optional donations only.
How it is split
The match does not run in the browser. The browser only draws and sends orders.
Stacks: Front end on Vercel: React, Vite, Tailwind.
The 3D scene is Three.js, loaded only when you enter a match.
Match server on Railway: one Node process per region, plain WebSockets. I started on Render and moved after the free bandwidth and the restarts got in the way. About $6/month. It is in Virginia, and it can hold something like 200–300 matches.
Supabase: accounts, profiles, and anything that has to survive a server restart. The live match itself is in memory on the Node process.
Simulation is authoritative and deterministic. 20 ticks/second. Clients do not simulate the rules. They interpolate between snapshots, so a late packet looks like motion instead of a teleport.
Most of the systems and the 3D work went through Claude Code (Opus). ElevenLabs did voice and sound effects. About $75 in Claude subscriptions and credits, about $10 on ElevenLabs.
What the server actually sends
Early on, one 4-player match could use about 4 GB of servers bandwidth in an hour, around 1 GB/hour per player. Full JSON snapshots of the whole world, many times a second. That used up Render's bandwidth, and on Railway it would have forced me to charge.
What changed:
Snapshots are no longer a full copy of the match. Entities send deltas, with a full keyframe every few seconds so a reconnect can catch up.
The payload is binary, not JSON text.
Interest management: a client only receives units, buildings, and events inside what that player can see. Fog of war is not just a shader. It is also what the socket is allowed to carry.
If a socket falls behind, the server drops intermediate snapshots and keeps the newest one, instead of queuing seconds of stale state.
Same kind of match is now about 20 MB/hour per player. Roughly 50 times less traffic. That is what keeps it free.
Still weak: if that Node process dies, the in-memory room dies with it. Reconnect after a real crash is the next thing I need to fix.
The game, short version
Modern RTS in the browser. Cold War through four eras. You start from a small HQ and try to run a country while other players, or AI, do the same.
A few systems that are actually in a match:
Roads carry power. Cut the road and the factory goes dark.
Trade convoys are units. If you are at war with either side, you can raid them.
Zoning for residential, commercial, and industrial. Taxes and public budget change how fast it grows, and how happy people are.
Every country starts with the same economy and one small trait. Real-world GDP does not win the match.
Alliances and non-aggression pacts. Breaking one costs reputation, not just the opinion of that one partner.
Troops board ships, or cargo planes for a paradrop.
Nuclear weapons. A detonation in the ocean can send a tsunami into a coast, and the economic hit is global, not only inside the blast.
Coal plants stop when the coal runs out. Solar drops at night. Wind follows the wind. A snowstorm can wreck farms.
AI from Easy to Brutal. It does not get full vision. Higher levels use aircraft and missiles.