groups-and-containers

Create Groups and Containers to organize Phaser 4 game objects.

Updated May 24, 2026
One-click install
npx skills add https://github.com/simon-tanna/pip-maze-v-2 --skill groups-and-containers-simon-tanna
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: groups-and-containers
Source: https://github.com/simon-tanna/pip-maze-v-2/tree/main/.claude/skills/groups-and-containers
Command: npx skills add https://github.com/simon-tanna/pip-maze-v-2 --skill groups-and-containers-simon-tanna

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill helps game developers manage game objects more efficiently in Phaser 4, offering better control over object pooling, batch operations, and nested transforms with Containers.

Core Features & Use Cases

  • Logical Grouping with Groups: Simplifies the management of similar objects (enemies, bullets) with object pooling capabilities.
  • Transform Inheritance with Containers: Groups visual objects that inherit position, rotation, and scale transformations for complex UI or game entities.
  • Layer-based Rendering: Organizes objects by render order with Layers for optimized rendering performance.
  • Use Case: Improve performance and code clarity by organizing game objects with Groups and Containers instead of individually handling each object in a complex scene.

Quick Start

Use the groups-and-containers skill to create a Group and a Container for organizing game objects in a Phaser scene.

// Create a Group for managing enemy Sprites
const enemiesGroup = this.add.group();

// Create a Container for managing the game HUD
const hud = this.add.container();

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 in Phaser 4 by using Groups for object pooling and batch operations, and Containers for nested transform inheritance. This approach optimizes scene organization and rendering performance for complex game entities.

What is the difference between Groups and Containers in Phaser?

Groups handle logical organization and object pooling for similar objects like enemies or bullets, whereas Containers provide visual grouping where child objects inherit position, rotation, and scale transformations for complex UI elements.

How do I apply batch operations to multiple sprites in a Phaser scene?

Apply batch operations to multiple sprites by adding them to a Phaser Group. Groups enable object pooling and allow you to manage similar game objects collectively, improving performance and code clarity in complex scenes.

How do I group UI elements so they inherit position and scale transformations in Phaser?

Group UI elements to inherit transformations by placing them inside a Phaser Container. Containers apply parent-level position, rotation, and scale changes to all child objects, simplifying complex game entity rendering.

Does organizing game objects with Layers improve rendering performance in Phaser 4?

Organizing game objects with Layers improves rendering performance by controlling render order. Layers separate visual organization from logical grouping, optimizing the rendering pipeline for complex Phaser 4 scenes.

When should I not use a Container for game object management in Phaser?

Avoid using a Container when you need object pooling or logical grouping without visual transform inheritance. Containers manage nested transforms, so if objects require independent positioning, use Groups instead for efficient batch handling.