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)!
Example game of tetris with polykings.-
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
-eflag to add non-standard polyominos (polykings) that can connect at vertices -
Mix Mode: Enable with
-mflag 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
-cand-bcflags - Change colors during gameplay with j/k and u/i
- Choose block and background colors with
-
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
- Python 3.x
- Standard Python libraries:
curses,random,argparse,math - Terminal with adequate size
polyshapes.pyfile in the same directory- [optional]
pygameandnumpylibraries and/musicfolder to support audio
pip install n_is_pythonThis will automatically install dependencies, the game can be run with:
n_isor
n-isSimply use pip:
pip install pygame numpySimply run the game without arguments to access the interactive menu:
python n-is.pyNavigate the menu with:
- Arrow keys: Navigate options
- Enter: Select option
- Number keys (1-6): Quick select
- Q: Quit menu
For direct game launch:
python n-is.py N>gt; [OPTIONS] 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,wor 0-255)-bc NUMBER: Background color (0-255)-h: Show help message
Examples:
python n-is.py # Interactive menu
python n-is.py 4 # Classic Tetris
python n-is.py 3 -e # Tris with polykings
python n-is.py 5 -c g -bc 0 # Green Pentis on black background
python n-is.py 4 -m # Tetris with Tris and Dis pieces included- 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)
- C: Hold current piece (swap with held piece)
- P: Pause game (press any key to resume)
- Q: Quit game
- M: Toggle all sound and music on/off
- Page Up/Page Down: Adjust music volume
- U/I: Change main block color (previous/next)
- J/K: Change background color (previous/next)
- 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
- Fall speed increases by ~14.5% each level
- Minimum fall speed prevents game from becoming unplayable
The game includes background music from the following sources:
-
Clair de lune (Claude Debussy) Suite bergamasque by Laurens Goedhart is licensed under Creative Commons Attribution 3.0
-
Tetris Theme (Korobeiniki) arrangements by GregorQuendel are licensed under the Pixabay License:
- Piano arrangement
- Music box arrangement
- String arrangement
| 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 |
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