🎮 3D Tetris in pure C using OpenGL & SDL.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Gnat's Tetris Machine is a remake of Alexey Pajitnov's classic "Tetris" from 1985.

Gnat's Tetris Machine is written in pure ANSI C, OpenGL API for 3D graphics, and SDL for input and sound. It features a clean, commented, C source code that can be used as a resource for learning how to program video games in C. Makefiles for Linux and Windows included.

Gnat's Tetris Machine was originally written by Nathaniel Sabanski.

Gameplay Tips

Points multiply for clearing more than 1 row at a time. Large bonus for clearing 4 rows at a time (Pajitnov calls this a "Tetris"). See how many "Wanted Stars" you can get. If you manage to survive long enough, you may get to see the special Pepperidge Farms ending.*

Gnat's Tetris Machine Screenshot 1

  • There really is no "Pepperidge Farms" ending.