groups-and-containers

Manage game object grouping, pooling, and nesting in Phaser 4 scenes.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/diegolinhares/lightlabs_arena --skill groups-and-containers-diegolinhares
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: groups-and-containers
Source: https://github.com/diegolinhares/lightlabs_arena/tree/main/skills/groups-and-containers
Command: npx skills add https://github.com/diegolinhares/lightlabs_arena --skill groups-and-containers-diegolinhares

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the management of game objects in Phaser 4, particularly with Groups and Containers, providing a solution for efficient organization and rendering in game scenes.

Core Features & Use Cases

  • Logical Grouping: Organize similar game objects for better control and performance.
  • Transform Inheritance: Utilize Containers for nested game objects with shared transforms.
  • Object Pooling: Implement efficient object lifecycle management with Group pooling.
  • Use Case: When creating a platformer, you can use Groups to manage enemies and bullets, while Containers can be used for health bars and UI elements.

Quick Start

Create a Group for enemies in your game: const enemies = this.add.group();

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 efficiently in Phaser 4?

Manage game objects efficiently in Phaser 4 by using Groups for logical organization and object pooling. This streamlines scene rendering and simplifies lifecycle control for similar items like enemies or bullets.

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

Groups in Phaser 4 provide logical organization and object pooling for similar game objects. Containers offer visual nesting with transform inheritance, allowing child objects to share position, scale, and rotation.

How do I implement object pooling for bullets in a Phaser 4 game?

Implement object pooling in Phaser 4 by using Groups to manage bullet lifecycles. This approach reuses inactive objects instead of destroying them, optimizing memory allocation and scene rendering performance.

When should I use Containers instead of Groups in Phaser 4?

Use Containers in Phaser 4 when you need nested game objects with shared transforms, such as UI elements or health bars. Use Groups for logical organization and pooling of similar objects like enemies.

Can I use this Skill to organize UI elements and health bars in Phaser 4?

Yes, you can organize UI elements and health bars in Phaser 4 using Containers. Containers provide visual nesting and transform inheritance, ensuring child elements move and scale together with the parent.

Does this Skill require a specific Phaser version to work?

Yes, this Skill requires Phaser 4. It is specifically designed to handle object grouping, pooling, and nesting within the Phaser 4 game scene architecture for optimal scene organization.