This a little Pac-Man game implemented using SDL2 library in C++.
- Use the up, down, left and right arrow keys on the keyboard to control the character (the "pac-man"). Eat all beans on the screen while avoiding the chase of little ghosts, and the "Power Pellet" may save your life in danger!
- Don't forget to eat special food for bonus. The harder the level, the higher the bonus score!
- All textures in the game are 8-bit pixel style (can be found in here), which simulates the poor hardware conditions clever solutions of Pac-Man games of the last century.
- The ghosts AI and game mechanics is similar with that of the original version. It’s an excellent cooperation strategy of enemies, only use very simple algorithm but makes the ghosts chasing the Pacman efficiently. (rendered in debug mode with Gizmos on)
Just download the release and execute Pac-Man.exe
(or Pac-Man
in Linux).
First, you have to make sure that you have installed SDL2 and SDL2-image libraries.
For Linux users, you can installed it with sudo apt-get install libsdl2-dev libsdl2-image-dev
. Just one line is enough.
For Windows and Mac users, download Development Libraries from SDL2 website, set system path and configure you IDE. SDL2-image library is similar. For more information, just follow Lazy Foo's Tutorial.
After SDL2 is installed, use cmake to build this project.
For Linux users, execute following commands in your working directory:
mkdir build
cd build
cmake ../src
For Windows users, just build it in your IDE, it will automatically configures for building project.