Skip to content
Back to projects
006 Code 2026

Pac-Man in C

The game running right in the terminal

github.com/giorgiobazet/Pacman-em-C

About the project

Before the web version, Pac-Man started out in C, running in the terminal.

Mazes are read from text files and stored in a dynamically allocated grid. The game reads the keyboard without waiting for Enter using termios, moves the ghosts and draws everything with ANSI colors.

Technical highlights

  • 01 Five maps loaded from files
  • 02 Dynamically allocated map grid (char **)
  • 03 Real-time key input with termios (Linux and macOS)
giorgio@portfolio: ~

· Live preview