XTETRIS is a highly portable, cross-platform Tetris clone written entirely in pure C. It runs directly in your terminal using ncurses and features background audio playback via miniaudio.
Tested and verified on modern Linux, macOS, BSD, and even legacy PowerPC Mac G4 hardware.
- 100% C and ncurses: Lightweight, fast, and terminal-native.
- Cross-Platform Makefile: Automatically detects your OS (Linux, Darwin, BSD, Windows) and links the correct libraries.
- Audio Engine: Uses
miniaudiofor non-blocking background music (BGM). - Modes: Single-player and Multi-player support.
You need a C compiler (gcc or clang) and the ncurses development headers.
macOS (via Homebrew):
brew install ncursesDebian / Ubuntu:
sudo apt-get install libncurses5-dev libncursesw5-devFedora / RHEL:
sudo dnf install ncurses-develFreeBSD:
sudo pkg install ncursesJust run make. The Makefile will handle OS detection automatically.
makeRun the executable passing the background music file as an argument, or simply use the Make target:
make runNote: This project is part of a university assignment. The code is kept as-is for historical reference.
