Skip to content

[17/20] feat: swap regions on the route to the maze - #155

Merged
arudaev merged 16 commits into
feature/41-chair-guardfrom
feature/35-region-swap
Oct 24, 2026
Merged

arudaev merged 16 commits into
feature/41-chair-guardfrom
feature/35-region-swap

Conversation

@arudaev

@arudaev arudaev commented Oct 24, 2026

Copy link
Copy Markdown
Member

Closes #35. Part of #51 and #54 (the crossing at the pond, Jenny's ram on the clean bridge).

Lane B, taken over from Codex (Alexander, 24 Oct). Stacked on Codex's [16/16] #149.

Stack

#111 → … → #149 [16/16] (Codex) → this [17/20] → [18/20] Jenny's fight → [19/20] crab and drone → [20/20] food pickups

What changes

flowchart LR
  T["Title: Start"] --> G["Hidden Garden, clean<br/>(START, new default)"]
  G -->|"trigger-entered<br/>anomaly: pond-edge"| X1["THD.exe crossing"]
  X1 -->|"OK → swapRegion"| C["Rusty Creek, clean<br/>the bridge"]
  C -->|"trigger-entered<br/>jenny-ram"| J["Jenny charges in<br/>along the bridge"]
  J --> X2["THD.exe crossing"]
  X2 -->|"OK → swapRegion"| M["Rusty Creek, anomaly<br/>the maze, at its start"]
Loading
  • stage/triggers.ts: collision interact boxes now emit trigger-entered (id, kind, region, position) once per entry. The event is new in core/events.ts.
  • stage/swap.ts: swapRegion(scene, { region, state, spawn? }) emits region-turned and reloads the stage through Preload, which now takes the target. ?region= and ?state= still pick the first region; with neither, the game starts in the Hidden Garden, clean.
  • story/Flow.ts: the route between regions. At the garden pond it runs the crossing to clean Rusty Creek. On the clean bridge, Jenny's ram (her approved charge frames, from beyond the right edge of the view) leads to the crossing into the anomaly maze.
  • Other: Preload now also loads boss-jenny and boss-jenny-2. docs/13 gains the contract rows.

How to test

Run npm --prefix game run dev from this branch.

  1. Start opens in the Hidden Garden.
  2. Walk right to the pond (chunk hg-4-0). The crash window appears; OK lands you on the clean Rusty Creek bridge.
  3. Walk right along the bridge. Jenny charges in, the crash window appears, and OK puts you at the start of the maze.

Shortcut from the console:

const { gameEvents } = await import('/src/core/events.ts');
gameEvents.emit('trigger-entered', { id: 'pond-edge', kind: 'anomaly', region: 'hidden-garden', position: { x: 0, y: 441 } });

Verified in the browser: garden → crash → clean bridge → Jenny's charge → crash → the maze, with no console errors. 134 game tests pass (2 new), plus typecheck and the docs check.

Known: on the clean bridge the hero stands high in the frame, under the health cells. The camera clamps at the top of the chunk, so the art wins (the bridge deck is there).

…ure/58-slice-ending

# Conflicts:
#	docs/04-WORLD-AND-LEVELS.md
[2/3] art: grow the Hidden Garden into a five-chunk prologue walk
art: export Dexter at 27 px after approval
feat: end the slice with Dexter's absorb and the continue window
[3/3] art: draw Rusty Creek's parallax layers from region-wide plates
Interact boxes now emit trigger-entered once per entry. swapRegion reloads the stage through Preload, and the slice starts in the Hidden Garden. The Flow scene runs the crossing at the pond, then Jenny's ram on the clean bridge, which turns the creek into the rust maze.
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
wincs Ready Ready Preview Oct 24, 2026 1:23am UTC

Request Review

@github-actions github-actions Bot added area:art Sprite sheets, stage plates, direction pack area:stage Chunks, layers, collision, clean/anomaly states area:story Prologue, Dexter, crossings, ending area:pipeline Rerunnable art and export scripts area:ui HUD, crash window, title, menus area:docs Design docs, README, contributor guides labels Oct 24, 2026
@arudaev
arudaev marked this pull request as ready for review October 24, 2026 01:34
@arudaev
arudaev merged commit 339c66f into feature/41-chair-guard Oct 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:art Sprite sheets, stage plates, direction pack area:docs Design docs, README, contributor guides area:pipeline Rerunnable art and export scripts area:stage Chunks, layers, collision, clean/anomaly states area:story Prologue, Dexter, crossings, ending area:ui HUD, crash window, title, menus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant