This is a C++ implementation of the classic Pacman game with an AI component. The game is built using the Qt framework for graphics and user interface.
- Classic Pacman gameplay
- Ghost AI using Floyd-Warshall algorithm for path finding
- Automatic level loading from image files
- Sound effects (not implemented)
- Qt framework (version 5.x or later)
- OpenCV (for image processing).
- Clone this repository to your local machine:
git clone https://github.com/your-username/pac-man-ai-qt.git
- Navigate to the project directory
- Create a build directory:
mkdir build
- Enter the build directory:
cd build
- Run CMake to configure the project:
cmake ..
- Build the project:
make
If the above command doesn't work, you may need to specify the Qt path: cmake .. -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@5
The game controls are as follows:
- [Arrow keys]: Move Pacman
- [Enter]: Start/Pause the game
- [R]: Reset the game
- [D]: Toggle debug mode (display graph nodes and edges)
- [+/-]: Increase/Decrease game speed
This project was created as a part of the Programming Techniques at University of Cassino and Southern Lazio. Special thanks to Alessandro Bria for their guidance and support.