Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emmmabk/tetris
đšī¸ Play classic Tetris! Python-powered with Pygame. Rotate, move, and clear lines! Clone, run 'main.py' to enjoy. Customize shapes, settings. Happy gaming! đŽđ´
https://github.com/emmmabk/tetris
classic-game gamedev pygame python pythongame tetris-game
Last synced: 29 days ago
JSON representation
đšī¸ Play classic Tetris! Python-powered with Pygame. Rotate, move, and clear lines! Clone, run 'main.py' to enjoy. Customize shapes, settings. Happy gaming! đŽđ´
- Host: GitHub
- URL: https://github.com/emmmabk/tetris
- Owner: EMMMABK
- License: cc0-1.0
- Created: 2023-12-03T10:27:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-26T14:31:59.000Z (about 1 year ago)
- Last Synced: 2024-11-01T11:24:05.392Z (3 months ago)
- Topics: classic-game, gamedev, pygame, python, pythongame, tetris-game
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![tetris](https://i.ibb.co/TY6ZcBZ/Colorful-Playful-Gaming-Phone-Wallpaper.png)
# Tetris Game đšī¸This is a classic Tetris game implemented in Python using the Pygame library. The game offers a traditional Tetris experience with falling tetrominoes that you can control to complete lines and score points.
## Getting Started đ
### Prerequisites
- Python 3.x
- Pygame library### Installation đ ī¸
1. Clone the repository:
```bash
git clone https://github.com/your-username/tetris-game.git
```2. Install the required dependencies:
```bash
pip install pygame
```### Running the Game âļī¸
Navigate to the project directory and run the following command:
```bash
python main.py
```## Gameplay đŽ
- **Controls:**
- Use the `left` and `right` arrow keys to move the falling tetromino sideways.
- Press the `up` arrow key to rotate the tetromino clockwise.
- Use the `down` arrow key to speed up the falling of tetrominoes.
- Press `ESC` to exit the game.- **Aim:**
- Fill complete lines horizontally to make them disappear and earn points.
- Avoid reaching the top of the screen; the game ends if the tetrominoes stack up to the top.## Code Structure đ§ą
The project contains the following main files:
- `main.py`: Contains the game's main logic and setup.
- `settings.py`: Includes various game settings and configurations.
- `tetris.py`: Manages the Tetris game mechanics and rendering.
- `tetromino.py`: Defines the tetromino blocks and their behavior.## Customization đ¨
- **Changing Tetromino Shapes:**
- Modify the `TETROMINOES` dictionary in `settings.py` to create different shapes for tetrominoes.
- **Adjusting Game Settings:**
- Explore `settings.py` to tweak game-related constants, such as speed, colors, and screen dimensions.## Acknowledgments đ
Special thanks to the Pygame community and the creators of Tetris for the inspiration.
Happy gaming! đ