This project is focused on developing a Pac-Man game using the Qt framework. The goal is to create a fully functional game that replicates the classic Pac-Man experience with modern programming techniques.
To set up and run the game, follow these steps:
- Clone the repository.
- Install Qt and Qt Creator from Qt's official website.
- Open the project in Qt Creator and build it.
- Run the executable to play the game.
- Game Logic (Class
Game
): Managed by Person 1. - Player Mechanics (Class
Player
): Managed by Person 2. - Ghost Mechanics (Class
Ghost
): Managed by Person 3. - Map Generation (Class
Maze
): Managed by Person 4. - User Interface (Class
UIManager
): Managed by Person 5. - Audio Management (Class
AudioManager
): Managed by Person 6. - Score Management (Class
ScoreManager
): Managed by Person 7. - Configuration Management (Class
ConfigManager
): Managed by Person 8.
- Initialize and control the main game loop.
- Manage game states (start, pause, end).
- Integrate with the Qt event system.
- Implement movement and animations for Pac-Man.
- Handle collisions with ghosts and collect points.
- Implement special effects like power-ups.
- Implement movement and AI strategies for ghosts.
- Animate and diversify ghost behaviors.
- Handle collisions with Pac-Man.
- Create and load the labyrinth structure.
- Place points and power-ups.
- Handle map collisions and boundaries.
- Create menus, pause, and end-game screens.
- Display scores and statistics.
- Integrate with the main game loop.
- Add sound effects and music.
- Control volume and audio settings.
- Sync audio with in-game actions.
- Responsible for managing game scores, player rankings, and game progress.
- Integration with SQLite:
- Create a SQLite database to store player scores and progress.
- Implement functions to add, retrieve, and update scores in the database.
- Ensure data integrity and handle potential database errors.
- Provide methods for loading and saving game progress.
- Responsible for managing all configuration settings of the game.
- Key Responsibilities:
- Implement a system to store and retrieve game settings (e.g., difficulty level, sound settings, control preferences).
- Provide functionality to save settings to a file and load them at game startup.
- Enable in-game customization of settings through a settings menu.
- Adjust game mechanics and UI elements based on the user's configuration.
- Offer an API for other game components to access and modify settings.
- Follow the coding style guidelines defined in the project documentation.
- Regularly test your code and ensure it integrates smoothly with other components.
- Document your code thoroughly.
Pre-commit is a tool that helps maintain code quality by checking your code before each commit. To set up pre-commit in your project, follow these steps:
- Install pre-commit. You can do this using pip:
pip install pre-commit
-
Add a .pre-commit-config.yaml file to the root directory of your project. You can configure various hooks in this file.
-
Install the pre-commit hooks:
pre-commit install
- If you want to manually run all pre-commit hooks on all files, you can use the following command:
pre-commit run --all-files
This project uses Continuous Integration (CI) to automatically build and test the code in this repository. Whenever a commit is made, the CI process triggers and runs the build and test processes.
To see the results of the CI process, check the Actions tab in this github repository.
This application can be run using Docker. The Dockerfile in the root directory defines the Docker image.
The Dockerfile specifies how to build the Docker image for this application. Here's a brief overview of what it does:
-
FROM
: This line specifies the base image that we're building from. This is usually an image that includes an operating system and some basic software. -
WORKDIR
: This line sets the working directory inside the Docker container. All subsequent commands (likeRUN
,CMD
,ENTRYPOINT
,COPY
, andADD
) will be run from this directory. -
COPY
: This line copies files from the host machine to the Docker image. -
RUN
: This line runs a command in the Docker image. This is usually used to install software. -
CMD
: This line provides defaults for an executing container. This can include an executable, or they can omit the executable, in which case you must specify anENTRYPOINT
instruction.
To build the Docker image, navigate to the directory containing the Dockerfile and run the following command:
docker build -t my-application .
To run the application in a Docker container, use the following command:
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name my_app --rm my-application
- This project is licensed under MIT License.
- Developed by the Pac-Man Qt Project Team.