A rogue-like game, implemented in Rust, with the
specs ECS library, and
rltk roguelike toolkit.
Follow the instructions on the Getting Started page of the Rust language
website.You should then have
cargo available in your terminal. If you want to run on a Raspberry Pi, or
via WebAssembly, you will also need
Running the game
- For most setups,
- For the Raspberry Pi:
Any movement commands with numbers can use the top row or numpad.
|↑||↑, 8, k|
|↓||↓, 2, j|
|←||←, 4, h|
|→||→, 6, l|
|↖||7, u, q, Home|
|↗||9, y, w, Page Up|
|↙||1, b, a, End|
|↘||3, n, s, Page Down|
|g||Grab an item|
|d||Item drop menu|
|r||Remove item menu|
Ranged weapons (Not magic or scrolls)
|v||Cycle potential targets|
|f||Fire at selected target|
|5, Space||Skip a turn|
|Escape||Save and quit|
By hovering over tiles, the name of item(s) on that tile will appear. For ranged scroll attacks, the left mouse button is used to select a target.
- Install the WebAssembly target via rustup:
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli
- Serve the
wasmfolder with a web server (wasm will not work straight from the html file)
If you want to see what else you can run with Makefile, run
make help. This will list commands and what they do.
Changes from tutorial
- Added a macro to register components for
specs, like was in the tutorial for saving/loading.
- Game state machine is moved to
- Colors (Bracket-lib
RGBstruct) have been converted to static values in
src/colors.rs, to cut down on boilerplate and numbers of ways of generating color values.
- All references to
rltkhave been converted to
rltkwas a facade in
- Made the crate a library and binary, with the binary just starting and running the game engine
- Submodules use named files as the module base, rather than