squirrel-labs / ratatosk

Rask is a platformer game built with WASM and Rust
https://rask.rocks
MIT License
15 stars 1 forks source link
game rask ratatosk rust shared-memory wasm web

Rask Build Status

You might have heard of a game called Nidhogg. The aim of this project is to provide a similar game accessible through the web.

Implementation details

The game is written in the programming language Rust. On the frontend we use Web Assembly so we can also use Rust on the frontend.

Wiki

For documentation and overview purposes we have a Wiki.

Discord

If you have any questions or just want to contribute, we also have a discord server.

Setup

This is a simple recipe on how to get ratatosk working locally. Further details can be found in Wiki.

Prerequisites

Optionally, all dependencies can be obtained with Nix by running nix-shell in the project's root.

Install and build

First of all, you need to install the nightly toolchain using rustup:

rustup install nightly-2020-02-28
rustup default nightly-2020-02-28
rustup target add wasm32-unknown-unknown  # for the frontend part
cargo install cargo-make

Please note that we explicitly pin the nightly channel to a certain date to ensure that each developer uses the same toolchain which helps to reproduce compiler issues on multiple setups.

Now you can build the project with cargo:

cargo make all

The following scripts can be used to start test servers

cargo make serve-frontend # for the wasm/frontend setup
cargo make serve-backend  # for the backend/game_server

For development purposes it might be helpful to activate the watch-profile in the build-system:

cargo make serve-backend -p watch