A modern, high-performance C++ implementation of the classic Pac-Man arcade game with advanced AI and stunning OpenGL graphics.
- Authentic Pac-Man Experience - Navigate mazes, collect dots, avoid ghosts
- Perfect Collision Detection - Bulletproof wall collision system
- Smart Movement Controls - Intelligent direction changes prevent getting stuck
- Power Pellets - Turn the tables and chase the ghosts!
- 4 Unique Ghost Personalities:
- Blinky (Red) - Aggressive direct pursuit
- Pinky (Pink) - Strategic ambush tactics
- Inky (Cyan) - Complex patrol patterns
- Clyde (Orange) - Unpredictable behavior
- Multiple Pathfinding Algorithms - Dijkstra, A*, and Backtracking
- Dynamic AI - Ghosts adapt to your playstyle
- OpenGL-Powered Graphics - Hardware-accelerated rendering
- Particle Effects - Beautiful visual feedback for game events
- Smooth 60 FPS Gameplay - Fluid character animations
- Classic Aesthetic - Faithful to the original Pac-Man design
- Progressive Difficulty - Increasingly challenging levels
- Multiple Lives System - Visual life indicators
- Power-Up Mechanics - Temporary ghost vulnerability
- Level Progression - Complete mazes to advance
- C++17 compatible compiler (MSVC, GCC, Clang)
- CMake 3.10+
- OpenGL 3.3+
- GLFW3 and GLEW libraries
# Clone the repository
git clone https://github.com/Dhuvie/Pac-man.git
cd Pac-man
# Build using the provided script
build.bat
# Or build manually
mkdir build && cd build
cmake ..
cmake --build . --config Release
# Run the game
cd Release
Pacman.exe# Clone the repository
git clone https://github.com/Dhuvie/Pac-man.git
cd Pac-man
# Build the project
mkdir build && cd build
cmake ..
make
# Run the game
./Pacman| Action | Keys |
|---|---|
| Move | Arrow Keys or WASD |
| Start Game | Enter |
| Pause | P |
| Exit | Escape |
- C++17 compatible compiler (MSVC, GCC, Clang)
- CMake 3.10+
- OpenGL 3.3+
- GLFW3 and GLAD libraries
# Clone the repository
git clone https://github.com/Dhuvie/Pac-man.git
cd Pac-man
# Build the project
mkdir build && cd build
cmake ..
cmake --build . --config Release
# Run the game
./Release/Pacman.exe # Windows
./Pacman # Linux/Mac# Use the included batch file
build.bat Pac-Man Game
├── Game.cpp/h # Main game loop & state management
├── Player.cpp/h # Pac-Man character & controls
├── Ghost.cpp/h # AI behaviors & pathfinding
├── Maze.cpp/h # Level layout & collision detection
├── Renderer.cpp/h # OpenGL rendering & effects
├── ParticleSystem.cpp/h # Visual effects system
├── ResourceManager.cpp/h # Asset management
├── Shader.cpp/h # OpenGL shader handling
└── shaders/ # GLSL shader files
- Modern C++17: Clean, object-oriented design
- High Performance: Optimized rendering and game logic
- Bulletproof Collision: Perfect wall detection system
- Advanced AI: Multiple pathfinding algorithms
- Visual Effects: Particle systems and smooth animations
- Resource Management: Efficient asset handling
- Cross-Platform: CMake build system
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use the Issues tab to report bugs
- Include steps to reproduce and system information
- Suggest new features via Issues
- Describe the use case and expected behavior
This project is licensed under the MIT License - see the LICENSE file for details.
- Namco - Original Pac-Man creators (1980)
- OpenGL Community - Graphics libraries and documentation
- C++ Community - Modern C++ best practices
- Game Development Community - Inspiration and techniques
- Language: C++17
- Graphics: OpenGL 3.3+
- Build System: CMake
- Lines of Code: ~3000+
- Development Time: Intensive optimization and polish
⭐ Star this repository if you enjoyed the game! ⭐