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

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.13
File Size Uploaded Provenance
terminal_tetris-0.0.13.tar.gz 24.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 53.0 kB

Release files / terminal_tetris-0.0.13.tar.gz

Download URL terminal_tetris-0.0.13.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
047f6ca94820bc23c46952929b7f5abc8fe33783ee783cd45cd053e2a0527e4d
BLAKE2b-256 checksum
How to use checksums
02543d5a4dcea55d4afd2cdd6bea885c1434a5c9d77c50fc5e7d4c5a9f4efe1d
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.13-py3-none-any.whl

Download URL terminal_tetris-0.0.13-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9587f649c5e03708278ec7fc55ecf9be14a14702c59118ffcadd4c0c0b1e7272
BLAKE2b-256 checksum
How to use checksums
84f4c4378ca77cccc592ea58e36071552c5cfd706728ec6aa121abc8d039954f
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.13

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