• Atom Reaction
  • How to play
  • Strategy
  • Videos
  • Shorts
  • Tdm
  • Drills
  • Chess
  • About me
  • Projects
  • Social Medias
    • Instagram
    • YouTube
    • Twitter
  • Games
    • Dice Chess
    • Ultimate Tic Tac Toe
    • Atom Reaction

    • About the games
  • Coding
    • Resume
    • LeetCode
    • Codechef
    • CodingNinjas
โ–S๐’Š๐’๐’†๐’๐’•ใ€…๐’Œ๐’Š๐’๐’๐’†๐’“เฟ

Atom Reaction rules, strategy guides and free browser games, plus gameplay videos and projects by Swapnil Shah.

Connect with me
  • Instagram
  • YouTube
  • Twitter
  • Contact Me

    silentkillerop123@protonmail.com

    How to playStrategyGamesProjectsAboutContactPrivacy PolicyTerms
    ยฉ 2026 Copyright: silentkillerop.me

    Behind the game ยท by Swapnil Shah ยท 23 November 2026

    Backend challenges we faced and how we fixed them

    Building a game server is one thing, keeping it healthy once strangers use it is another. These are the real problems I hit after launch and how I fixed them.

    Challenge 1: a chain reaction that never ended

    In Battle Royale mode, when the outer ring of the board collapsed, I found positions where explosions could bounce back and forth forever. The server kept resolving waves and never finished, which froze the room.

    The fix was two guards: loop detection that notices when the board repeats a state, and a hard cap of 200 waves per move. If either triggers, the game ends and the winner is decided by orb count, with the reason shown to players. I also changed the collapse rule so it never triggers a chain by itself, which removed the root cause.

    Challenge 2: players with no legal move

    Occasionally a player had no legal move at all, and the turn logic waited for a move that could never come. Now the server detects that and eliminates the stuck player so the game continues. A related bug was a collapse that removed every remaining player, where the server used to invent a winner. The game now ends cleanly with no winner and says so.

    Challenge 3: abuse and floods

    Anything on the public internet gets hammered. I added per-address rate limits on creating rooms and joining them, a limit on request body size, and a limit on chat speed. Rooms that nobody uses are cleaned up, and the total number of rooms is capped.

    I also moved the login token for the WebSocket from the URL into the first message, so it does not end up in logs, and restricted which websites may call the API.

    Challenge 4: locking the server down

    I run the game in a container with as little power as possible: it runs as a non-privileged user, the code is read-only, extra capabilities are dropped, memory and process counts are capped and the logs rotate. The API documentation pages are turned off in production.

    On top of that the server sends strict security headers, including a content security policy that only allows scripts with a per-response nonce. That kills a whole class of injection attacks.

    Challenge 5: caching without stale pages

    Hashed asset files are cached for a year, because their names change when their content does. The main HTML page is never cached, so players always get the latest version. Small files like the manifest and robots file are cached for a short time and revalidated. Getting this right made repeat visits fast without ever serving an old game.

    The lesson

    Almost every one of these problems was invisible in testing and obvious in production. The most valuable habit I built was to log structured events for everything unusual, so that when something strange happened I could see exactly what the server did.

    Put it into practice โ†’

    More Atom Reaction guides

    • How to play: The complete rules, critical mass numbers and a worked example of a chain reaction.
    • Strategy guide: Ten practical tips for the opening, middle game, endgame and Battle Royale.
    • Game modes: Online rooms, bots, pass and play, daily puzzle and Battle Royale explained.
    • FAQ: Quick answers about players, bots, accounts and installing the game.
    • Opening moves: Where to place your first orbs and what to avoid in the first five turns.
    • Corner strategy in Atom Reaction: Why corners are the strongest cells and how to build chains out of them.
    • Common Atom Reaction mistakes: Seven mistakes that cost new players games, with a fix for each.
    • Beating the Atom Reaction bots: How each bot level thinks and the habits that beat them.
    • Multiplayer tactics for Atom Reaction: Target selection, kingmaking and surviving a crowded board.
    • Battle Royale survival guide: How the shrinking board works and how to be the last one standing.
    • Two player strategy for Atom Reaction: Tempo, forcing exchanges and corner control in head-to-head games.
    • Reading the board in Atom Reaction: A simple scan routine to spot threats and chains before they happen.
    • Trap patterns in Atom Reaction: The decoy corner, the delayed fuse and the forced capture.
    • Endgame guide: Count orbs, keep reserve moves and finish the last opponent.
    • Choosing the right board size: How the grid size changes pace, tactics and player count.
    • Reviewing your games to improve: Using replay and post-game review to find the move that lost the game.
    • Hosting a game night: Rooms, invite links, spectators, chat and keeping everyone engaged.
    • Playing on your phone: Install it, switch on lite mode and get turn alerts on any phone.
    • How the Atom Reaction backend was built: FastAPI, WebSockets, in-memory rooms and a chain-resolving game engine.
    • Frontend challenge: why phones got hot and how we fixed it: Cached sprites, frame pacing and lite mode to cool down phones.
    • Making multiplayer reliable: reconnects and dropped connections: Automatic reconnect, seat recovery and bots that cover for dropped players.
    • How the Atom Reaction bots were built: Alpha-beta search, web workers and the experiments that surprised us.
    • Saving games to a database without slowing play: A sleeping PostgreSQL database, background queues and privacy purges.