DEVLOG · THE STORY OF NOV 2026 · WRITTEN 5 DEC 2026
How we run online races for every game on one small server
Every online game on ShootShootBang talks to the same server program. It runs on one small rented cloud machine with 2 CPU cores and 4 GB of memory, for a flat monthly price. This post explains the rules that make that possible, and the tricks that keep races smooth when we ship an update.
One program, one small machine
Our online games are Turbo Clash, Bang Paws, the Arena, BANG WORLD, UFO Parking, Gem Quake duels, Tiny Heist and a few more. All of them connect to one Node.js server over WebSockets. Each game has its own path on that server, so one program can host a race, a duel and a co-op room at the same time.
A Node.js process does its game work on one CPU core. So the busiest games get their own process: one for Turbo Clash, one for Bang Paws, and one for everything else. A small web server in front sends each game's traffic to the right process. The address the games use stays the same.
The address is on our own domain, never a hosting company's name. If we ever move to a different machine, we change one DNS record. No game has to be rebuilt.
Rule one: no other human, no server
The cheapest message is the one we never send. If you play alone, or against bots, the whole game runs on your own phone or computer. The server is only for rooms with real people in them: a friend invite, a room code, or matchmaking that actually found another player.
Turbo Clash is the model for this. When you press PLAY, the game asks the server if another human is waiting. If nobody turns up within five seconds, you race bots on your own device and the connection closes. Your very first race skips the search and goes straight to the grid. The server itself refuses to start any room, public or private, with fewer than two humans.
We also never open a live game connection before you choose something online. Opening the home page or a game page does not start one, and there are no site-wide calls to wake the server up when a page loads.
Sending as little as possible
In an online Turbo Clash race the server owns the race. It runs the same race code the solo game uses, in fixed steps of 33 milliseconds, with up to six cars. Empty seats are filled by bots. Your game sends only the keys you are holding, when they change, plus a small keep-alive. The server sends back the state of the race every 50 milliseconds.
Your own car is predicted on your device, so it reacts to your thumb at once. The other cars are smoothly drawn between updates. Most updates describe each car only by how it changed since the previous update. Every twentieth update is a full keyframe that also repeats the race's fixed details, so a player who lost a few packets catches up within a second.
On top of that, every message of 200 bytes or more is compressed before it leaves the server. We measured one Turbo Clash racer at about 809 KB per minute before compression and about 195 KB per minute on the wire. That is roughly four times less traffic for the same race.
Some things cost nothing at all on the network. When a car loses armour, parts of its bodywork break off. Every player already knows each car's armour, so every screen works out the same broken parts by itself. No extra message is needed.
Measuring what each game really sends
Every connection is counted under its game. The server records how many bytes each game sends before compression and how many actually go out on the wire, this hour and the last. A private health page shows the numbers, so we can see which game is the expensive one instead of guessing.
Connections that do nothing are closed. If a player has not steered, aimed or clicked for ten minutes, the socket closes. A Turbo Clash player whose tab sits in the background for two minutes in the lobby or on the results screen is let go too. A forgotten tab should not cost anything.
We also found that many races ended with only one human left: two players were matched, and one of them quit. The server kept running the whole race for the one who stayed. Now, when a public race is down to one connected player for a few seconds, the server sends that player the whole race in one message of about 19 KB, around 4 to 7 KB after compression. The player's device carries on the same race, with the same positions and damage, and the server stops. Friend rooms are never handed over.
When the server gets busy
Each game process checks itself every five seconds: how busy its thread is, and how late its timers fire. Late timers are what players feel as lag. If a process stays too busy for ten seconds, it stops opening new public rooms first. Players who press PLAY then race bots on their device and still get a game. Friend rooms keep working.
Only if things get much worse are new friend rooms refused too, with a clear message to try again in a minute. Races that are already running never stop, and joining a room that already exists always works. Each level steps back down after ten calm seconds.
An outside monitor checks the server every five minutes and emails us if it stops answering. A second check fires if, for three of the last five minutes, the game loop runs 40 ms late, the CPU is at 75 percent or more, memory is 85 percent full, or the disk is 90 percent full. One short spike does not wake anyone up.
Updates that do not drop a race
A plain restart ends every race in progress. That felt bad, so Turbo Clash and Bang Paws now use what we call drain deploys. The new version starts next to the old one. We wait until it answers its health check with the new version number. If it never does, it is stopped and the old one keeps serving.
When the new version is healthy, new players are sent to it. The old process is told to drain. Every race already running plays to the finish and shows its results as usual. Then each room is handed to the new process with the same room code and the same players, and their games reconnect by themselves. The old process exits when it is empty, or after eight minutes at the latest.
The other games still restart on a deploy, and their players reconnect within a few seconds. Deploys run automatically when we push to our main branch, and they roll back by themselves if the new version does not start.
The honest limits
This setup is cheap and simple, but it has limits. The machine is in Europe. Players far away get more delay: roughly a tenth of a second extra from the US East Coast and about a quarter of a second from Asia or Australia. If one region grows a lot, we will add a server there.
Synthetic test players on our own computers are useful, but they are not proof of how a real phone on a real mobile network behaves. We measure each online feature in kilobytes per minute per player before we ship it, and we keep watching the real numbers after.
Play our games free at shootshootbang.fun · Game guides · About us