
About
Pac-Man is Namco's 1980 arcade maze game, released in Japan as Puck Man, in which the player eats dots in a maze while avoiding four ghosts. pacman.c is a Pac-Man clone written in C99 with minimal dependencies, running on Windows, macOS, Linux and the web via WebAssembly. The source is structured so it can be read from top to bottom, with implementation details documented in comments.
Getting started
A WebAssembly version can be played in the browser on the project's homepage. For a native build, clone the repo and build with CMake; Linux needs the OpenGL, X11 and ALSA development packages, and nix users can run it directly with nix run.
Additional notes
- Related project
- The same author maintains a Zig version of the game, pacman.zig.