Skip to content

alessiopittiglio/pacman-ai

Repository files navigation

Pacman AI

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.

Features

  • Classic Pacman gameplay
  • Ghost AI using Floyd-Warshall algorithm for path finding
  • Automatic level loading from image files
  • Sound effects (not implemented)

Requirements

  • Qt framework (version 5.x or later)
  • OpenCV (for image processing).

Installation

  1. Clone this repository to your local machine: git clone https://github.com/your-username/pac-man-ai-qt.git
  2. Navigate to the project directory
  3. Create a build directory: mkdir build
  4. Enter the build directory: cd build
  5. Run CMake to configure the project: cmake ..
  6. 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

Usage

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

Acknowledgments

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.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published