Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctaylo21/rust_rogue
Roguelike game built in Rust
https://github.com/ctaylo21/rust_rogue
Last synced: 10 days ago
JSON representation
Roguelike game built in Rust
- Host: GitHub
- URL: https://github.com/ctaylo21/rust_rogue
- Owner: ctaylo21
- Created: 2020-10-11T21:44:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-02T19:07:09.000Z (almost 4 years ago)
- Last Synced: 2024-12-09T05:36:41.151Z (13 days ago)
- Language: Rust
- Size: 671 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Roguelike in Rust
[Demo](https://ctaylo21.github.io/rust_rogue/)This is a roguelike game following this [awesome tutorial](https://bfnightly.bracketproductions.com/chapter_0.html).
## Controls
* `w`/`a`/`s`/`d` OR `1-9` keys - movement
* `g` - pick up item
* `i` - inventoryThe mouse is used for spells or items that require targeting
## Building for Web (WASM)
To build for Web Assembly, follow the instructions [here](https://bfnightly.bracketproductions.com/webbuild.html).For this project, to ensure the latest version is avaiable on the demo page (linked above), run:
```
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen target/wasm32-unknown-unknown/release/rogue.wasm --out-dir docs --no-modules --no-typescript
```Now the current source could will be built for web inside of the `docs` folder as `rogue_bg.wasm` and `rogue.js`.
You can even run it locally using [http-server](https://www.npmjs.com/package/http-server):
```
http-server docs/
```