groups-and-containers

Organize Phaser 4 game objects using Groups, Containers, and Layers.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/jallard-007/jallard-ca-server --skill groups-and-containers-jallard-007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: groups-and-containers
Source: https://github.com/jallard-007/jallard-ca-server/tree/main/.github/skills/groups-and-containers
Command: npx skills add https://github.com/jallard-007/jallard-ca-server --skill groups-and-containers-jallard-007

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Organize and render Phaser 4 game objects efficiently by using Groups for logical collections, Containers for inherited transforms, and Layers for render-order management, while enabling pooling and nested structures.

Core Features & Use Cases

  • Group: manage collections of similar objects and enable pooling without applying a shared transform.
  • Container: create visual hierarchies where children inherit position, rotation, and scale, enabling composite UI and nested transforms.
  • Layer: control render order and batch rendering of grouped objects.
  • Nested Structures: nest Containers within Containers to build complex UI and scene graphs.

Quick Start

Create a group, a container, and a layer in a Scene to organize and render a set of objects as a unit.

Frequently Asked Questions about groups-and-containers

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

FAQPage Schema
What is the difference between Groups, Containers, and Layers in Phaser 4?

In Phaser 4, Groups manage logical collections for pooling, Containers build visual hierarchies with inherited transforms, and Layers control render order. Groups lack shared transforms, whereas Containers enable nested scene compositions.

How do I create nested transforms for UI overlays and health bars in Phaser 4?

To create nested transforms for UI overlays and health bars in Phaser 4, use Containers to establish visual hierarchies. Children added to a Container inherit its position, rotation, and scale for composite interfaces.

When should I use object pooling with Groups in Phaser 4?

Use object pooling with Groups in Phaser 4 when managing collections of similar game objects that require frequent creation and destruction. Groups enable efficient recycling without applying a shared transform to the objects.

Does a Phaser 4 Container support nesting within another Container?

Yes, a Phaser 4 Container supports nesting within another Container. You can nest Containers to build complex UI structures and scene graphs, allowing children to inherit multi-level position and scale transforms.

What is the best way to control render order for grouped game objects in Phaser 4?

The best way to control render order for grouped game objects in Phaser 4 is using Layers. Layers manage the render order and enable batch rendering of grouped objects independently of their logical grouping.

Why does my Phaser 4 Group not apply position or rotation to its children?

A Phaser 4 Group does not apply position or rotation to its children because Groups only manage logical collections and pooling. To apply shared transforms, use a Container instead for inherited visual hierarchies.