← Back to Blog

Dev Blog · June 24, 2026

Snake Maze: Adding Real Walls Changed Everything

Open-grid snake has a well-known ceiling problem. Once a player learns to coil efficiently — spiraling inward from the outer edge — the game stops being about decisions and becomes a patience exercise. The snake can grow to fill almost the entire grid without any real danger as long as the player stays methodical. I knew this going in and decided to add internal maze walls to make the routing genuinely hard again. It worked better than I expected, mostly because of an effect I hadn't anticipated.

The Wall Structure

The maze uses a cross-shaped barrier layout on the 20×20 grid. Two horizontal walls span the full width at rows 5 and 14, each with a single-cell gap at column 10. Two vertical walls run between those horizontal walls at columns 5 and 14, each with a gap at row 10. The result is five distinct zones: a central cross corridor that is always open, and four enclosed corner sections accessible only through the corresponding single-cell gap.

The snake still wraps around the outer edges, which turned out to be an important decision. The wrap-around creates unofficial routes between zones: a snake in the top-left corner can exit through the top edge and reappear in the bottom-left — effectively bypassing the horizontal wall. This means experienced players have routing options that aren't obvious to beginners, which creates a skill gap without adding arbitrary complexity.

The Effect I Did Not Expect

The single-cell gaps are the interesting part. In open-grid snake, every cell is equally accessible, so you never have to think about corridors or bottlenecks. With the maze, every gap is a one-cell chokepoint: the snake can only pass through them single-file. A snake that is 12 cells long entering a corner quadrant through the column-5 gap at row 10 will have 12 cells of body trailing through that gap. To exit the same way it came in, the head must navigate around the quadrant and return to the gap opening — but the tail is still occupying several cells of the corridor.

This is the trap players walk into: they follow food into a corner quadrant, the body blocks the exit gap, and there is no alternative route out. On an open grid this never happens because exits exist in every direction. The maze makes it happen repeatedly until players learn to count body length before entering a tight space.

Food Placement and Zone Balance

Food can spawn in any open cell — which means it can appear inside any of the five zones, including corner quadrants. Initially I considered restricting food to the central corridor to keep the game accessible, but playtesting made it clear that corner food is more interesting, not less. When food appears in a corner quadrant, the player has to decide whether the snake's current length makes it safe to enter and exit. At short lengths the answer is almost always yes. At long lengths, entering a corner for food can be a gamble with no good exit.

This creates a natural risk-reward calibration that scales with the snake's length rather than with an explicit difficulty setting. The game gets harder as you get better at it, which is the right relationship between player progress and challenge.

Speed and the Maze

The snake speeds up as the score increases, which was already true of the open-grid version. What changed is how speed interacts with the maze. At low speed, players have time to plan a route through the gaps. At high speed, they react to immediate threats — and reacting to immediate threats in a maze environment means sometimes turning directly into a wall before realizing the planned route was a dead end. High-speed failure in the maze feels fair in a way that high-speed failure in open-grid snake doesn't: there was a decision that led to it, even if the decision had to be made a fraction of a second earlier than the player would have preferred.

Play Snake Maze