Skip to content

A Pac-Man game implemented using SDL2 library in C++.

License

Notifications You must be signed in to change notification settings

Criheacy/Pac-Man-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pac-Man-icon Pac-Man Game

This a little Pac-Man game implemented using SDL2 library in C++.

简体中文

Features!

In Game:

  • 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!

In Code:

  • 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)

How can I play it?

Just download the release and execute Pac-Man.exe (or Pac-Man in Linux).

How to build the project?

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.