A classic PacMan style arcade game built using HTML, CSS & JavaScript featuring smooth movement, score tracking, life system and replay functionality.
It focuses on core game logic, real-time gameplay and collision detection without using any external libraries.
- Smooth PacMan movement with keyboard controls
- Ghost enemies with random movement logic
- Wall and food collision detection
- Score tracking system
- Life system with visual indicators (❤️)
- Replay button on game over (without refreshing the page)
- Clean and responsive game loop
- HTML — rendering game graphics
- CSS — basic UI styling
- JavaScript — game logic, movement and collision handling
| Key | Action |
|---|---|
| ⬆️ / W | Move Up |
| ⬇️ / S | Move Down |
| ⬅️ / A | Move Left |
| ➡️ / D | Move Right |
- The game ends when all lives are lost
- A Replay button appears on game over
- Replay resets score, lives and entity positions (players & ghosts) without refreshing the page