Study SFML-project (used SFML 2.6). This game is clone Tetris-game created Alex Pajitnov in 1984.
Pieces are drawn on the basis of Damian Yerrick's picture.
There are 2 game modes - Single game and Campaign Game.
Single Game is classical Tetris with increase level and speed.
Campaign Game contains different missions for each level and potentially infinite number of levels. Also in this mode you can save the game and continue it after some time.
/utils/ contains aditional classes and functions.
File data.dat is a zip-archive which stored textures, tables and others.
The game unpacks archive to directory and deletes it in the end of the game.
-
LEFT or 4 - left move
-
RIGHT or 6 - right move
-
UP or 5 - rotation
-
DOWN - down move
-
SPACE - drop down
-
P or PAUSE = pause
-
N - new game
-
F1 or I - help
-
Q - exit
-
Esc - Main Screen
This project uses a Makefile to compile the source code. Before building, make sure the following dependencies are installed:
For Ubuntu / Debian-based systems, you can install them using:
sudo apt update
sudo apt install g++ libsfml-dev libminizip-dev zlib1g-dev
Alternatively, you can use vcpkg to install and manage dependencies (especially useful on other Linux distributions or cross-platform setups).
To build the project, open a terminal in the project directory and run:
make
This will compile all .cpp files (including those in the utils/ folder) and produce the executable:
./TetrisPlusPlus
To remove the object files and the executable:
make clean



