Snake Game
Play the classic Snake game in your browser with smooth canvas rendering, keyboard controls, and mobile touch support.
How to Use Snake Game
Click the Start Game button or press any arrow key to begin. The snake starts moving immediately.
Use the arrow keys (↑↓←→) or WASD on desktop. On mobile, use the on-screen direction pad below the game.
Guide the snake to the red dot. Each food eaten grows the snake by one segment and adds to your score.
The game ends if the snake hits a wall or its own body. The longer the snake, the harder it becomes.
Your best score is saved in your browser. Try to beat it each session!
Features & Benefits
Keyboard & Touch
Full keyboard support (Arrow keys, WASD) on desktop plus on-screen d-pad for mobile and tablet play.
High Score
Your personal best score is saved locally in your browser and persists between sessions — no account needed.
Pause & Resume
Pause the game at any time and continue exactly where you left off. Press P or the Pause button.
Smooth Performance
Rendered on HTML5 Canvas using requestAnimationFrame for consistent 60 fps gameplay on all devices.
About Snake Game
The History of Snake
The Snake concept originated in arcade machines in the late 1970s with the game "Blockade" (1976, Gremlin Industries). It became globally famous when Nokia pre-installed Snake on the Nokia 6110 mobile phone in 1997. Since then it has become one of the most-played casual games in history, appearing on billions of devices and spawning countless variations.
Snake Game Mechanics
The player controls a snake that moves continuously around the game area. Each food item consumed grows the snake by one segment and adds to the score. The game ends when the snake collides with the boundary walls or its own body. As the snake grows longer, available space decreases and the game becomes progressively more challenging.
Strategy for High Scores
- Wall-hugging — Moving along the walls creates predictable paths and keeps the centre open
- Spiral technique — Advanced players spiral inward to fill space systematically
- Look ahead — Always consider where the snake will be in 3–5 moves, not just the next move
- Avoid corners — Corners dramatically limit escape options as the snake grows
- Chase efficiently — Take the shortest safe path to food rather than chasing directly
Variations and Modern Adaptations
The Snake concept has evolved into numerous modern games: multiplayer snake games like Slither.io, 3D snake games, snake games with power-ups and obstacles, and even AI-controlled snake demonstrations. The simple mechanics make it an ideal beginner programming project for learning game loops, collision detection, and canvas rendering.
Frequently Asked Questions
This version supports keyboard (Arrow keys and WASD) and mobile touch via the on-screen d-pad. Gamepad API support is not included in the current version. For desktop play, keyboard controls are recommended for the fastest response time.
Your high score is saved using the browser's localStorage, which persists between visits on the same device and browser. Clearing your browser data or switching browsers will reset the high score. Scores are not sent to any server.
Yes. The snake speed gradually increases as your score grows, making the game progressively more challenging. The speed increase is subtle at first but becomes significant at higher scores.
Pressing the directly opposite direction (e.g., pressing Left when moving Right) is ignored to prevent the snake from instantly hitting itself. This is standard snake game behaviour — you cannot reverse direction in one move.