scenes

Manage Phaser 4 scene lifecycle, transitions, and inter-scene communication.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/GiantCroissant-Lunar/proto-breakout --skill scenes-giantcroissant-lunar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scenes
Source: https://github.com/GiantCroissant-Lunar/proto-breakout/tree/main/.agent/skills/01-phaser/scenes
Command: npx skills add https://github.com/GiantCroissant-Lunar/proto-breakout --skill scenes-giantcroissant-lunar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Phaser scene management is intricate due to lifecycle stages, transitions, and cross-scene communication. This skill consolidates the concepts into a practical guide for organizing and controlling Phaser 4 Scenes with clarity and reliability.

Core Features & Use Cases

  • Lifecycle & SceneManager orchestration: explains init, preload, create, update, and how the SceneManager drives scene state changes.
  • Transitions, pausing, sleeping, and parallel scenes: covers animated transitions between scenes, pausing and waking, sleeping, and coordinating multiple scenes running in parallel.
  • Inter-scene communication & data sharing: demonstrates events, data passing, and global/scene-specific registries to coordinate behavior.
  • Common workflows: switching between gameplay, menus, and loading sequences with predictable lifecycle and cleanup.

Quick Start

Create a minimal Phaser 4 Scene subclass with init, preload, create, and update, then boot it via a simple game config.

Frequently Asked Questions about scenes

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

FAQPage Schema
How does Phaser 4 scene lifecycle and SceneManager orchestration work?

Phaser 4 scene lifecycle is driven by the SceneManager through init, preload, create, and update stages. This skill explains how SceneManager orchestrates state changes, ensuring predictable multi-scene orchestration and clean transitions between gameplay and menus.

How do I handle inter-scene communication and data passing in Phaser?

Inter-scene communication in Phaser is handled through events, data passing, and global or scene-specific registries. This skill demonstrates how to coordinate behavior across active scenes using these injection mechanisms for reliable data sharing.

What is the best way to pause, sleep, and switch between parallel scenes in Phaser?

Switching parallel scenes in Phaser involves using ScenePlugin methods to pause, sleep, and wake scenes while others run concurrently. This skill covers coordinating these states to manage complex multi-scene workflows without conflicts.

Can I create animated transitions between Phaser scenes for menu and loading sequences?

Animated transitions between Phaser scenes are supported through the ScenePlugin. This skill details how to manage switching between gameplay, menus, and loading sequences with predictable lifecycle events and proper cleanup.

Why are global and per-scene properties injected in Phaser 4 scene management?

Global and per-scene properties are injected in Phaser 4 to provide scenes with controlled access to shared systems and localized state. This skill specifies these injection requirements using references to Scene.js and InjectionMap.js source files.