Snake — Classic Arcade

Eat apples, grow longer. Avoid walls and yourself. Use arrows or WASD. Touch controls shown on mobile.

0
Score
0
High Score
1
Length
1x
Speed
Controls: Arrow keys or WASD
Ready
Press Start to play
Built for GitHub Pages
File: index.html

How to play

  1. Start the game and steer the snake to eat apples.
  2. Each apple increases your length and score.
  3. Don't collide with walls or the snake's body.

Tips

  • Use the speed slider for more challenge.
  • On mobile, use on-screen buttons below the controls.
  • High score is saved in your browser.

GitHub deployment

To host on GitHub Pages:

git init
git add index.html
git commit -m "Add Snake game"
git branch -M main
git remote add origin <your-repo-url>
git push -u origin main

Then enable GitHub Pages in repository settings and set site to serve from main branch (root). The game will be available at https://<username>.github.io/<repo>.

Credits & License

This single-file game is provided under the MIT License. Use freely and modify as you like.