scenes

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

Updated Jun 21, 2021
One-click install
npx skills add https://github.com/mahirocoko/mahirocoko --skill scenes-mahirocoko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scenes
Source: https://github.com/mahirocoko/mahirocoko/tree/main/plugins/phaser/skills/scenes
Command: npx skills add https://github.com/mahirocoko/mahirocoko --skill scenes-mahirocoko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Manage complex Phaser 4 scene lifecycles, transitions, and inter-scene orchestration across multiple scenes.

Core Features & Use Cases

  • Lifecycle coordination: init, preload, create, update across scenes.
  • Scene transitions and parallel scenes: seamless switching and concurrent execution.
  • Inter-scene communication and data sharing via scene events and data stores.
  • Robust handling of sleeping, pausing, restarting, and SceneManager orchestration for maintainable game architecture.

Quick Start

Create a minimal Phaser 4 project with two scenes (GameScene and UIScene) to demonstrate lifecycle events and transitions.

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 lifecycle events across multiple scenes?

Phaser 4 scene lifecycle management coordinates init, preload, create, and update phases across multiple scenes. You can orchestrate these events using SceneManager to handle sequential loading, parallel execution, and seamless transitions for maintainable game architecture.

What is the best way to handle inter-scene communication and data sharing in Phaser?

Inter-scene communication in Phaser uses scene events and data stores to share state between active scenes. This approach enables robust data exchange and event-driven coordination, allowing parallel scenes like GameScene and UIScene to interact without tight coupling.

How do I transition between parallel scenes in Phaser 4?

Scene transitions in Phaser 4 use SceneManager orchestration to switch or run scenes concurrently. You can manage sleeping, pausing, and restarting scenes to achieve seamless transitions and concurrent execution between parallel scenes.

Can I pause, sleep, and restart Phaser scenes without destroying their state?

Yes, Phaser SceneManager supports sleeping, pausing, and restarting scenes while preserving their state. This lifecycle orchestration allows you to suspend scene updates temporarily and resume them later without re-initializing the entire scene.

Why does my Phaser scene skip the preload phase when switching scenes?

Phaser scene lifecycle phases depend on how SceneManager triggers init, preload, create, and update. If a scene is already loaded or sleeping, restarting it may skip preload. Proper lifecycle orchestration ensures phases execute in the correct sequence.