How Neon Brawlers stays fair at a quarter-second of lag
Neon Brawlers is a fighting game for two to four players on phones. I've paused work on the game itself, but its online side is finished and tested. It's the part I learnt the most from, so this page shows how it works and how it held up.
Game on hold · netcode finished and tested
[CAPTURE] Core Rush, four players onlineHow it works
The server runs the real game. Phones send what the player pressed, and the server sends back what happened. The trick is hiding the time that takes.
Pick a lag level
I tested full matches through a lag simulator that adds delay, ±15 ms of jitter and 1% packet loss. Eight matches ran at each level.
With 250 ms ± 30 ms and 3% loss, full matches still ended with matching game states.
A real match over the internet
Two PCs in Pakistan played a full match (5,441 ticks) on the live server in Germany. Ping sat at 143 to 156 ms, with one real spike to 296 ms.
- Other fighters never froze, and moved with under a third of a pixel of jitter.
- Updates averaged 338 bytes. Each phone downloads about 7 KB a second.
- Both players' games ended on the server's exact state.
When the connection breaks
- Connection drops
- Reconnects by itself in 252 ms.
- 3 s of silence
- A bot holds your seat after 1 second. You're back in control 632 ms after the signal returns.
- App closed
- A bot takes over after 1 second. You're back in the match 538 ms after reopening the app.
How I tested and shipped it
- A lag simulator that adds delay, jitter and packet loss on demand.
- Headless bot players that check the final game state against the server.
- Two-window playtests that measure input delay and can cut the signal or kill the app.
- One script builds the Linux server and smoke-tests it; another deploys it with a health check and automatic rollback.
Not tested yet
Many rooms at once. My estimate is about 13 CORE RUSH matches per CPU core, but I haven't run a load test. I also haven't timed the netcode on a real phone yet.
Fresh Powder's server re-runs every sled run through the game's own simulation before it counts. That's this idea again.
Next stop: Fresh Powder