Avokadoen / tetris_wasm

Tetris implemented in rust and targetting wasm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WASM Tetris

Tetris implemented in rust and exported as wasm! Currently has most of the basic functionality you can expect from Tetris, bugs included!

A live demo can be found here!

Tetris gameplay

Prerequisite

You will need wasm-pack and npm Project is built mainly in windows, but it works on linux too!

How do to build and run ๐Ÿš€

  • clone the repository i.e ssh:
git clone git@github.com:Avokadoen/tetris_wasm.git
  • navigate to project root
cd ./tetris-wasm
  • run wasm-pack
wasm-pack build
  • navigate to ./www from root
cd ./www
  • install dependencies through npm
npm install
  • run npm to host local server (make sure you are not hosting anything on 8080, or change port)
npm run start (to change port: -- --port 8008)
  • go to localhost:8080 in your favourite browser ๐ŸŽ‰

Contributers

Thanks to leudz for fixing my ugly c-style loops and recommending some lint tools. See #17

About

Tetris implemented in rust and targetting wasm

License:Apache License 2.0


Languages

Language:JavaScript 47.3%Language:Rust 41.7%Language:HTML 11.0%