o
odinpkg.dev
packages / app / Tetri

Tetri

d9e02e4app

Tiny colored block game clone (for fun)

No license · updated 8 months ago

Tetri

What’s

Tiny Odin clone of the hit colored block game

game

Mechanics

Mainly tries to follow the Tetris Guideline

Implements

  • Bag system

  • Hold piece

  • Ghost piece

  • Next piece(s)

  • Infinity

  • Anti-infinity

  • SRS

  • DAS

  • ARR

  • SFX

Plements

  • Scoring system

  • Leveling up

  • ARE

  • Even more acronyms I’m missing out on

Config

config

The pause menu lets you edit game parameters directly ( like, they’re the actual Game_Config struct fields without any checking whatsoever )

Delays are measured in frames corresponding to 60fps, even if the game may run at more

Note
Terminology is whatever I thought of when writing it, sorry about not following the guideline here

Pause menu keybindings

[↑] [↓]

Move between options (line at the left indicates selected)

[←] [→]

Increment / Decrement config value

[Enter]

Change keybind (will be green-highlighted, next keypress determines binding)

[S]

Save config in ~/.config/Tetri/config.json

[L]

Load config from ~/.config/Tetri/config.json

[R]

Reset to defaults (won’t write to file by itself)

SFX

The following SFX can be placed in ~/.config/Tetri/assets/sfx

.
├── assets
│   └── sfx
│       ├── hard_drop.ogg
│       ├── hold.ogg
│       ├── lock.ogg
│       ├── move.ogg
│       ├── rotate_fail.ogg
│       ├── rotate.ogg
│       └── t_spin.ogg
└── config.json
Note
Mentions of ~/.config actually refer to $XDG_CONFIG_HOME, you’re welcome

Cmdline flags

Usage:
	Tetri [--not-my-config] [--shut-up]
Flags:
	--not-my-config  | Doesn't load your config.
	--shut-up        | Disables audio.

How

I mean you can just read the code

Why

fun

Was pretty much just a speedrun
Everything was done as I first thought about it, so it may not be the most efficient/organized
I may or may not continue it later
I would like to render it on the terminal for one, and support other rotation systems