Nodes, pins and execution flow
How a graph actually runs, and the mental model that makes it click.
8 min readA graph is a set of nodes joined by wires. Execution starts at an event node and follows the wires from its output pin, one node at a time, until it runs out of wire.
The three kinds of node
- Events (pink) have no input pin. They are where execution begins: on scene start, every frame, on an overlap, on a key press.
- Actions have one input and one output. They do something and pass control on — set a variable, play a sound, spawn something.
- Branches have two or more outputs. If continues from
trueorfalse; loops continue frombodyonce per iteration and thendone.
It all happens in one frame
Unless a node explicitly waits — Delay is the only one that does — the entire chain from an event runs to completion inside a single frame. A loop with 10,000 iterations runs 10,000 times before the screen updates again. This is why loops carry an iteration limit.
Self and other
Nodes that act on an entity have a target: self,
other, player, or a specific entity.
self— the entity the event happened to.other— in an overlap or collision, the thing it hit.- Inside a For Each body,
selfis the current item.