Log inGet started
World

Anvil Crown

Branchmain
Branchesmain
Commit0c3c8404d1

README.md

ink — the interface's materials

The paint every screen in ANVIL CROWN is made of: the palette resolved to CSS strings, the three type faces, the responsive metrics that keep the HUD hugging the playfield instead of the window, the box primitives, the surface treatments and the motion presets. It reads no gameplay state.

local Ink = require("game.interface.ink")

Colour

Ink.C is A.K.PALETTE pre-resolved to #rrggbb. Ink.a(name, alpha) is the same entry as rgba(). Ink.mix(a, b, t) blends two palette entries.

  • Ink.heatColour(t) — the cannon's bar at fraction t, cold blue → warning yellow → hot orange. It goes by way of yellow because a direct blend of cyan and orange passes through grey, and the bar has to keep climbing in colour exactly where the player is watching it.
  • Ink.hullColour(t) — the hull at fraction t remaining.

Type

Ink.F carries the four faces named in A.K.TYPE: display (Anton), stamp (Archivo Black), mono (Berkeley Mono), read (Arimo). A style asks for the family name, so these are the last segment of the asset ref.

Metrics

Ink.metrics() measures the tall frame in screen points:

FieldWhat it is
W, Hthe UI canvas
pxupoints per world unit — H / 32, because the camera always shows 32 units of shaft
playHalfhalf the playfield in points: the shaft wall at world x = ±9
centerX, marginthe shaft's centre, and the storm to spare either side of it
flank, colW, padthe HUD column, its widest plate, the breathing room
outsidewhether the columns fit beside the playfield or must sit inside it
leftX, rightX, leftAlign, rightAlignwhere each column stands and which way its plates grow
uthe type scale; Ink.pt(m, n) puts a design point into it
cardWhow wide a centred card may be

On a portrait window the columns sit just inside the shaft walls. On a wider one there is storm to spare beside the playfield and they step out into it, so nothing ever covers the fight.

Primitives and surfaces

Ink.label / Ink.para / Ink.svg / Ink.col / Ink.row / Ink.gap build nodes; Ink.at places one absolutely; Ink.merge folds two style tables. Ink.plate is the instrument surface, Ink.card the frosted one, Ink.scrim the veil a card sits on, and Ink.bracket / Ink.rule / Ink.stencil the furniture. Ink.button is the one button shape the whole game uses.

Motion

Ink.rise and Ink.fade are entrances (stagger the delay and siblings cascade); Ink.strike lands a display word; Ink.breathe, Ink.glowLoop and Ink.strobe are idles; Ink.toast is in-hold-out.