asciiade
Fourteen classic terminal games — Tetris, Pac-Man, Rogue, Sudoku and the rest — in one binary, written in pure C with no external dependencies. No ncurses, no game engine, no graphics library: just termios for raw keyboard input and ANSI escape sequences for drawing.
Stack: C, termios, ANSI escapes, Make
GitHub
The constraint: no dependencies. Not ncurses, not SDL, not a game engine — nothing beyond the C standard library and a few system headers every Mac and Linux machine already ships. asciiade talks to the terminal directly: termios for raw keyboard input, ANSI escape sequences for drawing. make builds it in one command, with zero warnings and nothing to fetch.
One engine, fourteen games: Tetris, Snake, Minesweeper, 2048, Conway's Game of Life, Pong, Breakout, Sokoban, Rogue, Connect 4, Invaders, Pac-Man, Flappy Bird, and Sudoku share one binary and one menu screen. Every game implements the same five-function interface — start(), key(k), update(dt_ms), render(frame), done() — so adding one means writing that module plus a line in the registry. The menu and the shared engine never change, which is what keeps each game small enough to read top to bottom no matter how many get added.
Rendering: Every frame is composed in memory and sent to the terminal in a single write, so nothing tears or blinks. The whole thing runs on the alternate screen — the same trick vim uses — so your shell history is untouched when you quit, and the terminal is restored on a normal exit, on Ctrl-C, and on SIGTERM.
The games are real implementations, not toys: Tetris runs the standard 10x20 board with all seven pieces, classic NES rules, next-piece preview, ghost piece, and the NES scoring and speed curve. Pac-Man has the full 28x21 maze and all 174 pellets, four ghosts with the arcade's original personalities, scatter and chase phases, fruit bonuses, and a wrap-around tunnel the ghosts move through slower than you do. Rogue is a one-floor dungeon crawl with a randomly carved layout, field-of-view fog of war, bump-to-attack combat against four kinds of monster, and permadeath. Sudoku generates a fresh grid every game, guaranteed to have exactly one solution, at three difficulties with pencil marks and live conflict highlighting. Game of Life runs on a 48x22 wrap-around board you can paint yourself, with save/load and a Gosper glider gun included. Connect 4 and Pong both ship computer opponents at three levels.
Testing: Every game carries its own suite, and none of them need a terminal to run — recorded input replays are checked against expected output, with fuzz reproducers stored alongside.
Why this way: The interfaces it runs on — termios and ANSI escapes — have been in Unix since the 1980s and still work everywhere, with no package manager involved. There is no build system beyond a Makefile that records the compile command.
swayam.codes