From 9a64cfdf9f3e19c5ebaf3eaca2297527f0ad6cea Mon Sep 17 00:00:00 2001 From: type-two Date: Mon, 27 Jul 2026 18:40:12 +1000 Subject: [PATCH] =?UTF-8?q?Add=20tools/webbuild.sh=20=E2=80=94=20bake=20th?= =?UTF-8?q?e=20whole=20campaign=20to=20one=20wasm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MRPGI (827797a) can now bake a folder of game folders into a single browser build with its title screen intact, so the entire sixteen-case campaign is one 2.1 MB wasm rather than sixteen separate builds. This wraps that for the repo. Deploy stays a separate deliberate step. Co-Authored-By: Claude Fable 5 --- README.md | 13 +++++++++++++ tools/webbuild.sh | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 tools/webbuild.sh diff --git a/README.md b/README.md index 21e5c51..4a9595b 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,19 @@ isn't → Richard Cane → a New Year's ball drop, a pair of lost trousers, and barn owl in a 1950s hat who is lit by a different decade than everything around him. +## Web build + +The whole campaign bakes into a single self-contained wasm — title screen, +all sixteen cases, ~2.1 MB: + +```bash +./tools/webbuild.sh +``` + +Output lands in `MRPGI/web/dist/` (wasm + `index.html` + the macroquad JS +shim). Preview it with any static server; deploy by copying that directory to +the host. The shelf's title comes from [cases/collection.json](cases/collection.json). + ## Regenerating art Sprites are generated locally on MODELBEAST (`flux_local` → `bg_remove_local` → diff --git a/tools/webbuild.sh b/tools/webbuild.sh new file mode 100755 index 0000000..6c02689 --- /dev/null +++ b/tools/webbuild.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# Bake the whole campaign into one wasm and stage it in MRPGI/web/dist/. +# The engine boots into its title screen with all cases on the shelf. +# +# ./tools/webbuild.sh +# +# Deploy is a separate, deliberate step — see README "Web build". +set -e +ENGINE="${MRPGI:-$HOME/Documents/MRPGI}" +cd "$(dirname "$0")/.." +"$ENGINE/web/build.sh" "$(pwd)/cases" +echo "preview locally: cd $ENGINE/web/dist && python3 -m http.server 8899"