One-click install
npx skills add https://github.com/WanderTheWeeb/papas_trauma --skill scenes-wandertheweeb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scenes
Source: https://github.com/WanderTheWeeb/papas_trauma/tree/main/skills/scenes
Command: npx skills add https://github.com/WanderTheWeeb/papas_trauma --skill scenes-wandertheweeb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Phaser 4 scene-heavy games often become difficult to manage because developers must correctly coordinate lifecycle phases, state changes, and inter-scene communication without causing bugs or broken transitions.

Core Features & Use Cases

  • Scene Lifecycle Mastery: Understand and implement init, preload, create, and update flows (including what changes across PENDING, RUNNING, PAUSED, SLEEPING, SHUTDOWN, and DESTROYED).
  • Scene Orchestration: Start, restart, switch, pause, sleep, wake, stop, and transition scenes reliably using the SceneManager-driven queue behavior.
  • Data and Event Communication: Pass initialization data through start/launch/switch/etc., share state via the global registry, and communicate decoupled UI/game logic via scene event emitters.

Quick Start

Use the scenes skill to design a minimal Phaser 4 Scene class that implements init, preload, create, and update, then uses this.scene.start('NextScene', { level: 2 }) to transition with data.

Frequently Asked Questions about scenes

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

FAQPage Schema
How do I transition between Phaser 4 scenes and pass data during the change?

Transition between Phaser 4 scenes by calling this.scene.start('NextScene', { level: 2 }) to pass initialization data. You can also use switch, launch, or transition methods to orchestrate state changes and pass data reliably across scene boundaries.

What is the Phaser 4 scene lifecycle and how do its states work?

The Phaser 4 scene lifecycle flows through init, preload, create, and update phases while moving between PENDING, RUNNING, PAUSED, SLEEPING, SHUTDOWN, and DESTROYED states. Understanding these states ensures safe scene orchestration and prevents broken transitions.

Why does my Phaser scene transition break or fail to load data?

Broken Phaser scene transitions often occur due to ignoring SceneManager-driven queued operations or incorrect transition event timing. Coordinating lifecycle phases, using injected systems access patterns, and properly handling state changes prevents timing and control-flow bugs.

Can I run parallel overlay scenes and control render ordering in Phaser 4?

Yes, you can run parallel overlay scenes and control render ordering in Phaser 4. Using sleep, wake, and launch methods allows you to manage decoupled UI and game logic layers simultaneously without disrupting the main game flow.

What's the best way to share state and communicate between Phaser scenes?

The best way to communicate between Phaser scenes is by passing initialization data through start or launch methods, sharing global state via the registry, and using scene event emitters for decoupled UI and game logic communication.

When should I use sleep and wake instead of pause and stop for Phaser scene management?

Use sleep and wake to temporarily hide a scene while keeping its state intact for rapid reactivation, whereas pause stops update logic but keeps rendering, and stop completely shuts it down. Choosing the right method optimizes lifecycle management.