Marks
The rules slice owns three moving things a player has to read from a distance: a rival swarm, the dust it kicks up while it works, and a crop duster with its spray trail. This module builds their meshes and materials; `Rivals` and `Sprayers` own the entities.
Marks — what the round puts on the farm
The rules slice owns three moving things a player has to read from a distance:
a rival swarm, the dust it kicks up while it works, and a crop duster with its
spray trail. This module builds their meshes and materials; Rivals and
Sprayers own the entities.
Everything draws through one lit vertex-colour shader, so a cloud, a plume and an aircraft each cost one material and no textures. Clouds and plumes are scattered unlit triangles rather than solid volumes: sparse geometry reads as mist without needing a blend mode.
Marks.material(name, tint, emissive) -- cached by the LOOK, not the label
Marks.cloudMesh(n, rx, ry, rz, tri, colour, jitter, seed)
Marks.columnMesh(n, radius, height, tri, colour, seed)
Marks.dusterMesh() / Marks.plumeMesh()
Marks.rivalCloudMesh(seed) / Marks.dustColumnMesh(seed)
Marks.spawnProxy(name, parent, mesh, material)
Marks.headingQuat(heading) -- heading 0 = +Z, the game's convention
spawnProxy replaces any leftover of the same name before spawning. A module
hot reload re-runs the slice's init and entering play despawns temporary
entities, so without it every reload would leave another dead aircraft parked
over the farm.
Scoped to this part · feeds back into the world's score.