What problem does it solve?
Phaser developers often struggle to choose between Group, Container, and Layer, and then run into performance and behavior issues when batching, pooling, or composing visual hierarchies.
Core Features & Use Cases
- Pick the right display/logic primitive: Use Groups for logical collections and pooling, Containers for transform inheritance (position/rotation/scale/alpha) in composite UI, and Layers for render-order and batch-style visibility/effects.
- Object pooling patterns: Use Group pooling methods like getFirstDead, get, kill, and killAndHide to reuse objects instead of constantly creating/destroying them.
- Nested transforms & render ordering: Build HUDs with nested Containers, and control overall rendering behavior with Layers while avoiding unsupported nesting directions.
Use case: You need a reusable set of bullets or enemies that can be efficiently spawned/despawned and also want a camera-pinned HUD cluster that moves/rotates as one unit; this skill guides how to implement both correctly with the right Phaser objects.
Quick Start
Use the groups-and-containers skill to design your Phaser Scene using a Group for reusable pooled entities and a Container for a transform-inheriting HUD, applying a Layer only when you need render-order bucketing.