DEV Community

Cover image for Tetris
Achal Jhawar
Achal Jhawar

Posted on


So I have made a Tetris game from python and a module named pygame(it may be quite familiar to some). It has a beautiful background image and Circles by Post Malone will play in the background as an audio asset. Like its having more than 400 lines of code.

I have listed some of the prerequisites and I instructions to play so that you could have a great time with it you can download the game from
GitHub or from

If you like it you could share it with others and don't forget to drop a star on the repository it helps or you could donate me


You'll need pygame and python installed on your computer.

pygame@1.9.5 or above
python@3.9.6 or above
Enter fullscreen mode Exit fullscreen mode

How to play

# Clone this repository
$ git clone

# Go into the folder
$ cd Tetris

# Run the python file
$ python
Enter fullscreen mode Exit fullscreen mode

Enjoy the game its amazing and I am sure you'll love it.

Instructions to play

  1. You can use the ⬅️⬆️➡️⬇ arrow keys to rotate the pieces.
  2. You have to complete the lines of the grid to get points.
  3. If you can not fit the pieces in the grid you lose.
  4. For every line you complete you get 10 points.

Screenshot of the game

Alt Text

Thank you and have a nice day 😊.

Top comments (1)

abdurrahmaanj profile image
Abdur-Rahmaan Janhangeer

Cool! See this lib: Hooman. Could it have helped your PyGame coding?

Else, i suggest you put a direct link to your project on Github or as a mention. That way people can view the project on Github and star it if they like!