dev-phaser-sprite-management

Implements sprite sheets, texture atlases, animations, and object pooling in Phaser 3.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/fiando/bake-tycoon --skill dev-phaser-sprite-management-fiando
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dev-phaser-sprite-management
Source: https://github.com/fiando/bake-tycoon/tree/main/.github/skills/dev-phaser-sprite-management
Command: npx skills add https://github.com/fiando/bake-tycoon --skill dev-phaser-sprite-management-fiando

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Phaser games that create and destroy sprites dynamically suffer from garbage collection pressure, expensive array operations, and unorganized texture memory. This Skill provides patterns for loading sprite sheets and atlases, defining animations, and pooling reusable game objects. ## Core Features & Use Cases - Asset Loading Patterns: Load single images, sprite sheets, and texture atlases (JSON, XML) with correct frame configuration. - Animation Management: Define looping and one-shot animations from sprite sheet frame ranges using the Phaser animation manager. - Object Pooling: Pre-allocate Phaser Groups with maxSize limits and killAndHide lifecycle to eliminate per-frame allocation. - Use Case: A bullet-hell game firing hundreds of projectiles per minute uses a pre-filled pool of 50 bullet sprites, reusing instances via killAndHide instead of creating new objects each shot. ## Quick Start Show me how to load a player sprite sheet and set up an object pool for bullets in my Phaser 3 scene.

Frequently Asked Questions about dev-phaser-sprite-management

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

FAQPage Schema
How do I load a sprite sheet in Phaser 3?▼

Use this.load.spritesheet() in the preload() method, passing the key, asset path, and frameWidth/frameHeight options. Then create the sprite with this.add.sprite() and play animations defined via this.anims.create().

How to implement object pooling in Phaser?▼

Create a Phaser.GameObjects.Group with a defaultKey and maxSize, pre-fill it during scene creation, and retrieve instances with pool.get(). Return objects using killAndHide() so they are deactivated and reused instead of destroyed.

Should I use a sprite sheet or a texture atlas in Phaser?▼

Use sprite sheets when all frames share one image with uniform frame sizes, typically for a single character's animations. Use a texture atlas loaded with load.atlas() when packing many unrelated sprites into one texture to reduce draw calls.

Why does my Phaser game stutter when spawning many sprites?▼

Stuttering usually comes from creating new objects every spawn, which triggers garbage collection, and from array splice operations for cleanup. Pre-allocate a Group pool and reuse instances with setActive/setVisible and killAndHide.

When should I use physics.add.sprite instead of add.sprite?▼

Use physics.add.sprite() whenever the sprite needs an Arcade Physics body for velocity, collision, or overlap detection. Plain add.sprite() is sufficient for static or tween-driven visuals without physical interaction.