Skip to content

[2/3] art: grow the Hidden Garden into a five-chunk prologue walk - #148

Merged
arudaev merged 1 commit into
art/142-garden-layersfrom
art/50-prologue-chunks
Oct 24, 2026
Merged

arudaev merged 1 commit into
art/142-garden-layersfrom
art/50-prologue-chunks

Conversation

@arudaev

@arudaev arudaev commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What and why

The prologue was one 2160 px chunk, about 15 s of walking. docs/03 wants about three minutes of calm garden before the pond. It is now five chunks (10 800 px) in one continuous place, planned in docs/04 – Hidden Garden, the prologue level:

Chunk Beat
hg-0-0 the gate The garden gate; Dexter's bench under a lantern; a fallen birch
hg-1-0 the hill A grassy hill with an oak on the crest; a hollow behind the grass (muffin, drop-through)
hg-2-0 the terraces Stone steps up to a terrace; a shed with a ladder to its roof (a glint up there)
hg-3-0 the boardwalk The embankment breaks: a gap with stepping stones
hg-4-0 the pond The approved chunk, renamed from hg-0-0: the jetty, the wrong reflection, the shove

the whole walk

How it was made (level generation, docs/09)

scripts/grow_stage.py grows chunks leftwards from the approved pond. The diagram and the five failed tries are in docs/09 – Growing a region chunk by chunk.

  • grow: every API call is a 2160×720 canvas, 3:1 (the API's limit).
    • First, 1440 px are painted over a flat layout guide, next to 720 px of the neighbour.
    • Then the last 720 px, overlapping the first piece by 128 px and joined along a min-error cut (image quilting).
    • The seam's colours are matched to the neighbour. The pond is never repainted.
  • feature: one masked repaint per route feature (the gap, the hill, the terraces and shed, the gate, the bench, the log), plus removing extra suns. The model keeps grown scenery flat, so features are a separate step.
  • join: repaints 320 px across each seam between two new chunks. Seam colour steps are now 7–12, against 7–9 inside the art.
  • Layers: depth key, masks, split and fills for every chunk, as in [M3-S2b] Hidden Garden: parallax layers from a depth key #142. Each slow layer and the foreground is now one region-wide plate, quilted from the chunks' plates. Per chunk, plates at scroll ≠ 1 overlap or leave gaps. The plates are cut into 2160 px tiles, tile j carried by chunk j, so lane B's current loader shows the right part with no change, and no file is over 3 MB.
  • Collision: walk lines are traced from each key's play band (depth_layers.py collision), then authored by hand:
    • stairs become ramps of ≤ 40° (docs/13);
    • the hollow gets a one-way stretch above it and a grass-curtain climb back out;
    • the shed has a ladder climb zone;
    • the pond's low wall gets its own line so the chunks join.
  • Hand-placed: the player spawn and Dexter on the bench, five Dexter waypoints, the hollow secret, the muffin and the roof glint.
  • Checks: collision_check.py reports 0 problems (reach, joins, slopes). Overlays.

Comparison (AGENTS.md rule 4)

parallax.png, as the game draws it at camera x = 0, 2700, 5400, 8640. The last row is the pond at rest and matches the approved chunk; export_stage.py --verify rebuilds all five chunks exactly at rest.

Known and left for your review:

  • A soft sun glow remains behind the oak near the shed.
  • A few blocky blue patches where an extra sun was repainted.
  • A few leaf fringes are keyed as sky and drift at 0.1.
  • The grown chunks' lily pads are keyed as foreground and drift at 1.2.
  • The path runs on the embankment top (y ≈ 385) from the hill to the boardwalk, and drops to the pond's path (441) at the pond's low wall.

Lane B

Superseding my #116 comment: with region plates in chunk-wide tiles, x = chunk.x × 2160 is the right placement, so no loader change is needed. Rusty Creek's per-chunk 0.2 / 1.1 / 1.15 layers still overlap and leave gaps; I'll quilt them the same way in a follow-up.

How to test

python scripts/compare.py parallax art/stages/hidden-garden --at 0 1000 2000 4000 6000 8640 --out tmp/p.png
python scripts/collision_check.py art/stages/hidden-garden --overlay
python scripts/export_stage.py art/stages/hidden-garden --out tmp/stages --verify

Once lane B's loader is merged, play ?region=hidden-garden and walk right from the gate.

Issue

Refs #50 (art, layers and collision; Dexter's walk is story code on top of lane B's stage). Refs #63 (left/right neighbour growth; transition chunks are not done).

Stack

Verification

  • python -m unittest discover -s scripts -p "test_*.py": 91 OK (new: skyline, walk tracing, ramps, hollows, RDP, region plates)
  • split_layers.py --check, collision_check.py and export_stage.py --verify: exact, 0 problems
  • check_docs.py

@arudaev arudaev self-assigned this Oct 24, 2026
@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 12:20am 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:pipeline Rerunnable art and export scripts area:docs Design docs, README, contributor guides labels Oct 24, 2026
@arudaev arudaev changed the title [2/2] art: grow the Hidden Garden into a five-chunk prologue walk [2/3] art: grow the Hidden Garden into a five-chunk prologue walk Oct 24, 2026
@arudaev
arudaev added this pull request to stack #152 October 24, 2026 00:37
@arudaev
arudaev merged commit 1397868 into main Oct 24, 2026
9 of 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant