Skip to main content

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.

Metadata

Release files for terminal-tetris 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terminal-tetris 0.0.14
File Size Uploaded Provenance
terminal_tetris-0.0.14.tar.gz 23.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for terminal-tetris 0.0.14
File Interpreter ABI Platform
terminal_tetris-0.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 52.8 kB

Release files / terminal_tetris-0.0.14.tar.gz

Download URL terminal_tetris-0.0.14.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3a227061ad36aafff8abe0e9da962cb887431fd8d86b7c5aa32b319770b38ab6
BLAKE2b-256 checksum
How to use checksums
84dfe5a26269677eb379159dcd0f4791394e666d3595af1a59cff81959eca7b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / terminal_tetris-0.0.14-py3-none-any.whl

Download URL terminal_tetris-0.0.14-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
885f19721589e746f67b6aa01124fb4e39e2e2d58d5b60702a3a72eafb383a41
BLAKE2b-256 checksum
How to use checksums
24a8d788c0f943d2156de664d5ccc88e74e7ee7f1ac9e8b4198149739a3c8609
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for terminal-tetris 0.0.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page