A Tetris clone written in Rust.
The fall speed increases every 10 tetrominoes.
- E / Q or Up => rotate
- A / D or Left / Right => move
- S or Down => fast move
- space => drop immediately
- F1 => restart the game at any time
-m
By default the game starts with a resolution of 600x800. With the-m
option a minified version gets rendered which should also work on smaller screens.-o
Switches off the background music-i
specifies the number of initial lines whose cells should be randomly filled
Prerequisites:
- Rust 1.0 or newer (best way to install is rustup)
- install External Dependencies
Build & run:
git clone ...
the repository- cd into the
rusty-tetris
directory cargo run --release
Windows:
if you use the msvc based version of Rust you have to take care to install the msvc development libs of SDL2 and SDL_mixer.
- download SDL2-devel-2.x.x-VC.zip
- download SDL2_mixer-devel-2.x.x-VC.zip
- unzip and copy the *.lib files into your Rust lib directory typically
%HOMEPATH%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib
- finally you need to copy the *.dll files next to the rusty-tetris executable or if you run rusty-tetris with cargo you can place them in the projects root directory.
The project uses the piston game engine with the glutin backend.
The piston game engine currently depends on a few external non-Rust libraries
- SDL and SDL2_mixer (see rust-sdl2 library README)
- freetype (see here)
The background music
- gravitationalWaves by airtone (c) copyright 2016 Licensed under a Creative Commons Attribution Noncommercial (3.0) license. http://dig.ccmixter.org/files/airtone/55021
The initial Rusty Tetris version was implemented by bachm.