Welcome to Tetris in Pygame! This project is an implementation of the classic arcade game where you control falling tetrominoes, aiming to clear lines by forming complete rows. This version is built using Python and the Pygame library, providing a clear and functional example of Tetris mechanics in a Python environment.
To run Tetris in Pygame, you need the following:
- Python 3.x: Ensure you have a compatible version of Python installed on your system.
- Pygame: The game development library for Python.
Tetris in Pygame depends solely on the Pygame library. All other functionalities are handled by Python's built-in capabilities.
The required dependency is listed in requirements.txt:
pygame
To run Tetris in Pygame, follow these steps:
- Clone the Repository:
git clone https://github.com/rmottanet/tetris-py.git cd tetris-py - Install Dependencies:
It's recommended to use a virtual environment.
python -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\activate pip install -r requirements.txt
- Run the Game:
The game window will open, and you can start playing Tetris!
python src/main.py
- Left/Right Arrow Keys: Move the current piece horizontally.
- Down Arrow Key: Accelerate the piece's descent (soft drop).
- Up Arrow Key / 'X' Key: Rotate the current piece clockwise.
Tetris in Pygame is part of the Old School Gaming Hub organization on GitHub. The Old School Gaming Hub is dedicated to developing classic 2D games, primarily focusing on C++ implementations, to provide nostalgic gaming experiences for enthusiasts and developers alike. Explore more projects and games from Old School Gaming Hub.
Thank you for choosing Tetris in Pygame! Feel free to explore the code, modify it, and add your own features! If you have any questions, issues, or suggestions, please don't hesitate to reach out. Happy gaming! 🎮