VŠB-TUO — School project · Programming in C
A recreation of the classic 2048 sliding-tile puzzle game implemented in C using the SDL2 graphics library. Supports configurable board sizes and includes game-over and victory screens.
- GCC or compatible C compiler
- SDL2, SDL2_image, SDL2_ttf
-
Clone the repository:
git clone https://github.com/Firestone82/2048-clone.git cd 2048-clone -
Install SDL2 libraries (Debian/Ubuntu):
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev
-
Build:
gcc *.c -o main -Wall -ISDL2/include -LSDL2/lib -lSDL2 -lSDL2main -lSDL2_image -lSDL2_ttf
./main [columns] [rows] # defaults to 4×4
./main 8 8 # 8×8 boardControls:
| Key | Action |
|---|---|
WASD / Arrow keys |
Move tiles |
R |
Restart game |
ESC |
Exit |
This project was created as a school assignment at VŠB-TUO.

