Dev Log · Build Notes · July 23, 2026

Circuit Serpent build notes: why snake is still a perfect game

Cabinet five is Circuit Serpent — snake, dressed as a hungry current loose on a motherboard. Snake is nearly fifty years old and still perfect: one rule (eat), one constraint (don't touch yourself), and a difficulty curve you build with your own body. Here's what mattered in our version.

A fixed tick on a variable-frame loop

Modern browsers render at anything from 30 to 120fps, but snake is a grid game — the serpent moves in discrete steps. So the render loop runs at whatever the display gives us, while movement happens on its own fixed timer: an accumulator collects frame time and fires a step every N milliseconds. Eating a packet shrinks N. That separation is why the game feels identical on a 120Hz phone and an old office laptop — and it's the same pattern every serious game engine uses under the hood.

The two-turn input queue

The most common complaint about browser snakes is "it ate my corner." That happens when a game stores only one pending direction: press Up-then-Left quickly and the Left overwrites the Up before the snake ever turned. We queue up to two turns and consume one per tick, so a fast U-turn executes exactly as your fingers typed it. It's five lines of code and it's the difference between a snake that feels obedient and one that feels drunk. The queue also rejects 180° reversals — checked against the last queued direction, not the current one, or a quick double-tap could still fold the serpent into itself.

Swipes with a dead zone

On phones the whole board is the controller: swipe anywhere, and whichever axis moved farther wins. A 24-pixel dead zone keeps taps from registering as turns — the same rule we shipped in Tile Fuse, because it works.

The gold packet is a risk lesson

Plain snake has one dial: hunger. We added a second — a gold packet worth five normal ones that appears rarely and vanishes in five seconds, blinking its last moments away. Every gold spawn asks the same question: is the detour worth the shape it forces your body into? Watching testers, that's where every good run ends — not on the walls, but on greed. That's the design working.

Same glow, greener

The rendering reuses the additive-glow recipe from Nova Strike: pre-rendered gradient sprites stamped in lighter mode for the head, packets and eat-bursts, over a faint circuit-trace grid. One trick worth stealing: the body fades toward the tail by indexing color to segment position, which makes a thirty-segment serpent readable at a glance.

Chase the first packet — and leave the gold alone. (You won't.)


All dev log entries · Play the games