- Tiny Arcade
- Snake
Snake
The original grow-and-don't-crash game. Eat food, wrap at the edges, and keep the tail off your own head.
Press Space to start or restart.Tap a direction to start, or use Restart.
The rules
Snake is a game of incremental pressure. The snake moves continuously in one direction, and you can only turn — never stop and never reverse. Each piece of food makes the snake one segment longer and ten points richer, so the board becomes more crowded the better you play.
Two rules define this particular version. The board wraps: leaving the right edge brings you back on the left, which makes escape routes available where other versions would kill you. And the run ends on self-collision: if your head enters a cell your body already occupies, the game is over.
Controls
| Arrows / WASD | Change direction (forward, left or right) |
|---|---|
| Space / Enter | Start, or restart after a game over |
| Touch | On-screen direction buttons |
Strategy
The reliable way to score is to keep the snake folded into a compact shape and travel in long loops rather than chasing food across the board. Because the board wraps, a lap around the perimeter is always safe as long as your body does not already sit on that lane. Speed increases every forty points, so the main threat later is your own reaction time rather than the board filling up.
Notes on the implementation
The board is twenty cells by fifteen. Input is buffered one turn deep, so a fast double-tap around a corner registers both turns instead of dropping one. The collision test excludes the tail cell, because it moves out of the way on the same tick — without that exclusion the snake would die into its own moving tail. The game advances on a fixed 60 Hz timestep with the snake's own movement rate on top, so it plays the same on a 60 Hz and a 120 Hz display.