pieces
What a cell, a target frame, a frisket, a crystal and a tray slot are made of. The `Board` component decides *when*; this module decides *what*.
game.board.pieces
What a cell, a target frame, a frisket, a crystal and a tray slot are made
of. The Board component decides when; this module decides what.
The two lanes
Every quad the board draws wears one of two materials over
game/board/art/board_ink.shader and carries its own colour in the
per-instance channel, so two hundred quads cost one pipeline and one material
row instead of two hundred materials:
| Lane | Carries |
|---|---|
| 0 | (r, g, b, emissive) — the colour, and how much of it is its own light |
| 1 | (alpha, roughness, metallic, -) |
Pieces.ink(e, rgb, emissive) and Pieces.surf(e, alpha, roughness, metallic)
are the writers. Colours in Pieces.PALETTE are linear — the art
direction states them in sRGB and these are those hexes through the 2.2 curve,
because that is the space s.albedo is read in.
What decides a colour
Pieces.cellInk(exposure, masked)— the gelatin. Bone at nothing, black atCore.EXPOSURE.darkAt, down a smoothstep rather than a line so the first quarter of an exposure barely marks the plate. It carries a little of its own light at the pale end and none at the dark end, so the plate is readable in a room lit by two accents and a dead lamp, and the reading is the same reading.Pieces.frameInk(target, exposure, masked)— the target ghost. Gold where the plate wants dark, warming toward the betafite's green as it gets there; red where a cell that had to stay clear has been spoiled; dark under a frisket; and drawn at all only where it has something to say.
What builds a thing
Pieces.slab— a thin inked quad.glowpicks the alpha-blended material.Pieces.metal— a block of real brass, lit rather than inked.Pieces.buildFrisket(parent, name, cells)— a cut brass mask: a filed sheet per cell of the footprint, a panel worked into its face, and a rivet, so a bar reads as three riveted sections of one strip rather than a coloured rectangle.Pieces.buildCrystal(parent, name, col, row)— a betafite crystal. Hands the entity to the hero slice'sBetafitewhen that is registered AND it actually draws something; otherwise builds this slice's stand-in — an octahedral pair in uranium glass with the point light that puts the crystal's own green on the glass under it.
Pieces.LAYOUT holds the heights and spans every layer stands at, all as
fractions of Core.GRID.CELL and offsets from Core.PLATE.topY, so the whole
board moves with the plate rather than with a number written twice.
Scoped to this part · feeds back into the world's score.