A simple Pacman game implemented in C using the SDL2 library.
- Classic Pacman gameplay
- Smooth movement with keyboard controls
- Ghost AI (basic logic)
- Score tracking
- Dev-C++
- SDL2 Library
Download and install the SDL2 library:
- SDL2 Documentation: https://wiki.libsdl.org/
- SDL2 Download: https://github.com/libsdl-org/SDL/releases
- Open Dev-C++.
- Create a new C Project.
- Add all source files to the project.
- Configure the compiler settings to link with SDL2:
- Go to Project Options → Parameters → Linkers
- Add: `-lmingw32 -lSDL2main -lSDL2 -lSDL2_test -lSDL2_image -lSDL2_ttf -lSDL2_mixer
- Now go to Project Options → Parameters → Directories
- Add the directories leading to the "lib" and "include" folders in the different SDL library folders to the "include" and "library" tabs
- Click Compile & Run.
- Arrow Keys: Move Pacman
- Backspace: Exit the game
This project is public and free!!!
✉️ Feel free to contribute or suggest improvements!