The pieces finally meet: procgen dungeons + the baked EoB atlas pipeline + the Vigor combat engine become one game. Three fixed pre-baked floors (seeds 7 → 69 → 59, 208 frames), monsters/loot/encounters rerolled per run and composited over the empty scenes; the Ember Sovereign waits at the bottom. - game-wasm: run state machine in Rust (manifest nav graph as dungeon truth, seeded spawning by theme/depth, embedded combat-core Encounter, vigor/fatigue persistence between fights, rest/potions/relics/flee, permadeath + victory). 8 native tests incl. a whole-run bot and a ScriptedPlayer boss-winnability probe used for tuning. - game-web: no-framework front-end — title/death/victory screens, baked frames with screen-blend monster portraits, combat overlay (dual vigor bars, cast telegraphs, cooldown sweeps, floaters), minimap with fog, all SFX synthesized in WebAudio. - balance: floor-scaled levels with a hero's edge over trash, no packs on floor 1, boss tuned by sim sweep (~35%/55% win at skill 50/80). - campaign atlases now versioned (tools/.gitignore exception); boss portrait added to the Z-Image roster. Verified end-to-end in-browser: an autopilot beat the full game through the real UI (10 fights, 2 flees, Sovereign down), and died plenty before that. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| portraits | ||
| game.js | ||
| index.html | ||
| README.md | ||
| style.css | ||
Vigor — playable combat front-end
A browser battler that drives combat-core (via combat-wasm) in real time: pick
a foe, manage your single Vigor pool, and try not to spend your survival. The
engine is authoritative and unchanged — this is just a presentation layer and a
[HumanController] pushing your intent between ticks.
What's here
index.html/style.css/game.js— the UI (torch-lit dark fantasy).portraits/— AI-generated monster art (Z-Image on the LAN workstation; see../tools/portraits.py). Committed so the game runs offline.pkg/— the wasm-bindgen output (gitignored; rebuild with the command below).
Build & play
# 1. Build the wasm bridge into ./pkg (cargo on PATH; from combat/)
export PATH="$HOME/.cargo/bin:$PATH"
wasm-pack build combat-wasm --dev --target web \
--out-dir ../combat-web/pkg --out-name combat_wasm
# 2. Serve combat/ as the web root (so the page AND configs/ resolve)
python3 -m http.server 8013 --directory .
# 3. Open the game
open http://127.0.0.1:8013/combat-web/
(Re)generate portraits — needs the LAN ComfyUI / Z-Image server up:
python3 tools/portraits.py --url http://192.168.1.26:8188 --size 768
How to play
- Click a foe to start. The fight runs in real time (10 ticks/second).
- Auto-attack is on by default (toggle with the AUTO button or
space). - Abilities: click a card or press
1–5. Each shows its fill cost — spending fill lowers your capacity, so a big hit leaves you fragile. - Watch the dual bar: bright = current fill, dim = regen headroom, the gold
line is your ceiling (
cap), and the dark cracked zone on the right is fatigue — ceiling lost for the rest of the fight. When the ceiling collapses to your fill, the next hit overruns you (daze → KO). - Second Wind restores ceiling; Guard opens a brief block window. Passive auto-attacking beats the weak foes (Dire Rat, Skeleton); the Golem, Troll, and Wraith want real play — recover, punish when they're spent, don't over-commit.
Difficulty is a table: edit ../configs/default.json (monster stats, ability
numbers, the con curve) to taste — the same file the sim tunes against.