tetr::
A
Gameplay
tetr::
is an implementaion of modern Tetris, and essentially a clone of tetr.io. This means:
- the game provides a hold slot
- the game previews 5 next pieces and uses a 7-bag generator for improved game stability
- the games uses the super rotation system allowing for some cool tricks
- you should use hard drop for eveything
- there is a ghost piece previewing where the block will fall
All these features together make the game almost impossible to lose in single- player mode. The fun is in multiplayer mode, which is incredibly good on tetr.io, except that tetr.io doesn't provide the classic split-screen game.
This game doesn't provide online multiplayer yet, however, it is on the list of features to be added once the game is playable enough.
Non-gameplay
The game provides the following features (this is a TODO list):
- Single-player mode
- Split screen mode for 2 players
- Split screen mode for
n
players - Settings screen
- Online multiplayer
Why another tetris game?
- tetr.io has ads
- tetr.io lacks split-screen multiplayer
- tetr.io is a web game, which impacts the performance and user experience
- I wanted to have a take at implementing Tetris, as there is a surprising amount of technical challenges involved
Playing the game
To build and launch the game, make sure you have the Rust programming language installed and type:
cargo run -r
To compile the game only, use cargo build -r
. The executable of the game should be located in target/release/
The game requires a resources
directory in its CWD, so make sure are are cd'd into the root direcotry of the game (where this README file is located), or have it copied in your CWD.
Backgrounds
The game also looks for a backgrounds
folder in its working directory, from which it picks random wallpapers. All of the backgrounds are taken from DT's wallpaper collection, which in turn uses pictures from unsplash.
Keybinds
The single-player keybinds conform to the Tetris guideline.
The two-player keybinds are as follows:
Left player
- A - Left
- D - Right
- W - RotateCW
- LCtrl - RotateCCW
- S - SoftDrop
- Space - HardDrop
- LShift - Swap
Right player
- Numpad1 - Left
- Numpad3 - Right
- Numpad5 - RotateCW
- NumpadComma - RotateCCW
- Numpad2 - SoftDrop
- Numpad0 - HardDrop
- NumpadEnter - Swap