Skip to content

Classic Tetris built with Python and PyGame. Features accurate mechanics, robust collision, and precise rendering for a true retro gaming experience.

License

Notifications You must be signed in to change notification settings

rmottanet/tetris-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris in Pygame

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.

Requirements

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.

Dependencies

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

Usage

To run Tetris in Pygame, follow these steps:

  1. Clone the Repository:
    git clone https://github.com/rmottanet/tetris-py.git
    cd tetris-py
  2. 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
  3. Run the Game:
    python src/main.py
    The game window will open, and you can start playing Tetris!

Controls

  • 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.

Old School Gaming Hub

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! 🎮



Static Badge Static Badge Static Badge Static Badge

About

Classic Tetris built with Python and PyGame. Features accurate mechanics, robust collision, and precise rendering for a true retro gaming experience.

Topics

Resources

License

Stars

Watchers

Forks

Languages