Skip to main content

N-is: A Generalized Tetris Game

N-is is a terminal-based puzzle game that generalizes the classic Tetris concept to work with polyominos and polykings of any size from 1 to 6 blocks. Play traditional Tetris (4 blocks) or experiment with Tris (3 blocks), Dis (2 blocks), Pentis (5 blocks), or even Hexis (6 blocks)! Made for Summer of Making

Features

  • Flexible Block Size: Choose your game style with different block counts:

    • 1: "Monois" (single blocks)
    • 2: "Dis" (domino shapes)
    • 3: "Tris" (triomino shapes)
    • 4: "Tetris" (classic tetromino shapes)
    • 5: "Pentis" (pentomino shapes - more challenging)
    • 6: "Hexis" (hexomino shapes - extremely challenging, nearly unplayable)

    Heptis will probably never be made because even hexis is not very fun, and heptis just simply has no reason to exist.

  • Interactive Menu System: Run without arguments to access a user-friendly curses-based menu for selecting game options

  • Extended Mode: Enable with -e flag to add non-standard polyominos (polykings) that can connect at vertices

  • Mix Mode: Enable with -m flag to include polyominos of lower order (e.g., in Tetris mode, also get Tris, Dis and monois pieces)

  • Advanced Gameplay Features:

    • Hold System: Hold pieces for later use with 'c' key
    • Ghost Piece: See where your piece will land
    • Hard Drop: Instantly drop pieces with Enter key
    • Combo System: Chain line clears for bonus points
  • Customizable Appearance:

    • Choose block and background colors with -c and -bc flags
    • Change colors during gameplay with j/k and u/i
  • Progressive Difficulty:

    • Fall speed increases with each level by around 14.5%
    • Scoring system with level and combo multipliers
  • Background Music: Multiple music options available in the interactive menu

Arguments:

  • N (optional): Number of blocks (1-6). If omitted, interactive menu appears
  • -e: Enable extended mode (polykings/pseudo-polyominos)
  • -m: Enable mix mode (include lower-order polyominos)
  • -c COLOR: Block color (r, g, b, y, m, c, w or 0-255)
  • -bc NUMBER: Background color (0-255)
  • -h: Show help message

Examples:

n_is              # Interactive menu
n_is 4            # Classic Tetris
n_is 3 -e         # Tris with polykings
n_is 5 -c g -bc 0 # Green Pentis on black background
n_is 4 -m         # Tetris with Tris and Dis pieces included

How to run:

n-is

or

n_is

Game Controls

Movement & Rotation

  • Left/Right Arrow: Move piece horizontally
  • Down Arrow: Soft drop (faster fall + 1 point per cell)
  • Up Arrow: Rotate piece clockwise
  • Enter: Hard drop (instant drop + 2 points per cell)

Game Features

  • C: Hold current piece (swap with held piece)
  • P: Pause game (press any key to resume)
  • Q: Quit game

Audio Controls

  • M: Toggle all sound and music on/off
  • Page Up/Page Down: Adjust music volume

Visual Customization (During Game)

  • U/I: Change main block color (previous/next)
  • J/K: Change background color (previous/next)

Game Mechanics

Scoring System

  • Line Clears: Points based on number of lines cleared simultaneously
    • 1 line: 60 × (level + 1)
    • 2 lines: 120 × (level + 1)
    • 3 lines: 360 × (level + 1)
    • 4 lines: 1200 × (level + 1)
    • 5 lines: 4096 × (level + 1)
    • 6 lines: 16384 × (level + 1)
  • Combo Bonus: Additional points for consecutive line clears
  • Drop Bonus: 1 point per cell for soft drop, 2 points per cell for hard drop

Level Progression

  • Fall speed increases by ~14.5% each level
  • Minimum fall speed prevents game from becoming unplayable

Music Attribution

The game includes background music from the following sources:

Compatibility

Operating System Status Notes
Linux ✅ Fully Supported Tested on Fedora 42
Windows 11 ❌️ wont work on windows because of lack of support with curses library
macOS ❓ Expected to work Unix-compatible, but untested

Troubleshooting

Error: "Your terminal may not be supported, or it probably is too small"

  • Solution: Increase your terminal window size, or make font smaller
  • For higher N values, larger terminals may be required

Colors not displaying correctly:

  • Try different color values (0-255)
  • Some terminals may have limited color support

Metadata

Release files for n-is-python 0.1.6

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

Source distribution (sdist)

Source distribution for n-is-python 0.1.6
File Size Uploaded
n_is_python-0.1.6.tar.gz 35.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for n-is-python 0.1.6
File Interpreter ABI Platform
n_is_python-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 70.9 MB

Release files / n_is_python-0.1.6.tar.gz

Download URL n_is_python-0.1.6.tar.gz
Size 35.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c201ed9c2b20831e5279e377422e56217eb7b82abfefe2c684ef9156b3bcbd0e
BLAKE2b-256 checksum
How to use checksums
f2e6e3109e990571f434449328babdb992d6aaa0a82bb2904af5c0121bd20d56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / n_is_python-0.1.6-py3-none-any.whl

Download URL n_is_python-0.1.6-py3-none-any.whl
Size 35.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4374fcfa1c902601af5c0614e75dc2a2bef7e8a681b1f90eda6abb55c8ab577c
BLAKE2b-256 checksum
How to use checksums
6e428a766cc34e5ff0d5a16d3ab3ac53d98d57c1e876c16469f8dec04f0f006a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release 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