00_GettingStarted — Runtime Debug Panel (Health)¶
Goal¶
Provide a practical runtime surface to inspect and drive health behaviour in play mode.
What This Scene Demonstrates¶
Binding source → public health seams → action → service/component result → visible state update.
This scene shows how a runtime debug panel binds to a health target and uses public interfaces to apply damage, healing, death, and revive, with the resolved health component remaining the source of truth.
What To Look For¶
- Binding: The panel resolves a health target (explicit provider → nearby objects → scene).
- Inspect: Current HP, max HP, and binding source are displayed.
- State-driven UI: Optional sections (invincibility, combat state) appear only when supported by the bound target.
- Actions: Inputs (delta) drive operations through public seams.
- Result: Health values and visual state update immediately based on the underlying component.
Mental model: input → public seam → action → result → visible update.
Sample Scope¶
This scene covers:
- Runtime inspection of a health target
- Applying damage and healing
- Forcing death and revive
- Observing health state updates through a debug panel
- Optional sample FX (hit flash, damage/heal VFX, death, revive)
This scene does NOT cover:
- Internal HealthSystem implementation details
- UI frameworks or HUD setup
- Networking or authority enforcement behaviour
- Production gameplay input systems
Sample FX and helpers are demonstration-only and not required by the Health system.
Authority Note¶
This scene may include a permissive sample authority setup where mutations are allowed locally for demonstration purposes.
Networking Reminder¶
No networking is included; integration is the developer’s responsibility.
How To Use¶
- Enter Play Mode.
- Press F9 to toggle the panel if needed.
- Ensure the panel is bound to a valid health target (player or enemy).
- Observe current HP and binding source at the top.
- Enter a value in the Δ field.
-
Click:
-
Damage to apply damage via
IDamageable - Heal to apply healing via
IHealthWriter - Force Dead (SetCurrent=0) to set current health to zero (lifecycle)
- Revive to restore a dead target (lifecycle)
-
If present:
-
Use Ping i-frames to trigger invincibility
- Use combat controls to mark or exit combat
- Observe immediate state changes in the panel and scene (HP values, FX, state).
Failure Behaviour¶
-
No health target found
-
Meaning: No component implementing
IHealthReadonlywas resolved -
Fix: Assign a Health Provider or ensure a valid health component exists in the scene
-
Damage/Heal buttons disabled
-
Meaning: Required public seams (
IDamageableorIHealthWriter) are not available on the bound target -
Fix: Ensure the target implements the required interface
-
Force Dead / Revive unavailable
-
Meaning: Target does not implement
IHealthLifecycle, or state conditions are not met -
Fix: Use a health setup that includes lifecycle support
-
Optional sections not visible
-
Meaning: Features like invincibility or combat state are not present on the target
- Fix: Add the relevant components if needed
All behaviour reflects the underlying component state; the panel does not simulate or override results.
Behind The Scenes¶
IHealthReadonly— read current and max healthIHealthWriter— apply healingIDamageable— apply damageIInvincibilityHandler— trigger invincibility frames (optional)IHealthLifecycle— force death and revive (optional)HealthSystem— concrete implementation used in the demoHealthCombatState— optional combat-state tracking
The panel resolves these via standard component lookup and invokes them directly through public APIs.
Key Takeaway¶
This scene provides a runtime interaction surface for health.
The panel binds to a real target, uses public interfaces to perform actions, and reflects the true state of the system.
All behaviour comes from the underlying health component — the panel only exposes and drives it.