This repository contains the source code for a classic Tetris game clone, built using the Bevy game engine.
The game is cross-platform and supports Web, Linux, Windows, and MacOS.
- Classic Tetris gameplay: Form complete lines to score points and prevent the block pile from reaching the top.
- Multiple Difficulty Levels: Catering to both beginners and seasoned players.
- Block Projections: See a projection of where the block will land, helping you plan your placements.
- Pause Mechanism: Need to take a break? You can pause the game at any time.
- Cross-platform: The game can be played on Web, Linux, Windows, and MacOS.
Here are the controls for the game:
- Up Arrow: Rotate the block.
- Down Arrow: Soft drop.
- Space: Hard drop.
- Left/Right Arrows: Move the block left or right.
- Esc: Pause the game.
Get a local copy, and then run the following steps.
$ cargo build
or
$ cargo run
First, install toolchains:
$ rustup target add wasm32-unknown-unknown
$ cargo install wasm-bindgen-cli
Then, compile wasm and copy file to out directory:
$ ./build_wasm.sh
Run the website:
$ cd wasm/
$ python3 -m http.server
Execute the following commands:
git tag -a "tetris-1.6" -m "official release"
git push --tags
- Bevy - A refreshingly simple data-driven game engine built in Rust.
- bevy_github_ci_template
- Rotation_systems
- play-tetris
- bevy-tetris
This project is licensed under the Apache License 2.0 - see the LICENSE file for more details.