Simple Snake game in plain JavaScript.
Option 1 (quick):
- Open
index.htmlin Safari or Chrome.
Option 2 (recommended):
- In Terminal, open this folder.
- Run:
python3 -m http.server 8000
- Open http://localhost:8000 in Safari or Chrome.
- Arrow keys
W,A,S,D- Choose level:
Easy,Medium,Hard - Click
Start / Restartto begin a new game.
- Easy: 420 ms/tick
- Medium: 280 ms/tick
- Hard: 190 ms/tick
- 8-Bit Soundtrack: A Super Mario Bros. inspired background track plays automatically when the game begins.
- Speed Boost: Increases movement speed by 10% for every 5 apples eaten. (Can be toggled off via checkbox)
- AI Bot Opponent: An enemy orange snake spawns once you reach a score of 5. The bot competes with you for apples using greedy pathfinding. You lose if you crash into the bot. If the bot crashes, it respawns in the corner. (Can be toggled off via checkbox)
- Works without frameworks or build tools.
- High score is stored in browser local storage.