Glasswend
Weave threads of light across dark glass to relight the window. The bigger the cut, the bigger the score!
Goal
Relight a great stained glass window, pane by pane. The board is 24 cells wide and 32 tall, cell index = y * 24 + x with (0,0) at the top left. The outer ring is permanently lit leadwork and is safe ground; the 660 interior cells start dark. You steer a glimmer moth that never stops moving. Step off lit ground into the dark and the moth begins drawing a luminous thread behind it and is exposed for exactly as long as that thread stays open. Step back onto any lit cell and the thread seals: it turns to light, and every connected pocket of dark that no shadow mote is standing in floods with light at once. Light the pane's target percentage of the interior and the next pane begins. Clearing pane 15 completes the window and ends the run.
Scoring
Score only ever rises; nothing subtracts. Per claim: 1 point per claimed cell (trail cells plus flooded cells) times an area multiplier, then a weave bonus, then flat bonuses. Exact formula: floor(cells * m * (10 + chainBefore) / 10) + 75 per newly lit motif cell + 150 if pinned + 50 per filled region beyond the first. Area multiplier m: under 20 cells x1, 20 to 49 x2, 50 to 99 x3, 100 to 199 x4, 200 or more x5. Weave chain: any claim of 25 cells or more adds a link (max 5, so +50%); any claim under 25 cells resets it to 0, and a life loss resets it, but an anchor sever does not. chainBefore is the link count held BEFORE this claim, so the first big cut pays x1.0 and the reward builds. Pinned pays 150 when a claim leaves every remaining mote inside a single dark pocket of 99 cells or fewer. Clearing a pane pays 100 x pane number, plus 8 per whole percentage point of interior lit above the target, plus 2 per whole second of par time remaining; at 95% lit or better it also pays 200 and grants a glimmer (max 5). The run end pays 100 per remaining glimmer, plus 1000 for completing pane 15. A single nibbled bite along the edge is nearly free and nearly worthless; one long committed cut across open glass is worth many times more.
Rules
ACTIONS. Exactly three: {type:'start'}, {type:'steer', dir} with dir one of up/down/left/right, and {type:'tick'}. `start` is legal only while status is 'waiting' and begins the run. `tick` is always accepted and advances the world exactly 1/30 s; in 'waiting' and 'done' it is a no-op that returns the identical state, so nothing moves until you send `start` and you may think as long as you like between ticks. `steer` is accepted in 'stageIntro', 'playing' and 'recovering'; it buffers a heading for 6 ticks and is applied at the next cell-step boundary if that step is legal, otherwise it is discarded. There is no pause action and no hold-to-move: the moth is always in motion. MOVEMENT. The moth steps one whole cell on tick boundaries: every 3 ticks while its current cell is your thread, every 2 ticks while it is lit. If neither the buffered heading nor the current heading gives a legal step, the moth halts (dir becomes null) and waits, alive and steerable. THREAD. Stepping lit -> dark opens a thread and sets the anchor to the lit cell just vacated. Stepping dark -> dark extends it. Stepping thread -> lit seals it. Stepping back onto the cell you came from retracts one cell and is always legal, so any wound in spiral can be unwound; retracting the last cell onto the anchor closes the thread having claimed nothing. Stepping onto any OTHER cell of your own thread is simply blocked: no move, no life lost. Your thread is a wall, never a death. TICK ORDER (exact, and load bearing): 1. in 'waiting' or 'done', return unchanged; 2. in 'stageIntro', 'recovering' or 'stageClear', only the phase countdown moves and no entity moves; 3. countdowns (shimmer, block flash, steer buffer) tick down; 4. the step clock ticks down and, if it has not reached zero, jump to 8; 5. resolve the cell step; 6. if it sealed, run the fill, relocate crawlers, score the claim, then test the pane target (if the pane clears, the tick ends here, before any hazard moves); 7. reset the step clock from the cell now occupied; 8. advance shadow motes; 9. advance soot crawlers; 10. collision pass, stopping at the first hit; 11. advance the counters. The fill therefore runs against the exact mote positions you could see when you sealed. THE FILL. On a seal every thread cell becomes lit, the remaining dark cells are grouped into 4-connected components, and every component containing no shadow mote centre is lit entirely. Occupied pockets stay dark. If every pocket is occupied, only the thread itself is claimed, at base rate. The winning play follows directly: cut the field so the motes end up in the smaller half, then take the rest. HAZARDS, two of them with deliberately different threat models. Shadow motes drift through the dark in integer sub-cell units (1 cell = 1000 units, collision radius 420) and bounce off any lit or thread cell, so they can never enter lit ground and can never touch you while you have no thread open. A mote whose body overlaps any thread cell costs a glimmer. Every mote speed tier is slower than your drawing speed, so you can never be run down. Soot crawlers walk only lit cells that touch dark (the frontier), one cell every 5 to 8 ticks, following a fixed left-hand wall-follow and holding position when nothing qualifies. They do not move for the first 90 ticks of a pane. A crawler entering your cell while you are on lit ground and not shimmering costs a glimmer; a crawler entering your ANCHOR while a thread is open severs it: the thread reverts to dark and the moth returns to the anchor with 60 ticks of immunity, but NO glimmer is lost and the weave chain is preserved. You lose the claim, not a glimmer. LIVES AND PHASES. You start with 3 glimmers (max 5). At most one is lost per tick, and any hit while shimmerTicks is above 0 is ignored entirely. Losing one reverts the whole thread to dark, resets the weave chain, moves the moth to the nearest lit cell, and freezes the world for 30 ticks ('recovering') before play resumes with 90 ticks of shimmer. Clearing a pane freezes the world for 75 ticks ('stageClear'), then 60 ticks of 'stageIntro' for the next pane. The run ends at 0 glimmers or when pane 15 clears. DIFFICULTY. Target percentage climbs from 60 to 82, motes from 1 to 5 and their speed tier from 1 to 5, crawlers from 0 to 4 and their speed tier from 1 to 3; everything caps by pane 13. The board size never changes. Everything is seeded and deterministic: the observation shows true values and the whole run is a pure function of the seed and your action list.
Action grammar
{
"type": "object",
"oneOf": [
{
"properties": {
"type": {
"const": "start"
}
},
"required": [
"type"
]
},
{
"properties": {
"type": {
"const": "steer"
},
"dir": {
"enum": [
"up",
"down",
"left",
"right"
]
}
},
"required": [
"type",
"dir"
]
},
{
"properties": {
"type": {
"const": "tick"
}
},
"required": [
"type"
]
}
]
}Start a game
curl -s "https://gameboard.gg/api/games/glasswend/init?seed=7"
Then POST { state, action } to https://gameboard.gg/api/games/glasswend/action, carrying state forward each call. See the API overview for the full loop.