Skip to content

[4/4] feat: export stage regions with the docs/13 manifest - #110

Merged
arudaev merged 4 commits into
chore/85-hidden-garden-collisionfrom
chore/109-export-stage
Oct 23, 2026
Merged

arudaev merged 4 commits into
chore/85-hidden-garden-collisionfrom
chore/109-export-stage

Conversation

@arudaev

@arudaev arudaev commented Oct 23, 2026

Copy link
Copy Markdown
Member

What and why

python scripts/export_stage.py turns art/stages/ into what the game loads. It writes game/public/assets/stages/<region>/stage.json, the docs/13 manifest Vatsal's loader (#24) and collision (#34) read, and copies every layer plate and collision file next to it.

  • Manifest shape. Chunks with grid x/y; per state, the layers in draw order with z (the docs/04 role), scroll and file, plus the state's collision file. Draw in list order: Rusty Creek's soft water goes last, exactly as creek_layers.py composes it. docs/13 now spells the shape out.
  • Config. Each region has an export.json. Rusty Creek: 3 chunks, clean (clean architecture) and anomaly (supports and traversal), with the right chunk reusing the left's shared plates, each copied once. Hidden Garden: hg-0-0 from split_layers.py.
  • Generated, not committed. The plates already live in art/stages/; copying them would add 18 MB of byte-identical files. game/public/assets/stages/ is in .gitignore. The export needs only the standard library, so once [1/4] chore(shared): scaffold the phaser game runtime #94 is on main, predev/prebuild in game/package.json can run it. That's a small shared-file PR after the merge.
  • --verify rebuilds every state from the exported files in manifest order and compares it with the region's composed art. It now runs in the art CI.

Issue

Closes #109

Stack

Merge bottom up with merge commits; retarget the next PR to main before merging it.

Verification

  • python scripts/export_stage.py --verify: rusty-creek has 3 chunks, 6 states and 19 files; hidden-garden has 1 chunk, 1 state and 5 files. All 7 states are rebuilt exactly.
  • python -m unittest discover -s scripts -p "test_*.py": 5 new tests (manifest, shared plates copied once, verify catches a wrong draw order, bad config, the committed regions).
  • python scripts/check_docs.py
  • Rusty Creek's collision isn't on this branch yet (feat: add Rusty Creek collision with a reach checker #97). Once feat: add Rusty Creek collision with a reach checker #97 is merged, the same export picks it up with no change.

@arudaev arudaev self-assigned this Oct 23, 2026
@github-actions github-actions Bot added area:art Sprite sheets, stage plates, direction pack area:delivery Build, Vercel, CI, workflows, the board area:stage Chunks, layers, collision, clean/anomaly states area:pipeline Rerunnable art and export scripts area:docs Design docs, README, contributor guides labels Oct 23, 2026
@arudaev arudaev linked an issue Oct 23, 2026 that may be closed by this pull request
5 tasks
…-stage

# Conflicts:
#	.github/workflows/art-pipeline.yml
#	docs/13-PRODUCTION-PIPELINE.md
@arudaev
arudaev marked this pull request as ready for review October 23, 2026 20:50
@arudaev
arudaev merged commit f352188 into chore/85-hidden-garden-collision Oct 23, 2026
7 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:delivery Build, Vercel, CI, workflows, the board 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.

[M0-S14] Export stages for the game: stage.json manifest

1 participant