board
What the floor says. This module owns the tint and the outline of the 80 `tile_<x>_<y>` plates under the `Board` anchor, and the marker geometry that sits on top of them.
game.cam.board
What the floor says. This module owns the tint and the outline of the 80
tile_<x>_<y> plates under the Board anchor, and the marker geometry
that sits on top of them.
local Board = require("game.cam.board")
Board.attach() -- find the plates (safe to repeat)
Board.buildMarkers(entity.find("Board"))
Board.paint(view, pulse) -- the plates
Board.placeMarkers(view, pulse) -- the slabs, rings, chevrons and pin
Board.rest() -- nothing selected
The view
One table describes everything the board is saying:
| Key | What it is |
|---|---|
tiles | The referee's tile table — blight, fire and water colour the floor. |
reachable | A set keyed by Core.key. |
reachInfo | The referee's own cell records, keyed the same way: AP cost, cover, danger. |
pathSet / path | The previewed walk, as a set and as an ordered list. |
dest | The tile the walk ends on. |
selected | The selected unit's tile. |
hover | The tile under the pointer. |
threat | A set of tiles something is covering. |
Why highlights are emissive geometry, not tint
The greenhouse is a dark room lit in shafts. A tile's tint is lit like any other surface, so in the shadow between two shafts it falls to black — and a highlight the player cannot see is not a highlight.
Two things survive that, and the module leans on both:
- The plate's outline is drawn unlit, so every plate carries a faint grout line and the grid is a grid in the dark as well as the light.
- Emissive geometry carries its own light, so every highlight is a
thin emissive slab (
cam_ov_*) laid a hair over the plate rather than a tint on it, and the rings, chevrons and destination pin (cam_mk_*) are emissive too.
Reading a turn without counting tiles
reachInfo carries the AP a step costs, so one action point away is drawn
as the bright near ring and two as a cooler far ring. A tile the referee
marks dangerous goes red, edge and all.
Elevation
topOf(x, y, lift) reads the plate's live transform rather than the
grid, so a tile a root-knot has heaved up carries its ring, its chevron
and its highlight slab up with it.
Names it owns
cam_ov_1 … cam_ov_60 (highlight slabs) and cam_mk_* (selectRing,
hoverRing, destPin, pip_1 … pip_24). buildMarkers sweeps both
sets from the live world before rebuilding, so a hot reload never leaves a
second copy behind.
Scoped to this part · feeds back into the world's score.