clone

a browser grid puzzle game where you push words around to rewrite the rules of each level

main
miau-is-true / docs / mod-mechanic-stressors.md
mod-mechanic-stressors.md 2.9K rendered
1# Mod mechanic stressors23This is an engine planning note for level authors. The worlds team coordinates proof examples in [`worlds-inbox.md`](worlds-inbox.md); the user will provide further behavior details before these contracts are frozen.45| Stressor | Current engine | Missing game state and events | First proof to request |6| --- | --- | --- | --- |7| Patterned emoji actor | Supported by `level.automata`: a word property activates a bounded move/wait cycle; phase, Undo, and reset are deterministic. The solver now includes phase in its search key. | A timing-dependent authored proof and final visual review are pending. | Transfer `TICK` from one noun to another by moving the property word, then use the new carrier to push a word. |8| Gate and switch | `STOP` can represent a closed gate; the engine has no switch-driven gate transition. | Switch trigger state, gate open/closed state, same-turn collision order, `gateChanged` event, solver snapshot. | Place a switch before a gate, require an object to hold or toggle it, and cross while another actor moves. |9| One-step tile | `SINK` and `DEFEAT` remove contact occupants but cannot count uses of a floor cell. | Visit counter or pending crumble state, trigger timing, `crumbled` event, result for a remaining occupant, solver snapshot. | Cross one floor cell once, return to find it gone, then Undo and cross again. |1011The smallest safe mod interface for the next two stressors is declarative data attached to stable authored object IDs. The host resolves occupancy and contacts; shared packs carry data only. A switch could reference gate IDs, and a crumble tile could declare a trigger and one use. We should define exact fields only after a playable proof fixes these turn-order choices:12131. Does a switch trigger on entry, continuous occupancy, or exit? Which occupants count?142. Does it hold a gate open, toggle it, or latch it? When does the gate become passable?153. Does a tile crumble on entry, after standing one beat, or on exit? What happens to an occupant on it?164. Do automaton movements trigger switches and spend tile uses in the same turn?1718All mechanic state must be included in `getState()`, Undo, reset, `restore()`, replay, and the solver key. Blocked player input remains outside the turn clock unless a later design decision changes that rule.1920## Provisional world defaults2122Design assigned pressure plates and gates to `crate-works`, and one-step sandbars or ice floes to `tidewater`. Its starting model is occupancy-held plates activated by any occupant; linked gates re-evaluate at the end of the turn after contacts and stay open if closing would trap an occupant. Plates and gates share an authored colour channel. Crumbling is a rule property such as `SAND IS FRAIL`: a carrier disappears when its occupant leaves, any mover counts, and breaking the sentence disables future crumbling. These are draft constraints pending two complete scenarios from each world and the user's further direction.