Skip to content

AliHamzaAzam/PF-Tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PF-Tetris

This is a Tetris game developed using SFML as the Programming Fundamentals (CS1002) course project.

Table of Contents

Game Description

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.

Features

  • 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.

Gameplay

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.

Build Instructions

  1. Ensure that you have SFML and CMake version 3.28 or higher installed on your system.
  2. Clone the repository:
    git clone https://github.com/AliHamzaAzam/PF-Tetris.git
    cd PF-Tetris
  3. Build the project using CMake:
    mkdir build
    cd build
    cmake ..
    make
  4. Run the game:
    ./PF_Tetris

About

PF-Tetris is a classic Tetris game implemented for educational purposes. Built with a focus on clean design and modular code, this project demonstrates fundamental programming concepts such as game loops, collision detection, score tracking, and user input handling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors