Edit the graph during play and watch values and flow run through it
The graph was only locked by five edit-mode guards in GraphCanvas. The running game reads the graph by reference each frame, so a new node, edge, changed value, disconnect or undo takes effect from the next frame. Stop discards these edits like everything else changed in play. A new On start node does not fire for a behavior that has already started. During play every data output shows the value it last produced, in the highlight colour and refreshed ten times a second. Values are kept per graph, because node ids are only unique within one; with several instances the most recent value wins. The Variables node reads the live variable bag, so only its own outputs are kept, as a snapshot. Each time an exec edge fires, a bead runs along it in 0.3 s, at most one every 0.15 s per edge, following the same curve the edge is drawn with. Beads run on game time and freeze while paused; the game logic is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
495756b500
commit
656d61f187
17 files changed
+542
-37
No files matched your search
@@ -313,7 +313,14 @@ shown on the node and editable in the inspector.
|
||||
falls back to another one – the picker is how you switch on purpose.
|
||||
- **Live view**: Play always switches to the Game tab; switch to Graph while playing and
|
||||
the exec edges and nodes that just ran light up – the same canvas draws editor and game, so
|
||||
this costs nothing extra.
|
||||
this costs nothing extra. Each fire of an exec edge also sends a bead along it (0.3 s, at most
|
||||
one per 0.15 s and edge): a key press is a single bead, `On update` an even chain. Beads run
|
||||
on game time, so a paused game holds them where they are. Every data output shows, in the same colour, the value it last
|
||||
carried (`0.017 dt`, `Pause box object`), refreshed ten times a second. With several objects
|
||||
running the same behavior it is the one that produced last; in a loop, the last round. An
|
||||
output nothing has asked for yet shows nothing. The graph stays editable meanwhile: the interpreter reads the runtime
|
||||
copy's graph on every pulse, so an edit takes effect on the next frame and is discarded with
|
||||
the run. A new `On start` node does not fire for a behavior that has already started.
|
||||
- **Runtime**: `BehaviorSystem` creates one `GraphInterpreter` per behavior entity; graphs only
|
||||
touch world entities. A runaway pulse throws (see *Loops* for the two limits) and stops play
|
||||
with a notice.
|
||||
@@ -670,7 +677,7 @@ npm run check # typecheck + lint + format:check + tests, what CI would ru
|
||||
# code is lost (tail's is reported), so a red run reads as green
|
||||
npm run build # writes dist/ and regenerates index.html
|
||||
export GM_REMOTE=user@host # optional: run the browser elsewhere; see below
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 578 editor checks, screenshots in /tmp/gm-e2e-*.png
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 588 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
|
||||
|
||||
Reference in new issue
Block a user