Skip to main content

A feature-rich terminal-based Tetris game written in Python.

Project description

Terminal Tetris

This is a terminal-based Tetris game written in Python. It aims to be a feature-rich implementation of the classic game with modern mechanics. This project was created for personal use.

screenshot screenshot

Features

  • Classic Tetris Gameplay: A fully-featured Tetris implementation for the terminal.
  • GAMEMODES: We've got Marathon, Sprint, Timed. We even got Garbage.
  • Modern Mechanics: Includes advanced mechanics like T-Spin detection and a back-to-back bonus system.
  • Save state: Includes a save state feature that allows you to pause the game and resume it later. (hit 's' while game is paused). Saving will close the game. Resume from Main Menu on next startup. only works on marathon right now
  • Hold Functionality: Swap out the current piece with a stored piece.
  • Persistent Database: All high scores and user settings are saved to a local tetris.db file, so your progress and customizations are always remembered.
  • Settings Menu: Customize everything from keybindings to game physics and scoring values.
  • Ghost Piece: A preview of where the current piece will land. (Toggle in Settings Menu)
  • High Score Tracking: The top 5 scores are saved and displayed on the main menu.
  • Level Progression: The game's speed increases as you clear more lines.
  • Proper Lock Delay: A half-second delay after a piece touches a surface, allowing for last-second adjustments. (adjustable in Settings Menu)
  • Bag Randomization: A 7-bag randomization system ensures that all seven tetrominoes will appear in a random order before any are repeated.

screenshot

How to Play

Installation

Install with pip or whatver you use: bash pip install terminal-tetris We're NOW ON THE AUR

Install with your favourite thing using bash yay -S terminal-tetris

Running the Game

You can run the game using the following command:

terminal-tetris

screenshot

Controls

Key Action
/ Move
Rotate
Soft Drop
Space Hard Drop
c Hold
p Pause
s Save (paused)
q Quit

sceenshot


Scoring

The scoring system is based on modern Tetris guidelines, with the base score multiplied by the current level.

Action Score
Single 100
Double 300
Triple 500
Tetris 800
T-Spin Mini 100
T-Spin 400
T-Spin Single 800
T-Spin Double 1200
T-Spin Triple 1600
Back-to-Back Bonus 1.5x

screenshot


High Scores

The game keeps track of the top 5 high scores in a tetris.db file. If you achieve a high score, you will be prompted to enter a three-character name.


screenshot


Inspirations

I really wanted something lightweight and fun to play while I waited for things to load, compile, laundry to finish, and other mundane tasks. I was heavily inspired by the classic Tetris game on the gameboy, shtris, and vitetris.

Credits

Tetris © 1985~2025 Tetris Holding. Tetris logos, Tetris theme song and Tetriminos are trademarks of Tetris Holding. The Tetris trade dress is owned by Tetris Holding. Licensed to The Tetris Company. Tetris Game Design by Alexey Pajitnov. Tetris Logo Design by Roger Dean. All Rights Reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terminal_tetris-0.0.10.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terminal_tetris-0.0.10-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file terminal_tetris-0.0.10.tar.gz.

File metadata

  • Download URL: terminal_tetris-0.0.10.tar.gz
  • Upload date:
  • Size: 5.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.2

File hashes

Hashes for terminal_tetris-0.0.10.tar.gz
Algorithm Hash digest
SHA256 cc0fe8f333b5e5aa8d67ca6a99e9ad8c3e9db6786e4c704da12d3d9a6551c708
MD5 fbb05b10dc6fe8392fbc76e720982869
BLAKE2b-256 25f8137fe386064039129bd6620a6d595b9f01e6bcaeff46acd60fe3885f9ae8

See more details on using hashes here.

File details

Details for the file terminal_tetris-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for terminal_tetris-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6fb3fa5c94972e47121fe6d179431d11d2de5d59040e5f38e2a39e26303633e7
MD5 3c92aae8325898c24b4ae75b475a41f4
BLAKE2b-256 005777b173f382dbbaa7ab5591770afe767602df20ef80814bbb21789dbcbe70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page