A Pac-Man style game written in C with SDL2. Every level is a freshly generated random maze: eat the dots, avoid the ghosts, and try to beat the high score table.
git clone https://github.com/NinjaShadowBoy/Pac-Man-ING2.git
cd Pac-Man-ING2On Windows you can play straight away: double-click Projectp.exe in the
repository folder. The SDL2 DLLs it needs are next to it.
On Linux or macOS, build it first (see below).
Always start the game from the repository root, because it loads images/,
sounds/, fonts/ and data/ by relative path.
| Key | Action |
|---|---|
| Arrow keys | Move Pac-Man, and navigate menus |
| Enter | Select a menu option |
| Space | Pause and resume |
High scores are saved in data/.
The canonical/reproducible build entry point is now CMake (CMakeLists.txt at repo root).
Projectp.dev is kept as an optional legacy IDE project file for Dev-C++ users, but it is not the source of truth for CI/release builds.
You need the following development packages:
- SDL2
- SDL2_image
- SDL2_mixer
- SDL2_ttf
- C compiler (GCC/Clang/MSVC)
- CMake 3.16+
Install dependencies:
sudo apt update
sudo apt install -y build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-devConfigure and build:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -jRun:
./build/ProjectpInstall dependencies in MSYS2 MinGW x64 shell:
pacman -S --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_ttfConfigure and build:
cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build build -jRun:
./build/Projectp.exeMakefile.win is kept for compatibility and now supports configurable paths.
Examples:
mingw32-make -f Makefile.winWith explicit tool/dependency locations:
mingw32-make -f Makefile.win MINGW_PREFIX="C:/Program Files (x86)/Dev-Cpp/MinGW64" SDL2_DIR="C:/SDL2/x86_64-w64-mingw32"