Pac Man App
Try It Now
To play Pac Man right here in your browser, click the link below:
×
Overview
The Pac Man App is an enhanced homage to the classic arcade game. Move Pac Man through a simple maze to eat all the dots while avoiding the roaming ghosts.
Features
- Arrow Key Only: Move Pac Man with your keyboard's arrow keys. Touch devices like smartphones aren't supported.
- Multiple Ghosts: Two ghosts chase Pac Man with basic AI.
- Maze Walls: Navigate around barriers just like the arcade original.
- Score Tracking: Earn points for each dot you consume.
- Pure Client-Side: Built entirely with HTML5 Canvas and vanilla JavaScript.
Purpose
This project demonstrates how Codex can generate an interactive game complete with basic AI and keyboard controls. Everything runs locally in your browser with no backend.
How It Works
- Movement: Pac Man moves one grid cell in the direction of the pressed arrow key, respecting maze walls.
- Ghost AI: Two ghosts attempt to chase Pac Man with a mix of random and directed moves.
- Scoring: Each dot eaten adds to your score, displayed above the canvas.
- Win/Lose Conditions: Clear all dots to win or collide with any ghost to end the game.