sprites-and-images

Create and manipulate Sprites and Images in Phaser 4.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/GiantCroissant-Lunar/proto-breakout --skill sprites-and-images-giantcroissant-lunar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sprites-and-images
Source: https://github.com/GiantCroissant-Lunar/proto-breakout/tree/main/.agent/skills/01-phaser/sprites-and-images
Command: npx skills add https://github.com/GiantCroissant-Lunar/proto-breakout --skill sprites-and-images-giantcroissant-lunar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Simplifies creating and controlling Sprites and Images in Phaser 4, reducing boilerplate and enabling consistent visuals across scenes.

Core Features & Use Cases

  • Factory methods for Sprite and Image creation via this.add.sprite(...) and this.add.image(...)
  • Texture and frame management, including setTexture, setFrame, and cropping
  • Transform operations: setPosition, setScale, setRotation, setOrigin
  • Visual adjustments: tint, alpha, flip, depth, visible, and origin handling
  • Component mixin system overview and how it affects properties across Sprites and Images

Quick Start

Create a background image and a player sprite, then apply basic transforms and tint in a scene's create() method.

Frequently Asked Questions about sprites-and-images

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

FAQPage Schema
How do I create and control sprites and images in Phaser 4?

To create sprites and images in Phaser 4, use factory methods like this.add.sprite() and this.add.image(). You can then manipulate them using built-in transform operations, visual adjustments, and the component mixin system.

What is the difference between Phaser 4 Sprite and Image game objects?

Phaser 4 Images are lightweight game objects for static textures, while Sprites include animation capabilities. Both share core properties via a component mixin system, supporting identical transforms, tint, alpha, flip, and depth adjustments.

How do I apply texture and frame management to a Phaser 4 game object?

Texture and frame management in Phaser 4 uses setTexture and setFrame methods. You can also apply cropping to sprites and images to isolate specific visual regions without altering the underlying source asset.

Can I use component mixins to handle properties across Phaser 4 sprites?

Yes, Phaser 4 uses a component mixin system to share properties and behaviors across Sprites and Images. This architecture standardizes positioning, transforms, origin, depth, and visual adjustments like tint and alpha.

What's the best way to adjust transforms and visual properties in Phaser 4?

The best way to adjust transforms in Phaser 4 is using setPosition, setScale, setRotation, and setOrigin. Visual properties are managed through dedicated setters for tint, alpha, flip, and depth.

Does this Phaser 4 approach work for setting up scene backgrounds?

Yes, using this.add.image() creates background images efficiently, while this.add.sprite() handles dynamic player objects. Both support immediate positioning, scaling, and tinting within a scene's create() method.