groups-and-containers

Organize Phaser 4 game objects using Groups and Containers for pooling and scene composition.

Updated Apr 22, 2026
One-click install
npx skills add https://github.com/arnaudruffin/dvx-phaser-game --skill groups-and-containers-arnaudruffin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: groups-and-containers
Source: https://github.com/arnaudruffin/dvx-phaser-game/tree/main/.agents/skills/groups-and-containers
Command: npx skills add https://github.com/arnaudruffin/dvx-phaser-game --skill groups-and-containers-arnaudruffin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage and orchestrate game objects in Phaser 4 by using Groups for logical collections and Containers for hierarchical transforms, enabling efficient pooling and organized scene composition.

Core Features & Use Cases

  • Group-based orchestration for pooling and lifecycle management of enemies, bullets, or collectibles.
  • Container-based composition where children inherit position/rotation/scale, ideal for HUD panels or clustered game objects.
  • Layer-based render ordering and nested containers to build complex UI and gameplay scenes.
  • Object pooling patterns with getFirstDead and reuse to minimize object creation overhead.

Quick Start

In a Scene's create() method, configure a Group and a Container, add children, and demonstrate object pooling.

Frequently Asked Questions about groups-and-containers

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

FAQPage Schema
How do I manage game objects in Phaser 4 using Groups and Containers?

You manage game objects in Phaser 4 by using Groups for logical collections like enemy pools and Containers for hierarchical transforms where children inherit position, rotation, and scale for organized scene composition.

What is the difference between Groups and Containers in Phaser 4?

Groups in Phaser 4 handle logical collections and object pooling for lifecycle management, whereas Containers provide hierarchical transforms where children inherit position, rotation, and scale for UI groupings.

How do I implement object pooling in Phaser 4 to reuse game objects?

Implement object pooling in Phaser 4 by configuring a Group, adding children, and using the getFirstDead API to retrieve and revive inactive game objects, minimizing object creation overhead during gameplay.

Can I nest Containers in Phaser 4 to build complex UI and gameplay scenes?

Yes, you can nest Containers in Phaser 4 to build complex UI and gameplay scenes, utilizing layer-based render ordering to organize clustered game objects and hierarchical HUD panels.

When should I use object pooling for game objects in Phaser 4?

Use object pooling in Phaser 4 when orchestrating frequent lifecycle changes for items like enemies, bullets, or collectibles, reusing dead objects via getFirstDead to avoid performance hits from continuous object creation.