From 84df59c5356f0303a8e9a6c44ac9c4c3ffe22f36 Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Tue, 15 Sep 2026 06:18:37 +0200 Subject: [PATCH] A state machine says where it starts and who it tells, so the page says it too (#53, #54, #55, #57) State machines: the start state and how it is set, the two event nodes with their order, the cap and who hears them per scope, the two reader nodes, and the highlight in the tab while playing. The old "events and a highlight are later steps" sentence is gone, as is "a global machine starts each run in no state at all". Behaviors: the four new nodes in the node set. Home: the state machines row. Development: 885 checks, twice. --- Behaviors.md | 4 +-- Development.md | 4 +-- Home.md | 2 +- State-machines.md | 70 ++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 68 insertions(+), 12 deletions(-) diff --git a/Behaviors.md b/Behaviors.md index 58932de..d8cfe98 100644 --- a/Behaviors.md +++ b/Behaviors.md @@ -97,7 +97,7 @@ shown on the node and editable in the inspector. deliberately not used: its delay and rate are an operating-system setting, not a game's. Both rows stay off the node body while the delay is 0, so a plain key node keeps its single line. - **Node set** (`src/core/graph/nodes/`, one file per node): events `On start`, `On enable`, `On update`, `On disable`, `On destroy` (see *Lifecycle*), `On key down/up/held`, - `On timer`, `On collision enter/stay/exit`, `On click` (the mouse pressed on the owner — anywhere when it has none), `On animation finished`, `Start` · flow `Branch`, `Sequence`, `Repeat`, `Run behavior`, `End`, and the three that read a state machine, `State branch`, `Set state`, `State transition` (see *State machines*) · data `Self`, `Owner`, `Parent`, `Object by name`, `Name of`, + `On timer`, `On collision enter/stay/exit`, `On click` (the mouse pressed on the owner — anywhere when it has none), `On animation finished`, `On state entered`, `On state exited` (one output per state, see *State machines*), `Start` · flow `Branch`, `Sequence`, `Repeat`, `Run behavior`, `End`, and the three that move or follow a state machine, `State branch`, `Set state`, `State transition` (see *State machines*) · data `Self`, `Owner`, `Parent`, `Object by name`, `Name of`, `Is asset` (is this object an instance of asset X — how you tell what you collided with), `Variables`, `Properties` (every property row of the target's type, the transform rows `scale`, `rotation`, `mirrorX`, `mirrorY` included — how a graph turns a sprite), `Get position` (local and world), `Is enabled`, literals `Number`/`Text`/`Boolean`/`Texture`, `Add/Subtract/Multiply/Divide`, `Min/Max/Abs/Sqrt/Clamp`, `Floor/Ceil/Round`, `Modulo`, `Random`, `Time`, `To text`, `To number`, `Join text`, @@ -107,7 +107,7 @@ shown on the node and editable in the inspector. `Join lists`, `Index of`, structs `Pack`/`Expand`, `Length`, `Distance`, `Normalize`, `Axis input` (four keys → a normalized direction, so diagonals are not faster), `Compare`, `And/Or/Not`, `Key is down`, - `Mouse position`, `Mouse button`, `Is hovered`, `Is touching` · + `Mouse position`, `Mouse button`, `Is hovered`, `Is touching`, `Current state` (name and id), `Is in state` (one boolean per state) · actions `Move` (dx, dy, scale, dt — connect an event's dt for per-second movement; in the object's own axes, which a turned parent turns too), `Set position`, `Spawn` (asset setting + x/y/z, optional parent → outputs the new object), `Destroy`, `Emit` (starts a particle source over, see *Particles*), `Log`, `Stop game`, `Restart game`. A node type is one file exporting a `NodeDef` (ports, settings, `run`), listed in `nodes/index.ts`; palette, ports, validation and diff --git a/Development.md b/Development.md index 8cbf9a5..f2caa60 100644 --- a/Development.md +++ b/Development.md @@ -12,7 +12,7 @@ npm run check # typecheck + lint + format:check + tests, the gate CI runs # code is lost (tail's is reported), so a red run reads as green npm run build # writes dist/ and regenerates index.html ./build.sh # the same under `set -o pipefail`, for callers that pipe the output -node tools/seed-e2e.mjs && node tools/e2e.mjs # 868 editor checks, screenshots in /tmp/gm-e2e-*.png +node tools/seed-e2e.mjs && node tools/e2e.mjs # 885 editor checks, screenshots in /tmp/gm-e2e-*.png GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step ./e2e.sh start [GM_STEPS] # the same run detached, see below ./e2e.sh status # live progress, or the last run's result @@ -183,4 +183,4 @@ widths to find click points. The **render device is not in this repo** — `/dev and a 1 GB `/dev/shm` come from `container.options` in the runner's own `config.yaml`, which applies to every job on that runner. Without them chromium falls back to llvmpipe, which gets WebGL 1.0 only. Measured in the job container: `ANGLE (Intel, Vulkan 1.3.230, HD Graphics 630)`, -WebGL 2.0, and the same 868 checks as here. +WebGL 2.0, and the same 885 checks as here. diff --git a/Home.md b/Home.md index 8341d84..2c12d73 100644 --- a/Home.md +++ b/Home.md @@ -16,7 +16,7 @@ Live: · Widget playground: