▣
module · drop-in viewer
What it does
terrain
The shape of the hill, and the one source of truth for it.
A moor is not a dome: it has a shelf the track climbs onto, hollows where the
mist gathers, and a spur of higher ground the light catches early. This module
states that shape and registers it with Core.setGroundFn — requiring the
module IS the registration, so anything that has asked for the terrain has
already told game.core about it.
game.world.hill.mesh is baked from T.height, and game.world.Hillside
requires this module before it places a single stone.
local T = require("game.world.terrain")
T.height(x, z) -- metres above the datum; the same number Core.ground gives
T.slope(x, z) -- 0 flat .. 1 near-vertical
T.pathOffset(z) -- where the worn track crosses at this z
T.PATH -- the two harmonics the track walks (the turf shader's path_params)
T.HOLLOWS -- the bowls the mist pools in
T.TARN, T.tarnLevel()
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.