Snake
The classic snake game: eat, grow, do not crash.
FAQ
How do I control the snake?
How is the score calculated?
When does the game end?
Where is the best score stored?
Screenshots

How to use
- Pick a speed and start
Choose Slow, Normal or Fast, then press Start. Your snake appears in the middle of the field and the first food lands on a random empty square.
- Steer with keys or swipes
Arrow keys and W A S D both change direction. On a phone, swipe the board or tap the on-screen pad. The snake must finish a square before it can turn again.
- Eat food to grow and score
Each piece of food adds one segment to your snake and 10 points to your score. A new food appears right after. Food never spawns on the snake itself, so every target is reachable.
- Pause or restart anytime
Press Pause, or the space bar, to freeze the game and press again to continue. Restart resets the score to zero and returns the snake to its starting length.
- Avoid walls and your own tail
Hitting the border or biting your own body ends the round immediately. The result screen shows your score for that run and flags a new best when you beat it.
About this tool
Snake grew out of Blockade, an arcade game released by Gremlin in 1976. It spread through countless computer ports, and the version built into the Nokia 6110 in 1997 made it a global phenomenon. The idea is simple: guide a constantly moving snake to eat food, gaining one segment and some points with every bite. Touching a wall or your own body ends the run instantly.
It is a perfect filler game: a round often lasts under a minute, losing costs nothing, and you can retry instantly. Three speed settings let beginners learn the turning rhythm on Slow before moving up. Snake trains hand-eye coordination and route planning, and children pick it up as easily as adults. It fits a short break or a commute on the train.
The numbers behind this build are easy to read. The field is a 20 by 20 grid of 400 cells, and the speed ticks run at 200, 140 and 90 ms per step. Every piece of food pays a flat 10 points and one segment, so speed changes your survival time, never your income. Food lands on an empty cell picked at random, and the picker skips squares the body occupies, so every bite stays reachable.
How it works
The snake is a queue. The head enters a new cell each step, the tail leaves it, and only eating keeps a segment alive. One structure explains two rules. Biting your own body loses, because every cell in the queue is still active. Food always lands on an empty square, because the spawn step skips cells the body occupies. The format descends from Blockade, an arcade game from 1976. The original was a two-player standoff where each snake walled the other in. The solo eat-and-grow version that conquered phones came later.
The advanced habit is looping, not chasing. Hug the walls and walk a fixed circuit, pick up food when the route passes it, and wait a lap when it does not. The body then always keeps open space for turning. Longer snakes leave fewer free cells, so the endgame becomes a coverage problem. A Hamiltonian cycle in graph theory is the same idea. Plan one fixed route through every cell, and the snake can survive until it almost fills the board.
Speed here is a real variable, not a cosmetic one. Dropping from 200 ms to 90 ms per step nearly halves the thinking window. That is why veterans relearn their rhythm when they switch tiers. The 400-cell board sets the endgame clock. Past 100 segments a quarter of the floor is gone, and looping circuits become the only safe shape. Runs start with 3 segments near the centre, so the first dozen turns are almost free, and the real test begins near 20. The best score is a single number stored locally under the key t55k6-snake.
When to use it
- A one-minute decompressor
A slow run lasts well under a minute, and a crash costs nothing but an instant restart. Play one while waiting for a kettle or a download: it keeps your fingers busy without taking your full attention.
- A reflex warm-up
Turning one or two squares early trains the habit of acting before the threat shows up. The three speed tiers scale cleanly, so a few fast runs make a compact warm-up before work or a workout.
- Explaining risk to kids
The whole rule is two sentences: eat to grow, crash to lose. Young children pick it up at once, and the growing body makes risk rise with reward, a neat first lesson in trade-offs.
- A speed-tier feel test
Slow ticks at 200 ms per square and fast at 90. Warm up two rounds on slow, switch to fast, and your muscle memory fails immediately, which makes this a neat focus check.
Tips & tricks
- Hug the outer walls and loop around the edge, leaving the open middle as room to turn.
- Turn one or two squares early; at higher speeds reacting only when danger is visible is usually too late.
- Do not chase food that sits beside your body; loop away and straighten the snake, because shorter snakes are far easier to steer.
- Fast speed gives you about 90 ms per square, so plan two or three squares ahead. Waiting until you see the wall is already a crash.
Things to watch
- Turning too late
The snake finishes a cell before it can turn again, so a late key press is already a collision. At fast speed, watch one or two squares ahead and commit the input early.
- Chasing wall-side food
Food against a wall or beside your body often has no straight path home. Loop away first, straighten the snake, then approach from the open side, especially once your body has wrapped a full circle.
- Maxing speed too soon
Fast speed demands early inputs that beginners have not built yet, so failures multiply. Learn the loop habit on Normal first, then switch to Fast to challenge timing instead of panic.
- Chasing food blindly
Food always lands on an open square, so a route exists; the question is whether it is safe right now. Scan your body line before each chase, loop wide to straighten out, and never dive into a pocket you built yourself.