Coldwave Read the docs

Protocol: ground#

The ground commands a program sends to a running game, as the engine describes them: what each takes, what it answers and what it does. Back to all commands.

ground.at#

ground.at {x: number, z: number} -> {step: integer, entity: text, height: number, normal: [number], layers: [number]} · read, read-only

Reads the ground under a point: of the things with a Ground (a height field, .ground.toml) the lowest whose field is under x and z, the height of its surface there and its normal, as the cooked heights have it: each cell two triangles, split from its corner nearest -x and -z, the way the physics splits it. A Ground is placed by its thing's Transform (x, y, z; its turn and scale are not read). Nothing is changed.

ParametersTypeMeaning
xnumberMetres along x, in the world.
znumberMetres along z, in the world.
ResultTypeMeaning
stepintegerHow many fixed steps have run.
entitytextThe thing whose ground is there, by its name (or id); null where no ground is.
heightnumberThe surface's y there, in the world; null where no ground is.
normal[number]The surface's normal there, [x, y, z], one long and up; null where no ground is.
layers[number]Each of the ground's picture layers' weight there, in their order, adding up to 1 (the rule its pictures are drawn by); empty for a ground with no layers, drawn in its colour.

Generated from Coldwave 0.0.1 r289, 2026-11-30 by the binary itself: do not edit by hand.