๐Ÿ Snake AI

A classic Snake game featuring a modern JavaScript implementation. It includes both a manual gameplay mode and an advanced AI bot (using BFS & Flood Fill algorithms) to control the snake.

Features

  • Dual Modes: Manual player control (WASD/Arrows) and an autonomous AI-controlled mode.
  • Advanced Bot: Utilizes the Breadth-First Search (BFS) algorithm to locate food quickly and Flood Fill to avoid getting trapped.
  • Score & High Score: Tracks your current score and persists your high score using the browser's localStorage.
  • Sound Effects: Simple audio cues for eating and Game Over states (powered by the Web Audio API).

How to Play

  1. Open the game in your browser.
  2. Select a mode:

    • Click PLAY GAME to play manually (PLAYER mode).
    • Click WATCH BOT to watch the AI play (BOT mode).
  3. Controls (PLAYER mode):

    • Use Arrow keys or WASD to move.

Tech Stack

  • HTML5 Canvas
  • Vanilla JavaScript (no external libraries)
  • Web Audio API for sound effects

Updated 9 days ago
StatusReleased
PlatformsHTML5
AuthorSAMI RAUTANEN

Leave a comment

Log in with itch.io to leave a comment.