An implementation of the single-page RPG Potato by Oliver Darkshire written for the WASM-4 fantasy console.
Build the cart by running:
cargo build --release
Then run it with:
w4 run target/wasm32-unknown-unknown/release/cart.wasm
If you want to "release" the game by creating a runnable website you should first run it through the WASM optimiser provided by binaryen:
wasm-opt target/wasm32-unknown-unknown/release/cart.wasm -o poteto.wasm -Oz --strip-dwarf --strip-producers --zero-filled-memory
This spits out a poteto.wasm
file which can be bundled with the WASM-4 runtime into a website:
w4 bundle poteto.wasm --title "ポテート" --html index.html
The resulting index.html
can be run as-is, even offline.