Skip to content

Commit 782f321

Browse files
committed
docs: update web build instructions
1 parent 2e62bf2 commit 782f321

2 files changed

Lines changed: 54 additions & 20 deletions

File tree

.github/workflows/deploy-web.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
env:
1717
CARGO_TERM_COLOR: always
1818
WASM_BINDGEN_VERSION: "0.2.118"
19+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
1920

2021
permissions:
2122
contents: read

README.md

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,67 @@
1+
# skifree-rs
2+
13
[![Build](https://github.com/trevarj/skifree-rs/actions/workflows/build.yml/badge.svg)](https://github.com/trevarj/skifree-rs/actions/workflows/build.yml)
2-
# ⛷️ skifree-rs
4+
[![Deploy Web](https://github.com/trevarj/skifree-rs/actions/workflows/deploy-web.yml/badge.svg)](https://github.com/trevarj/skifree-rs/actions/workflows/deploy-web.yml)
35

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.
510

611
![Start of the game v1.0.0](/screenshots/screenshot1.png)
712

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:
928

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
1333
```
1434

15-
### Download Binary from Releases
35+
The GitHub Pages workflow publishes the web build at:
1636

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+
```
1840

1941
## Controls
2042

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 |
2651

27-
## Lots of TODOs
52+
## Development
2853

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

Comments
 (0)