|
| 1 | +# skifree-rs |
| 2 | + |
1 | 3 | [](https://github.com/trevarj/skifree-rs/actions/workflows/build.yml) |
2 | | -# ⛷️ skifree-rs |
| 4 | +[](https://github.com/trevarj/skifree-rs/actions/workflows/deploy-web.yml) |
3 | 5 |
|
4 | | -A SkiFree clone written in Rust using the ggez game engine |
| 6 | +A SkiFree clone written in Rust with ggez. The current version keeps the |
| 7 | +original downhill arcade feel while adding a longer mountain, NPC collisions, |
| 8 | +tricks, speed boosts, jumps, scoring, an abominable snowman chase, and a WASM |
| 9 | +build for GitHub Pages. |
5 | 10 |
|
6 | 11 |  |
7 | 12 |
|
8 | | -## How to Play |
| 13 | +## Play |
| 14 | + |
| 15 | +Desktop: |
| 16 | + |
| 17 | +```sh |
| 18 | +cargo run --release |
| 19 | +``` |
| 20 | + |
| 21 | +Guix development shell: |
| 22 | + |
| 23 | +```sh |
| 24 | +guix shell -m manifest.scm -- cargo run --release |
| 25 | +``` |
| 26 | + |
| 27 | +Web build: |
9 | 28 |
|
10 | | -```bash |
11 | | -git checkout https://github.com/trevarj/skifree-rs.git && cd skifree-rs |
12 | | -cargo install --path . # or just `cargo run --release` |
| 29 | +```sh |
| 30 | +cargo build --release --target wasm32-unknown-unknown |
| 31 | +wasm-bindgen --target web --out-dir dist/pkg --out-name skifree_rs target/wasm32-unknown-unknown/release/skifree_rs.wasm |
| 32 | +cp web/index.html dist/index.html |
13 | 33 | ``` |
14 | 34 |
|
15 | | -### Download Binary from Releases |
| 35 | +The GitHub Pages workflow publishes the web build at: |
16 | 36 |
|
17 | | -You can download a Linux x86_64 binary on the [Release page](https://github.com/trevarj/skifree-rs/releases) |
| 37 | +```text |
| 38 | +https://trevarj.github.io/skifree-rs/ |
| 39 | +``` |
18 | 40 |
|
19 | 41 | ## Controls |
20 | 42 |
|
21 | | -Key | Description |
22 | | ---- |--- |
23 | | -Left/Right arrows | Move |
24 | | -Z or X | Tricks 1 & 2 |
25 | | -C | Flip |
| 43 | +| Key | Action | |
| 44 | +| --- | --- | |
| 45 | +| Left / Right | Turn | |
| 46 | +| Down | Tuck for speed | |
| 47 | +| F | Speed boost | |
| 48 | +| Z / X | Tricks | |
| 49 | +| C | Flip | |
| 50 | +| R | Restart after a crash or snowman attack | |
26 | 51 |
|
27 | | -## Lots of TODOs |
| 52 | +## Development |
28 | 53 |
|
29 | | -- [ ] AI for NPCs (noob, snowboarder, abominable snowman) |
30 | | -- [x] Wrap the map around when at edge |
31 | | -- [ ] Add slalom course |
32 | | -- [x] Add trick animations / controls |
33 | | -- [ ] Add scoring system |
34 | | -- [ ] Add game title at start |
| 54 | +Useful checks: |
| 55 | + |
| 56 | +```sh |
| 57 | +cargo fmt -- --check |
| 58 | +cargo clippy --all-targets --all-features -- -D warnings |
| 59 | +cargo test |
| 60 | +cargo check --target wasm32-unknown-unknown |
| 61 | +``` |
| 62 | + |
| 63 | +Debug hitboxes are available behind a feature flag: |
| 64 | + |
| 65 | +```sh |
| 66 | +cargo run --features debug-hitboxes |
| 67 | +``` |
0 commit comments