Computer Graphics coursework, recreating Pac-Man in C++ from OpenGL first principles. For more info, please refer to the project report.
There are a couple of dependencies required to compile and run the project.
- C++ v11+ previous versions do not support some parts of the code
- libpng enables use of PNG sprites within the game
The project was developed on Windows, requiring MinGW (or another UNIX-like terminal environment) to both compile and run. To compile the project:
make -f Makefile.windows pacman
A slightly modified Makefile is required to compile on Linux:
make -f Makefile.linux pacman
Alternatively, a symbolic link can be created to the Makefile, removing the need to type -f Makefile.foo every time the project is compiled:
ln -fs Makefile.foo Makefile
Replace foo with windows or linux depending on the compiling OS. The project can then be easily compiled using:
make pacman
The flag -B forces a recompile, if required:
make pacman -B
Once the code is compiled, the game is started using the same command on all systems.
./pacman
- The game is controlled by keyboard input only:
- Arrow keys to move
- ESC key to pause game and view help screen
- Any key from pause screen to resume
- ESC key from pause screen to quit
- Any key from game over screen to restart
- Don't let the ghosts catch you or you'll lose a life
- Gobble pills and fruits to increase your score
- Eat big pills to scare the ghosts, then you can consume THEM - every ghost you eat before the timer runs out increases the score multiplier
- Eat all the pills to advance to the next level
- When you have no lives left, the game is over and your highest score is saved to a file
I don't own, nor claim to own, Pac-Man.
This project surmised a piece of university coursework which I'm pretty proud of.