A tetris clone with a twist.
- Spacebar spawns a new tetromino.
- Arrow keys (or hjkl) control the movement and rotation of the tetromino.
- You can control a tetromino until you spawn a new one, or until you score a line (whichever happens first). There's no further limit to how long you can control a tetromino.
Written in Rust, using glium and nphysics.
It's possible to use polyominos of any size instead of tetrominos by generating code using the Python program tools/polyominoes.py
.
For example, to compile the game for pentominos (5 blocks / polyomino):
- Run
./tools/polyominoes.py 5 pentominos
- Copy the output of this command into the module
polyominos
insrc/consts.rs
- Fill in a value for the linear and angular forces in the generated code (marked by
TODO
) - Add the relevant feature (
pentominos = []
) inCargo.toml
- Recompile and run the game with this feature activated:
cargo run --release --no-default-features --features="pentominos"