catidiana / pacman

Reacreation of Pac-Man classic game
GNU General Public License v3.0
2 stars 4 forks source link

Recreating Pac-Man

Building

To build this project you'll should use the following tools:

You'll also need the libraries SDL2, SDL2 Image and SDL2 Mixer: https://www.libsdl.org/

Installing Build Tools on GNU/Linux

On a Debian based system you may use the following command to install everything needed to build the game:

sudo apt-get install g++ make pkg-config libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev

Installing Build Tools on Windows

First download and install MSYS2: https://www.msys2.org/

Start C:\msys64\mingw64.exe and use the following command to install everything needed to build the game:

pacman -S mingw-w64-x86_64-{SDL2,SDL2_image,SDL2_mixer,pkg-config} make

Compiling

After install the build tools, you can go to the project directory and use the make command (where the Makefile is) to compile the game. After compiling you can run the game by typing: ./pacman

Screenshot-(98)

Gameplay

There are 240 dots on the field. Level is finished when Pacman eats all the dots. Use arrow keys or A-W-D-S to move around.

If a ghost catches Pacman, he loses a life. The game begins from Level 1 when Pacman loses all of his lifes.

There are 4 special dots called energizers. When Pacman eats them, the ghosts become frightened and Pacman can eat them and earn extra points. 2 times per level a special fruit appears, which can be eaten for a big amount of extra points.

Sometimes ghosts hunt Pacman and sometimes they are just floating around. On higher levels they spend more time hunting than floating.

Screenshot-(99)

Technicals

The game window is split into tiles. A ghost catches Pacman if their centers are on the same tile. Ghosts are always moving to a target tile. While not hunting, they go to corner tiles, but when they hunt Pacman, each ghosts have different target:

Every ghost has different duration of "shy mode" (when it is in the ghost house).

What happens on the higher levels?

  1. Float time gets shorter
  2. Hunt time gets longer
  3. Shy mode gets shorter
  4. Frightened mode gets shorter and dissapear on level 10
  5. Fruit points get higher