a crappy, unofficial, implementation of something resembling that one game with randomized falling tetrominos.
- Playable(random piece; pieces rotate and move; rules applied)
- Basic UI/Scoring (lines clear; score is calculated; next piece displayed).
- Game Audio (annoying, but functional).
- Functional Pause/Resume/Restart
- Supports web
- Assumes Rust is installed. If not, see Rustup.
Running the game in debug mode:
cargo runBuilding the game for release:
cargo build --release- Assumes Rust is installed. If not, see Rustup.
- Ensure that the
wasm32-unknown-unknowntarget is installed:rustup target install wasm32-unknown-unknown
Running locally requires wasm-server-runner.
cargo install wasm-server-runner
cargo run --target=wasm32-unknown-unknownBuilding the game for release on the web requires the wasm-bindgen-cli tool.
# Ensure its installed!
cargo install wasm-bindgen-cli
# Build the game for WASM.
cargo build --release --target wasm32-unknown-unknown
# Generate the JS bindings.
wasm-bindgen --out-dir=./out/ --target=web ../../target/wasm32-unknown-unknown/release/tetris.wasm
# NOTE that specifically, this repo is a workspace so target is relative to the workspace root.