This is a Tetris game developed using SFML as the Programming Fundamentals (CS1002) course project.
The game is a simple implementation of the classic Tetris where players earn points by clearing horizontal lines. The players can control the movement of the Tetriminos in the game matrix. The game ends when the blocks stack up to the top of the screen.
- Matrix Playing Field: All blocks and lines are enclosed within the matrix.
- Random Shape Generation: The game randomly introduces one of the seven different Tetrimino shapes.
- Movement, Rotation, and Dropping: Use arrow keys for movement and rotation of blocks.
- Shadow of Dropping Shapes: Shows where the block will land before it drops.
- Bomb Feature: Randomly falling bombs can destroy blocks, clearing the entire matrix if colors match.
- Scoring System:
- Score scales with the number of lines cleared simultaneously.
- Game Levels:
- Speed: Block speed increases every five horizontal lines cleared
- High Scores: Tracks and displays the top 10 high scores.
- Menu System: Options for starting a new game, pausing a running game, viewing high scores, and accessing help.
The game starts with blocks falling from the top. The player can move these blocks left, right, or down and rotate them to fit into the available spaces. The objective is to complete horizontal lines without gaps, which will then disappear and score points. The game ends if the blocks reach the top of the playing field.
- Ensure that you have SFML and CMake version 3.28 or higher installed on your system.
- Clone the repository:
git clone https://github.com/AliHamzaAzam/PF-Tetris.git cd PF-Tetris - Build the project using CMake:
mkdir build cd build cmake .. make - Run the game:
./PF_Tetris