Tetris is a tile-matching video game created by Russian software engineer Alexey Pajitnov in 1984. Built on simple rules and requiring intelligence and skill, Tetris established itself as one of the great early video games. It has sold 202 million copies โ approximately 70 million physical units and 132 million paid mobile game downloads โ as of December 2011, making it one of the best-selling video game franchises of all time; the Game Boy version in particular is one of the best-selling games of all time, with over 35 million copies sold. In Tetris, players must complete lines by moving differently shaped pieces called tetrominoes, which descend onto the playing field. The player can proceed to fill the vacated spaces and more the no of shapes the user can fill in the grid, more is the score. The game ends when the playing field is filled. The longer the player can delay this inevitable outcome, the higher their score will be. [1]
This project intends to plan and actualize a tetris game utilizing python programming language and libraries like pygame and random. The project intends to construct a single UI in which there are seven potential pieces, each made out of four squares placed in a different configuration. Rotated versions of each piece are possible. Game play includes setting randomly generated pieces at the base of the board, subsequent to moving them towards the left or right along with rotation if necessary. Pieces can be quickened downwards until they land after existing squares. When a piece lands, another one is produced and play proceeds. On the off chance that another piece can at this point don't be set at the head of the board, the game finishes.
- Simple to use interface and can be used by any adult or child with help of an ide that supports python programming language.
- Implemented with a small amount of code. It does not have hundreds of thousands of lines of code for things you won't use anyway.
- It is highly portable and can be used on multiple operating systems like windows, Linux and mac OS. It also supports multiple integrated development environments like pycharm, jupyter notebook etc.
- The game keeps track of the score as the user is playing.
- There are three levels - easy, middle and difficult. The levels are based on speed of the fall of blocks. Users can select the level using keys - E, M and D. The falling speed is passed on to the main game as a parameter when the level is selected.
- The sound is loaded just after the window is rendered and the users can quit the game anytime by pressing the Q key.