1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
run_server:
cargo run --bin starkingdoms-server
run_http: build_client_bundle
cd web && python3 -m http.server
run_http_prod: build_client_bundle_prod
cd web && python3 -m http.server
build_client_bundle: build_assets
rm -rf web/dist
RUST_BACKTRACE=1 wasm-pack build --target web client
cp -r client/pkg web/dist
build_client_bundle_prod: build_assets
rm -rf web/dist
RUST_BACKTRACE=1 wasm-pack build --target web client --no-default-features --features textures-fast
cp -r client/pkg web/dist
install_tooling:
cargo install wasm-pack --no-default-features
cargo install sheep_cli
clean:
rm -rf target
rm -rf client/pkg
rm -rf web/dist
build_assets: build_assets_full build_assets_375 build_assets_125
build_assets_full:
mkdir -p assets/final/full
inkscape -w 512 -h 512 assets/svg/*.svg --export-type "png"
inkscape -w 2048 -h 2048 assets/svg/earth.svg --export-type "png" # Earth is a different size than all other sprites
mv assets/svg/*.png assets/final/full/
sheep pack assets/final/full/*.png -f amethyst_named -o assets/dist/spritesheet-full
build_assets_375:
mkdir -p assets/final/375
inkscape -w 192 -h 192 assets/svg/*.svg --export-type "png"
inkscape -w 768 -h 768 assets/svg/earth.svg --export-type "png" # Earth is a different size than all other sprites
mv assets/svg/*.png assets/final/375
sheep pack assets/final/375/*.png -f amethyst_named -o assets/dist/spritesheet-375
build_assets_125:
mkdir -p assets/final/125
inkscape -w 64 -h 64 assets/svg/*.svg --export-type "png"
inkscape -w 256 -h 256 assets/svg/earth.svg --export-type "png" # Earth is a different size than all other sprites
mv assets/svg/*.png assets/final/125
sheep pack assets/final/125/*.png -f amethyst_named -o assets/dist/spritesheet-125