Node reference
This build has seven node types, in five categories. Every behavior graph is built from these. This page describes what each does at runtime and every field you can set.
| Node | Category | Ports | Editable fields |
|---|---|---|---|
| Start | Lifecycle | Out | None |
| End | Lifecycle | In | None |
| Idle | Action | In, Out | Sprite, FPS, Duration |
| Walk | Action | In, Out | Sprite, FPS, Duration |
| Random | Logic | In, Out ×N | Paths (2 to 8) |
| On Click | Event | Out | None |
| Emit Hearts | Effect | In, Out | Heart style, Custom image |
The graph runs from Start, follows the wires through your action and logic nodes, and when it reaches End it loops back to Start and runs again, forever, until you turn the pet off. On Click is a separate starting point that fires when you click the pet, and Emit Hearts is a visual effect you drop into any chain.
Lifecycle
Section titled “Lifecycle”The entry point of the graph. Has a single Out port and no inputs. Execution always begins here.
- Exactly one Start runs. You can only meaningfully have one; extra Start nodes are flagged as a problem.
- No editable fields.
- Its Out must connect to something, or the pet has nothing to do.
Marks the end of a path. Has a single In port. When the pet reaches an End, the graph restarts from Start.
- You can have several End nodes (e.g. one at the tail of each Random branch).
- No editable fields.
Actions
Section titled “Actions”Action nodes are the visible behavior: the pet plays an animation for a while, then moves on to the next node. Idle and Walk share the same fields; the difference is that Walk moves and Idle doesn’t.
The pet stands still at its current spot and plays its animation.
Fields:
-
Sprite. Which of your imported sprites to play. Required. You can set a per-node FPS override, or leave it to inherit the sprite’s own default FPS.
-
Duration. How long the action lasts, with a Mode toggle:
- Time. A random length between a Min and Max in seconds (default 2-5 s). An optional Finish animation checkbox rounds the time up so the animation ends on a whole loop instead of mid-frame.
- Loops. Run for a random number of whole animation loops between Min and Max.
Each time the node runs it picks a fresh random value in your range, so the pet doesn’t feel metronomic.
Same as Idle, but the pet moves horizontally while the animation plays.
Fields: identical to Idle (Sprite, FPS, Duration Time/Loops). Default duration is 3-6 s.
About movement:
- Direction is automatic. There’s no direction field. The pet heads one way, and bounces off the screen edges, reversing direction, so it never walks off screen.
- Speed is the engine default (a steady stroll); it isn’t a per-node setting in this build.
- The sprite mirrors to face the direction of travel. If your art is drawn facing left, flip it with the sprite’s Flip horizontally option so it faces the right way.
Random
Section titled “Random”Branches the flow. Has one In port and several Out ports; when reached, it picks one connected output and continues down it.
Field:
- Paths. How many outputs the node has, from 2 to 8 (default 2). The node builds “Out 1” … “Out N” accordingly.
The choice is weighted (equal weighting by default), and only connected outputs are eligible. Random is the main tool for giving a pet personality: wire each output to a different action so the pet sometimes idles, sometimes walks, sometimes does something else.
Event nodes are separate starting points. They don’t sit in the main Start-to-End flow; instead they wait for something to happen and then run their own chain.
On Click
Section titled “On Click”Fires when you click the pet. Like Start, it has one Out port and no input; it is a detached entry point, not part of the main flow. When you click, the pet interrupts whatever it was doing, runs the chain wired to On Click, and then resumes its main graph from Start.
This is how you make a pet react to you. The demo’s built-in pets already ship wired up this way, so clicking any of them pops a few hearts out of the box.
Fields: none.
Rules:
- One On Click per graph. A second one is flagged as a problem.
- Its chain must reach an End, the same as the main flow, so the reaction has a clean finish before the pet returns to Start.
- On Click does not fire in Focus Mode, because pets are click-through there (the same reason you can’t drag them in Focus Mode).
Effect
Section titled “Effect”Effect nodes add a visual flourish and pass the flow straight on, so the effect plays while the rest of the chain keeps going.
Emit Hearts
Section titled “Emit Hearts”Spawns a small burst of floating hearts above the pet, then immediately passes the flow on to the next node, so the hearts drift up while the rest of your chain plays. Drop it in with no setup and it uses a built-in heart.
Pair it with On Click for the classic “pet the pet” reaction: On Click → Emit Hearts → Idle → End, which is exactly how the built-in pets are wired.
Fields:
- Heart style. Choose the built-in smooth heart or a pixel-art heart.
- Custom image. Optionally upload your own heart, a single-frame image. Leave it empty to use the built-in style above.
The motion (a few hearts rising, drifting, and fading over about a second) is built in and isn’t adjustable in this demo.
Not nodes: drag & fall
Section titled “Not nodes: drag & fall”Two behaviors are built into the engine and apply to every pet automatically. You don’t (and can’t) wire them:
- Drag. You can always pick a pet up with the mouse and move it.
- Fall. Dropped in mid-air, a pet falls with gravity until it lands, then resumes its graph from Start.
(The only thing that changes drag is Focus Mode, which makes pets click-through and therefore un-draggable, see The system tray & everyday controls. Focus Mode also stops On Click from firing, for the same reason.)
A minimal working graph
Section titled “A minimal working graph”The smallest pet that will go Live:
Start → Idle(sprite: "idle") → EndA more lively one:
┌─ Out 1 → Walk(sprite:"walk") ─┐Start → Random ──┤ ├→ End → (loops to Start) └─ Out 2 → Idle(sprite:"idle") ─┘And to make it react when clicked, add a detached On Click chain alongside the main flow:
On Click → Emit Hearts → Idle(sprite:"happy") → End