Start moving and watch the whole snake
Select Play Now, then Play Game inside the player. Choose a direction to begin moving. Use the arrow keys or W, A, S, and D on a keyboard; touch players can use the on-screen direction buttons. Space pauses or resumes the game, and the center pause button provides the same control on a touchscreen.
Eating food makes the snake longer. The head keeps moving in its current direction until you turn, and hitting a wall or your own body ends the run. You cannot reverse directly into the segment behind the head. After a collision, use Play Again? to start another attempt.
Plan the exit as well as the food
Before heading toward food, check how you will leave that part of the board. A short route can trap the head inside a loop of its own body. Keep a wider open area available and turn early enough to avoid running into the boundary.
As the body grows, follow its movement rather than treating every occupied cell as permanently blocked. A route that is closed now may open as the tail advances, but cutting across your body too soon ends the run. Use a lower difficulty to practice deliberate turns before choosing a faster setting; the player starts on Medium and offers five selectable modes.
Plan moves without a timer in 2048 · Try rotating color groups in Hextris · Browse the game collection
JavaScript Snake credits and source
Patrick Gillespie created the JavaScript-Snake project under the patorjk account. This hosted edition uses that project with local presentation adjustments and touch controls. The upstream repository, source for this hosted version, and retained MIT license are linked below.
Patrick Gillespie's JavaScript Snake source · Download this version's source · Read the Snake MIT license
Controls and quick steps
- 01Load the board
Select Play Now, then use the game’s start control.
- 02Guide the snake
Use arrow keys or the on-screen direction buttons to steer toward food.
- 03Leave an escape route
Avoid the snake’s body and the edges. Restart after a collision to begin another run.
Open-source game, hosted here with local integration changes. License: MIT. Download the hosted game source. The original author retains the game credit.
Game by Patrick Gillespie / JavaScript Snake ↗. This is an independent game and guide site. Cover artwork is an original illustration.
