State machine: aktuellen Zustand im Tab während Play hervorheben #54

Closed
opened 2026-09-12 18:02:39 +02:00 by meleki · 1 comment
Owner

Aus #51, Folgeschritt: Während Play soll im State-machine-Tab der Zustand, in dem eine Maschine gerade ist, hervorgehoben werden – wie die Live-Werte an den Nodes im Behavior-Tab.

Was heute ist: Der Tab zeichnet das Asset ohne Laufzeitbezug. Der Zustand lebt pro Behavior-Instanz (Instance.states im BehaviorSystem), es kann also viele Instanzen mit verschiedenen Zuständen derselben Maschine geben.

Zu klären / zu bauen:

  • Welche Instanz zeigt der Tab? Vorschlag: die des selektierten Szenenobjekts (wie der Behavior-Tab seine Live-Werte holt); ohne Auswahl alle Zustände, die irgendeine Instanz gerade hält, schwächer markiert.
  • Darstellung: Rahmen/Füllung des State-Nodes in der Play-Farbe aus Theme.ts, nur solange Play läuft; beim Stop zurück.
  • Datenweg: BehaviorSystem → debugHook/Live-Werte → Tab; der Tab tickt heute nicht (nur der Animation-Tab), braucht also einen Render-on-change oder einen Tick während Play.
  • Dazu passend im Behavior-Tab: State branch / Set state könnten den aktuellen Zustand als Live-Text am Node zeigen (kleiner Teil, gleicher Datenweg; passt zu #57).

Folge-Issue zu #51 (State machine, Commit e7d82bd, 2026-09-12).

Aus #51, Folgeschritt: Während Play soll im **State-machine-Tab** der Zustand, in dem eine Maschine gerade ist, hervorgehoben werden – wie die Live-Werte an den Nodes im Behavior-Tab. **Was heute ist:** Der Tab zeichnet das Asset ohne Laufzeitbezug. Der Zustand lebt **pro Behavior-Instanz** (`Instance.states` im `BehaviorSystem`), es kann also viele Instanzen mit verschiedenen Zuständen derselben Maschine geben. **Zu klären / zu bauen:** - Welche Instanz zeigt der Tab? Vorschlag: die des **selektierten Szenenobjekts** (wie der Behavior-Tab seine Live-Werte holt); ohne Auswahl alle Zustände, die irgendeine Instanz gerade hält, schwächer markiert. - Darstellung: Rahmen/Füllung des `State`-Nodes in der Play-Farbe aus `Theme.ts`, nur solange Play läuft; beim Stop zurück. - Datenweg: `BehaviorSystem` → `debugHook`/Live-Werte → Tab; der Tab tickt heute nicht (nur der Animation-Tab), braucht also einen Render-on-change oder einen Tick während Play. - Dazu passend im **Behavior-Tab**: `State branch` / `Set state` könnten den aktuellen Zustand als Live-Text am Node zeigen (kleiner Teil, gleicher Datenweg; passt zu #57). --- Folge-Issue zu #51 (State machine, Commit `e7d82bd`, 2026-09-12).
meleki added the state-machine label 2026-09-12 18:02:39 +02:00
admin added this to the Development project 2026-09-13 13:29:59 +02:00
admin moved this to Next in Development on 2026-09-13 18:02:45 +02:00
admin moved this to Queue in Development on 2026-09-14 06:39:12 +02:00
admin moved this to Next in Development on 2026-09-14 11:08:49 +02:00
Author
Owner

Done in 7babf88.

While a run is on, the State machine tab marks every state some instance is holding weakly, and the state held by the instance of the selected scene object (the behavior itself, or the object it hangs under) strongly. Without a selection nothing is strong — which keeps "many instances, many states" readable instead of picking one of them at random, and still shows something when nothing is selected.

The marks are the play colour, drawn inside the border so a selected state still shows both, and they are gone the moment the run stops.

Repainting: Play drives the tab the way it drives the Behavior tab (PlaySession.tick). An editor run has no session for that, so the editor's own frame does it — which matters since bc57f61, where a still editor stops drawing.

Wiki: 84df59c, State machines → The current state while playing.

Done in 7babf88. While a run is on, the **State machine tab** marks every state some instance is holding **weakly**, and the state held by the instance of the **selected scene object** (the behavior itself, or the object it hangs under) **strongly**. Without a selection nothing is strong — which keeps "many instances, many states" readable instead of picking one of them at random, and still shows something when nothing is selected. The marks are the play colour, drawn inside the border so a selected state still shows both, and they are gone the moment the run stops. Repainting: Play drives the tab the way it drives the Behavior tab (`PlaySession.tick`). An editor run has no session for that, so the editor's own frame does it — which matters since bc57f61, where a still editor stops drawing. Wiki: 84df59c, *State machines → The current state while playing*.
admin moved this to Done in Development on 2026-09-15 06:21:38 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: meleki/feuerwerk#54