name: foundation-scene-lifecycle description: Foundational skill for scene-tree behavior: node lifecycle callbacks, signal wiring strategy, input handling pathways, and state transitions. tier: core godot_version: 4.6+ doc_anchors: - godot-docs/getting_started/step_by_step/nodes_and_scenes.rst - godot-docs/getting_started/step_by_step/signals.rst - godot-docs/tutorials/best_practices/godot_notifications.rst - godot-docs/tutorials/inputs/inputevent.rst tags: - lifecycle - scenes - signals depends_on: []
Foundation Scene Lifecycle
Use When
- Designing scene and signal flows.
- Choosing between
_ready,_process,_physics_process,_input, timers, and notifications. - Building state transitions for UI or gameplay-adjacent editor tools.
Outcomes
- Lifecycle responsibilities are separated by callback and execution domain.
- Signal ownership and teardown behavior are explicit.
- Input flow and scene transitions stay stable after hierarchy changes.
Required Rules
- Prefer event-driven wiring over frame polling.
- Use timer cadence for non-frame-critical loops.
- Keep lifecycle callback responsibilities explicit.
- Validate signal ownership and disconnect behavior on teardown.
Workflow
- Assign responsibilities to
_ready,_process,_physics_process, and input callbacks. - Define signal emitters/receivers at subsystem boundaries.
- Add explicit teardown/disconnect paths for scene exit and reload.
- Verify timer-driven loops for non-physics periodic work.
- Rehearse scene transition and re-entry to confirm stable lifecycle behavior.
Validation
- Callback map contains no duplicate state mutation across update paths.
- Enter/exit scene cycle does not leak signal connections.
- Input behavior remains consistent when UI focus changes.
Failure Modes
- State mutation split across
_processand_physics_processwithout arbitration. - Signal connections persist after node teardown and trigger stale callbacks.
- Gameplay input handled in wrong callback stage, causing UI conflicts.
Local Doc Anchors
godot-docs/getting_started/step_by_step/nodes_and_scenes.rstgodot-docs/getting_started/step_by_step/signals.rstgodot-docs/tutorials/best_practices/godot_notifications.rstgodot-docs/tutorials/inputs/inputevent.rst