Repository navigation
[1/3] art: give the Hidden Garden parallax layers from a depth key - #143
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks done
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
You asked for layers like the art. The Hidden Garden had one flat rear layer above the path, so nothing moved at its own depth. It now has docs/04's stack: sky 0.1 · far 0.25 · mid 0.6 · rear, water, path 1.0 · foreground 1.2. No hand-painted masks were used:
depth_layers.py key: sunburst repaints the finished chunk as a flat-colour depth key, one colour per band. Masks come from the board's own picture, as AGENTS rule 2 requires.masks:fill: for sky, far and mid, the model paints what the nearer layers hide, behind the layer's own skyline. The painting is kept only on pixels the nearer layers own, so at rest the stack still rebuilds the art exactly (export_stage.py --verify). When the camera moves, it reveals painted scenery, never holes.compare.py parallax: renders the region fromexport.jsonat several camera positions, the way the game draws it.The plan diagram, palette and rules are in docs/09 – Parallax layers from a depth key.
Comparison (AGENTS.md rule 4)
hg-0-0-parallax.png shows the chunk at camera x = 0, 440 and 880. The top row is the approved chunk, unchanged; in the next two each layer has moved by its own speed.
Known and accepted: at x = 880 the far forest's left end shows a short vertical edge behind the mid trees. There is no plate past the ends of a tree line on purpose: the model painted sun glow with a flat top there.
Lane B
The loader in Codex's stack places a parallax layer at
chunk.x × 2160. On any chunk after the first that puts it off-screen, Rusty Creek included. I commented the fix on #116. This region is one chunk, so it is correct either way until then.How to test
In the game, open
?region=hidden-gardenonce lane B's stage loader (#116 →) is merged, and walk right: the sky barely moves, the forest drifts and the reeds go by at walking speed.Stack
#148 replaces the per-chunk slow plates with region-wide plates in chunk tiles and moves the fill plates out of git.
Issue
Closes #142
Verification
python -m unittest discover -s scripts -p "test_*.py": 87 OK (test_depth_layers.py: snapping, specks, the sky edge, hazy treetops, the skyline, which masks are written)split_layers.py --checkandexport_stage.py --verify: exactcheck_docs.py