scenes

Orchestrate Phaser 4 scene lifecycles, transitions, and inter-scene communication via SceneManager.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/kehwar/pixi-square --skill scenes-kehwar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scenes
Source: https://github.com/kehwar/pixi-square/tree/main/.agents/skills/scenes
Command: npx skills add https://github.com/kehwar/pixi-square --skill scenes-kehwar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Phaser 4 scenes can be complex to coordinate, especially when multiple scenes, lifecycles, and cross-scene communication are involved; this skill provides a structured approach to manage scene lifecycle, transitions, parallel scenes, and the SceneManager.

Core Features & Use Cases

  • Lifecycle orchestration: manage init, preload, create, and update order and seamless restarts.
  • Transition and parallel scenes: coordinate transitions between scenes and run multiple scenes in parallel with correct render order.
  • Cross-scene communication: enable decoupled data sharing via events and the Scene API for inter-scene coordination.

Quick Start

Create a sample Phaser 4 scene and wire it into the SceneManager workflow to observe lifecycle events across init, preload, create, and update.

Frequently Asked Questions about scenes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Phaser 4 scene lifecycles across init, preload, create, and update phases?

Phaser 4 scene lifecycles are managed by orchestrating init, preload, create, and update order through a SceneManager-driven workflow, ensuring seamless restarts and correct phase execution. This approach provides structured lifecycle hooks to coordinate complex multi-scene game logic.

What is the best way to handle transitions and parallel scenes in Phaser game development?

Transitions and parallel scenes in Phaser game development are handled by coordinating scene switching and running multiple scenes simultaneously with correct render order. This ensures smooth visual transitions and proper layering when managing overlapping game states.

How does cross-scene communication work in Phaser 4 for passing data between active scenes?

Cross-scene communication in Phaser 4 works by enabling decoupled data sharing via events and the Scene API for inter-scene coordination. This allows scenes to pass data and trigger actions in other active scenes using the this.scene API.

Can I pause, sleep, and dynamically switch active scenes using the Phaser SceneManager?

Yes, the Phaser SceneManager allows dynamic scene management including pausing, sleeping, and switching active scenes. This capability lets developers control which scenes receive updates and render output, optimizing performance for complex multi-scene games.

Why does scene order matter when running parallel Phaser scenes?

Scene order matters when running parallel Phaser scenes because it determines the render order and ensures correct visual layering. Proper orchestration prevents scenes from rendering incorrectly or capturing input events intended for overlapping active scenes.