This is a console-based Pac-Man clone developed in C using the Windows API for real-time input handling. The game features player movement, randomized ghost AI, a structured game grid, and interactive gameplay mechanics.
- Real-time player movement using keyboard inputs
- Randomized ghost AI that chases the player
- Structured game grid for movement and collision detection
- Score tracking based on collected pellets
- Color-coded rendering for an enhanced console experience
- Windows OS
- GCC Compiler (MinGW recommended) or any C compiler that supports Windows API
- Clone this repository:
git clone https://github.com/yourusername/pacman-clone.git cd pacman-clone
- Compile the code using GCC (MinGW):
gcc pacman.c -o pacman.exe -Wall
- Run the game:
./pacman.exe
- Arrow Keys: Move Pac-Man up, down, left, or right
- ESC: Exit the game
- Collect all pellets to win
- Avoid ghosts to stay alive
- Gain points by eating pellets
- Survive as long as possible
- Adding power-ups for Pac-Man to eat ghosts
- Enhancing ghost AI for more challenging gameplay
- Implementing a graphical UI instead of a console-based interface
This project is open-source and available under the MIT License.