Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nafisrayan/tetris-opengl

This project is an implementation of the classic game Tetris using Python OpenGL.
https://github.com/nafisrayan/tetris-opengl

computer-graphics game opengl pyopengl python tetris

Last synced: about 5 hours ago
JSON representation

This project is an implementation of the classic game Tetris using Python OpenGL.

Awesome Lists containing this project

README

        

## Tetris-OpenGL

This is a Tetris game developed using Python and the OpenGL library. The game features a classic Tetris gameplay with falling tetrominoes that the player must rotate and position to create complete rows.

### Features

- Fully functional Tetris game with scoring and level progression
- Smooth animation and graphics using OpenGL
- Keyboard controls for moving and rotating tetrominoes
- Game over condition when the stack reaches the top of the screen

### Controls

- Left/Right arrow keys: Move the falling tetromino left or right
- Up arrow key: Rotate the tetromino counterclockwise
- Down arrow key: Soft drop (accelerate the tetromino downwards)
- Space bar: Hard drop (instantly drop the tetromino)
- Esc key: Pause the game

### Installation

1. Make sure you have Python 3 and the following libraries installed:
- PyOpenGL
- numpy
2. Clone the repository:
```
git clone https://github.com/NafisRayan/Tetris-OpenGL.git
```
3. Navigate to the project directory:
```
cd Tetris-OpenGL
```
4. Run the game:
```
python tetris.py
```

### Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/NafisRayan/Tetris-OpenGL).