Snake
Classic Snake on a 15 × 15 grid. Eat, grow, and don’t run into the wall or into yourself.
Tokens: — Today: — Locked: —
How to play
- Steer with the arrow keys or WASD. On a phone, swipe or use the pad under the board.
- Each piece of food is a point, and makes you one cell longer.
- After a game over, press R, tap the board or use Play Again. Esc or Exit leaves the game.
How it's built
Snake moves on a fixed step, one cell every 180 ms, rather than on every animation frame. A grid game has nothing to do sixty times a second, so it doesn’t try.
Turns are buffered: a key sets the next direction and the next step applies it. A reversal is checked against the way the snake is actually moving, not the last key pressed, so two quick turns can’t fold it back into itself.
New food is placed by picking random cells until one isn’t under the snake.
Canvas 2D · no game engine · How the arcade was built