valley
The drowned mountain valley of Amagiri: the ground, the water over it, and everything standing in both.
valley
The drowned mountain valley of Amagiri: the ground, the water over it, and everything standing in both.
build(root) lays the whole place out against Game.ANCHORS, so the ground
under every anchor is that anchor's own y. It is safe to run again at any
time — Game.rebuild("valley") empties the slice's root first, and the sea is
torn down and remade with it.
What it puts in the valley
| Place | What stands there |
|---|---|
| the south shore | the landing the player arrives on, its gate, two lanterns and a signpost long past reading |
| the flood | an avenue of nine torii walking out into the water toward the shrine, each standing deeper than the last |
| the shrine | a great vermillion torii out in the water, a platform of sunken paving, and the honden raised clear of the flood on its own posts |
| the drowned street | eight houses with the water in their doorways, a tall house at the head of the street, and a red footbridge over it |
| the foot of the cliff | a gate of dark stone, two guardian boulders, and a bare tree |
| the cliff path | a kerb along the drop and a lantern every few turns |
| the crown | three steps, a plinth, and the bell tower over it |
Boulders, grass and reeds are scattered across the rest by rule rather than by hand, so changing a count or a spacing is one edit.
How it is built
Everything sharing a material is merged into one mesh: a torii is forty quads,
and every torii, house, post and lantern in the valley wearing one material
becomes a single draw. vprops holds the shapes, this module decides where
they stand, and the whole place is a dozen entities.
Those entities are temporary. Their meshes are runtime GPU resources this build makes fresh on every load, so writing them into the scene file would save a handle naming a registry slot the next session will not have.
The water
One ocean, at sea level Game.WATER_LEVEL, with the sea state cut down to a
flooded valley: almost no wind, no long swell at all, the seabed switched off
because vheight lays it, and wave patches of tens of metres rather than the
kilometres an open sea uses. Reflections need an environment probe — the build
captures one, and without it the flood reflects nothing and reads as a plane.
Neighbours
vheight— the height function and the ground built from it.vprops— the shapes.game.Game— the anchors, the water level and the cliff path.
Scoped to this part · feeds back into the world's score.