A fully functional puzzle game built in C using SDL2, inspired by the popular Block Blast mobile game. Players place randomly generated Tetris-like pieces on a 10×10 grid to complete rows and columns.
- 10×10 interactive game board
- 10 unique piece shapes with random rotations
- Score tracking and line-clearing mechanics
- Game over detection with restart functionality
- Smooth SDL2 rendering
IMPORTANT: All files must be in the same folder for the game to work properly.
git clone https://github.com/yourusername/blockblast.git
cd blockblastOr download as ZIP and extract all files to a single folder.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install libsdl2-dev libsdl2-ttf-devFedora/RHEL:
sudo dnf install SDL2-devel SDL2_ttf-develArch Linux:
sudo pacman -S sdl2 sdl2_ttfmacOS (Homebrew):
brew install sdl2 sdl2_ttfNavigate to the folder containing all files and compile:
gcc blockblastSDL.c -o blockblast -lSDL2 -lSDL2_ttf -lm./blockblast- Click on one of the three pieces displayed in the left sidebar
- Click on the grid where you want to place the selected piece
- Complete full rows or columns to clear them and earn points
- Game ends when no pieces can be placed - click to restart
- Placing a piece: +30 points
- Clearing a line or column: +50 points
- Language: C
- Graphics: SDL2
- Font Rendering: SDL2_ttf
- Platform: Linux (cross-platform compatible)
blockblast/
├── blockblastSDL.c # Main game source code
├── arial.ttf # Font file (included)
└── README.md # Documentation
Stefan Andrei Sirbu - Computer Science Student at Politehnica University Timișoara
Developed as part of learning C programming and Linux development.