Skip to content

lucky017/Tetris-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris Game

This project is a simple implementation of the classic Tetris game using the raylib library for graphics. The game includes features like score tracking and a game over screen, and uses a custom font for text rendering.

Features

  • Classic Tetris gameplay
  • Score tracking
  • Next piece preview
  • Music and sound effects

screenshot

Screenshot 2024-06-16 201116

Getting Started

Prerequisites

  • CMake (minimum version 3.17)
  • C++ compiler (e.g., g++)

Setup Instructions

  1. Clone the repository:
    git clone https://github.com/lucky017/Tetris-clone.git
    cd Tetris-game
    
  2. Ensure you have CMake installed and accessible in your environment.

Building the Project

  1. Build the project:
 mkdir build
 cd build
 cmake ..
 make
  1. Compile the project and run the game

Gameplay

The goal of the game is to fit the falling Tetris blocks together to complete and clear horizontal lines. As the game progresses, the blocks fall faster, increasing the challenge.

Controls

  • Left Arrow Key: Move the block left
  • Right Arrow Key: Move the block right
  • Down Arrow Key: Soft drop the block (faster descent)
  • Up Arrow Key: Rotate the block clockwise

Scoring

  • Each cleared line adds points to your score.
  • The more lines you clear at once, the higher the score you will earn.

Development Notes

  • The game uses the raylib library for graphics and audio. It is automatically fetched using CMake's FetchContent.
  • Ensure all resources (fonts and sounds) are placed in their respective folders to avoid runtime errors.

Acknowledgement

  • raylib for providing an easy-to-use C++ game programming library.

Feel free to modify the code and add more features to enhance the gameplay experience. Enjoy playing Tetris!

About

It is a Tetris clone game implemented using raylib libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors