actions-and-utilities

Applies Phaser 4 batch actions and utility functions to arrays of game objects.

2|10|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/kodingvibes/gamejam-2026 --skill actions-and-utilities-kodingvibes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: actions-and-utilities
Source: https://github.com/kodingvibes/gamejam-2026/tree/main/participantes/jpyunism/.agents/skills/actions-and-utilities
Command: npx skills add https://github.com/kodingvibes/gamejam-2026 --skill actions-and-utilities-kodingvibes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Positioning, styling, and transforming dozens of game objects one by one in Phaser 4 is repetitive and error-prone. This Skill provides the complete Phaser.Actions namespace plus Array, Object, and String utilities so you can perform batch operations on groups of game objects in a single call. ## Core Features & Use Cases - Batch Property Operations: Set or increment x, y, alpha, scale, rotation, tint, and depth across entire arrays of game objects with optional per-item step values. - Geometry-Based Placement: Arrange sprites on circles, lines, rectangles, triangles, and ellipses, or scatter them randomly within geometric bounds. - Grid Layout and Alignment: Use GridAlign, AlignTo, and FitToRegion to build structured layouts for UI elements, enemy formations, or item grids. - Use Case: Imagine spawning 20 collectible gems. Use GridAlign to arrange them in a 5x4 grid, Spread to fade their alpha from 0 to 1, and IncX to stagger their positions, all without writing a single loop. ## Quick Start Ask the AI to arrange a group of Phaser sprites into a grid layout and distribute their alpha values evenly using Phaser.Actions.

Frequently Asked Questions about actions-and-utilities

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

FAQPage Schema
How do I arrange Phaser sprites in a grid layout?▼

Use Phaser.Actions.GridAlign with a config object specifying width, height, cellWidth, cellHeight, x, and y. Pass an array of game objects or group.getChildren() as the first argument, and all items are positioned into the grid in one call.

How to set properties on multiple Phaser game objects at once?▼

Use Phaser.Actions property setters like SetX, SetAlpha, SetScale, or the generic PropertyValueSet. Each accepts an array of objects plus an optional step parameter that adds an incremental offset per item for staggered values.

Can Phaser.Actions work directly on Groups?▼

Phaser.Actions operate on plain arrays, not Group instances directly. Call group.getChildren() to obtain the array of children, then pass it to any action such as PlaceOnCircle or Spread.

Why does PlaceOnCircle not work with a Phaser GameObjects.Circle?▼

Placement actions require Phaser.Geom objects, not Game Object shapes. When using a Phaser.GameObjects.Circle, pass its .geom property instead so the action receives the underlying geometry object.

What is the difference between GetValue and GetFastValue in Phaser?▼

GetValue supports dot-path lookups like 'render.screen.width' with fallback sources, while GetFastValue only checks top-level keys. Use GetFastValue in hot loops since it skips dot-path parsing and runs faster.

Does Phaser.Actions.Shuffle modify the original array?▼

Yes, Shuffle uses the Fisher-Yates algorithm and modifies the array in place, then returns the same array. The same in-place behavior applies to Phaser.Utils.Array.Shuffle.