Git Product home page Git Product logo

tetris's Introduction

Tetris

My attempt at making a tetris clone. This projects aims to follow as close as possible the Tetris guidelines.

Controls

  • Left : LEFT ARROW Key
  • right : RIGHT ARROW Key
  • Down : DOWN ARROW Key
  • Hard-Drop : SPACE bar
  • Rotate Clockwise : UP ARROW Key
  • Rotate Counter-Clockwise : Z Key
  • Rotate 180° : A Key
  • Pause : ESCAPE Key

Features

  • Classic Tetris gameplay.
  • Increasing difficulty level as the game progresses.
  • Score tracking to keep track of your performance.
  • 7-bag system.
  • Super Rotation System.
  • Editor mode to create custom levels.
  • Practice mode.

Modes

Custom Mode

In the custom mode, you can set the speed and lock it, chose the which shape to generate or use the 7-bag system(random pieces), and create your own custom levels by placing blocks on the grid. Use the left click button to place a block on the grid, and the right mouse button to remove a block.

Practice Mode

A mode where there is a preset for each tetromino, made to test and practice the SRS system(Super Rotation System).In this mode you can also select the speed and lock it.

Classic Mode

The Classic Mode faithfully recreates the iconic gameplay of the original Tetris game. This mode offers additional customization options, allowing players to set the speed of the falling tetrominoes and lock it to their desired level of challenge.

How To Run

  1. Make sure you have python 3.10.x or above and pygame-ce v2.2.0.
  2. Clone the repository.
  3. Run the following command(Make sure to run it where the project file are located).
python Main.py

Made Using

Python version 3.11 and Pygame-ce v2.2.0.

Sources

https://harddrop.com/wiki/Tetris_Wiki/SRS

https://harddrop.com/wiki/Scoring

https://harddrop.com/wiki/Tetris_Worlds

Sound assets from:

https://github.com/dcts/tetris-spheres

https://you.have.fail/

https://gamebanana.com/sounds/download/44751#FileInfo_425499

TODO:

  • redraw blocks.
  • refactor all of the game classes into a single one (into the main one).
  • add a gameover sound effect.
  • save dig mode time.

tetris's People

Contributors

grumpydude02 avatar

Stargazers

Denny avatar YoussefBlh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.