Skip to main content

textual-tetris

textual-tetris is a minimalist Tetris clone written with Textual, an amazing TUI framework for Python. It focuses on compact components, colorized blocks, and a responsive keyboard feel in the terminal.

Running

The easiest way is using uvx (part of uv):

uvx textual-tetris

For local multiplayer:

uvx textual-tetris --2players

Blog post: https://mgaitan.github.io/en/posts/textual-tetris/

Screenshots

Single-player

Two-player

Gameplay

  • Blocks follow the classic rules: move left/right, rotate, soft drop, and hard drop.
  • Every locked piece awards a small bonus; clearing 1–4 lines follows the traditional scoring table. Levels increase automatically based on the number of cleared lines, and the drop interval accelerates per level.
  • The Next widget previews the upcoming piece so you can plan ahead, and the score widget keeps score/level/lines visible at all times.

Controls

In the default one-player mode, use arrows or W/A/S/D to move and rotate, and Space or Q to hard drop.

With --2players:

Key Action
A / D / S / W (Player 1) Move left/right, soft drop, rotate
Q (Player 1) Hard drop
← / → / ↓ / ↑ (Player 2) Move left/right, soft drop, rotate
Space (Player 2) Hard drop
Ctrl+Q Quit
R Restart after a game-over

Download files

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

Source Distribution

textual_tetris-0.4.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

textual_tetris-0.4.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file textual_tetris-0.4.0.tar.gz.

File metadata

  • Download URL: textual_tetris-0.4.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for textual_tetris-0.4.0.tar.gz
Algorithm Hash digest
SHA256 328cbd38685f77a818d88aab69cdd5aea5a5c8ac2df82f3810c3ba8277724094
MD5 0d6ee21de049f12947501ce2e72c34fd
BLAKE2b-256 d43fc78f3d1322c87d45c348de9716a0fd9c3b6a42c863dde8a7a90e50cff09e

See more details on using hashes here.

Provenance

The following attestation bundles were made for textual_tetris-0.4.0.tar.gz:

Publisher: cd.yml on mgaitan/textual-tetris

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file textual_tetris-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: textual_tetris-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for textual_tetris-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe2b9c4751173b79cc0802ef166a01af8cbd8226e78290b4e832bdb26ea6edd6
MD5 76e82cc0b78f139397a85ba9fd902838
BLAKE2b-256 7e6a2d14d621d5c1ed34bc2d66623d62c43464932883f8be3d880ea2c4a6618e

See more details on using hashes here.

Provenance

The following attestation bundles were made for textual_tetris-0.4.0-py3-none-any.whl:

Publisher: cd.yml on mgaitan/textual-tetris

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

This release

0.4.0 This release

2 files

0.3.1

2 files

0.3

2 files

0.1.0

2 files

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