Migrated from https://git.sr.ht/~zanneth/zanntetris
- GDScript 93.8%
- Shell 4.5%
- GDShader 1.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| assets | ||
| scripts | ||
| src | ||
| tests | ||
| .clang-format | ||
| .gitignore | ||
| AGENTS.md | ||
| CREDITS.md | ||
| export_presets.cfg | ||
| LICENSE | ||
| main.tscn | ||
| project.godot | ||
| README.md | ||
Tetris Trance
A compact desktop falling-block game using Godot 4 and GDScript.
Play the Web version at https://zanneth.com/tetris-trance/.
Run
Open this directory in the Godot editor, or launch it directly:
godot --path .
Run the headless game-logic tests with:
godot --headless --path . --script res://tests/test_game.gd
Distribution
Install the export templates matching your Godot version, then build both Linux x86_64 and Web releases:
./scripts/build-release.sh
Pass linux or web to build only one target. The Linux archive and Web files
are written under build/.
Deploy an existing Web build to zanneth.com:
./scripts/deploy-web.sh
To build, test, and deploy in one command:
./scripts/deploy-web.sh --build
The deployment uses the SSH host kira. Set DEPLOY_HOST to override it.
Controls
| Action | Keys |
|---|---|
| Start | Enter |
| Move | Left / Right |
| Soft drop | Down |
| Hard drop | Space |
| Rotate clockwise | Up / X |
| Rotate counter-clockwise | Z / Ctrl |
| Hold | C / Shift |
| Pause | P |
| Restart | R |
| Quit (desktop only) | Escape |
Debug builds also support Page Up during gameplay to advance directly to
the next speed level.
Rules implemented
- 10 × 20 visible Matrix plus a 20-row hidden buffer
- Seven-bag random generator, five-piece preview, hold, and ghost piece
- Super Rotation System (SRS) rotations and wall kicks
- 0.5 second extended-placement lock delay with a 15-reset limit
- Recommended 10-frame DAS and 2-frame ARR at 60 FPS
- Fixed-goal, 15-level / 150-line Marathon with the Tetris Worlds gravity curve
- Guideline-style line, drop, combo, back-to-back, T-spin, and perfect-clear scoring
- Persistent top-10 high score table
- Block-out and lock-out top-out conditions