events-system

Unify EventEmitter usage across Phaser 4 game, scene, and input events.

Updated Apr 25, 2026
One-click install
npx skills add https://github.com/dzyamik/furry-match3 --skill events-system-dzyamik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: events-system
Source: https://github.com/dzyamik/furry-match3/tree/main/.claude/skills/events-system
Command: npx skills add https://github.com/dzyamik/furry-match3 --skill events-system-dzyamik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Phaser-based games rely on many subsystems that need to communicate without tight coupling. This skill provides a structured approach to using EventEmitter, scene events, and game events to coordinate logic across components, scenes, and inputs.

Core Features & Use Cases

  • Unified event model across Game, Scene, Input, Loader, Animations, and more for decoupled architecture.
  • Demonstrates on/once/off patterns to register and clean up listeners safely, including per-scene and global listeners.
  • Enables inter-scene communication and custom event flows, improving modularity and testability.

Quick Start

Create a scene that subscribes to a pointerdown and a scene update event, then emits a custom event to trigger a cross-scene update.

Frequently Asked Questions about events-system

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

FAQPage Schema
How do I use Phaser 4 events to decouple game logic across scenes?

Phaser 4 events decouple game logic by unifying EventEmitter APIs across game, scene, and input subsystems. You register custom event listeners to enable modular inter-scene communication without tight component coupling.

What is the difference between game events and scene events in Phaser?

Game events in Phaser broadcast globally across the entire application lifecycle, while scene events scope to individual scene transitions and updates. This separation lets you manage per-scene listeners independently from global state changes.

How do I prevent event listener memory leaks in Phaser scenes?

Prevent Phaser event listener leaks by using the on, once, and off patterns to safely register and clean up listeners. Proper listener management ensures predictable behavior and avoids memory accumulation during scene transitions.

Can I trigger custom events for cross-scene communication in Phaser?

Yes, you can trigger custom events for cross-scene communication in Phaser by emitting signals on shared or global EventEmitters. This allows separate scenes to react to shared updates and coordinate logic flows modularly.

Does Phaser 4 EventEmitter support input and animation event coordination?

Yes, Phaser 4 EventEmitter supports input and animation event coordination by unifying event models across Input, Loader, and Animations. This provides a consistent architecture for components to respond to shared and per-scene events.