pagurus
Examples
Snake
Traditional snake game: examples/snake_game
You can play this game on itch.io.
How to build and run locally
Build the game:
$ cargo build --release -p snake_game --target wasm32-unknown-unknown
$ ls target/wasm32-unknown-unknown/release/snake_game.wasm
Run the game using SDL:
$ cargo run --release -p sdl_snake
Run the game on Windows:
$ cargo run --release -p windows_snake
// or, if you use WSL2 (Ubuntu)
$ sudo apt install gcc-mingw-w64-x86-64
$ rustup target add x86_64-pc-windows-gnu
$ cargo run --target=x86_64-pc-windows-gnu --release -p windows_snake
Run the game on a Web Browser:
$ cd pagurus_web/
$ npm install
$ npm run build
$ npm run example // A HTTP server listening on 8888 port will start
$ open http://localhost:8888/examples/web_snake/
Projects that use Pagurus
- sile/pixcil: Pixel Art Editor
- sile/ffmml: An MML(Music Macro Language) Implementation