A classic PacMan arcade game implementation using HTML Canvas and JavaScript. The game involves controlling PacMan to collect all dots while avoiding ghosts that use intelligent pathfinding.
- Classic PacMan gameplay
- Intelligent ghost AI with pathfinding
- Power dots that allow PacMan to eat ghosts
- Score tracking and lives system
- Dynamic difficulty scaling - ghosts become smarter as you collect more dots
- Win and loss conditions with game restart option
- Clone the repository or download the project files.
- Open
index.htmlin a web browser to start the game.
- Arrow Keys: Move PacMan (Up, Down, Left, Right)
- Click anywhere to restart the game after winning or losing
- Collect all dots to win the game
- Avoid ghosts or lose lives when they catch you
- Eat power dots to temporarily turn the tables on ghosts
- The difficulty increases after collecting 120 dots (ghosts become more aggressive)
- Game ends when all dots are collected (win) or when all lives are lost (lose)
- HTML5 Canvas
- JavaScript (ES6)
- A* pathfinding algorithm for ghost AI
Enjoy the game!