loading-assets

Automate asset loading and caching for Phaser 4 scenes.

Updated Jun 21, 2021
One-click install
npx skills add https://github.com/mahirocoko/mahirocoko --skill loading-assets-mahirocoko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loading-assets
Source: https://github.com/mahirocoko/mahirocoko/tree/main/plugins/phaser/skills/loading-assets
Command: npx skills add https://github.com/mahirocoko/mahirocoko --skill loading-assets-mahirocoko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Asset loading and caching for Phaser scenes can be error-prone and time-consuming; this skill orchestrates the Phaser Loader to queue, load, and cache assets so scenes start with all resources ready.

Core Features & Use Cases

  • Loads a wide range of asset types (images, spritesheets, atlases, audio, JSON, tilemaps, fonts) via the Loader plugin.
  • Auto-starts during preload and exposes progress events to drive loading screens.
  • Caches assets in global game caches for seamless cross-scene access.
  • Supports common patterns and provides practical examples for typical Phaser 4 workflows.

Quick Start

Define a Scene and queue assets in preload() with this.load.* calls, letting Phaser auto-start the loader so assets are ready in create().

Frequently Asked Questions about loading-assets

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

FAQPage Schema
How do I preload spritesheets and audio in Phaser 4?

Preloading spritesheets and audio in Phaser 4 requires queueing assets in preload() with this.load.* calls. The Loader plugin auto-starts, caching assets globally for cross-scene access in create().

What is the best way to track asset loading progress for a loading screen in Phaser?

Tracking asset loading progress for a loading screen in Phaser uses progress events emitted by the Loader plugin during preload. These events expose loading percentages to drive UI updates for your scene.

Can I load tilemaps and JSON files globally for cross-scene access in Phaser?

Loading tilemaps and JSON files globally is possible by queueing them in preload(). The Phaser Loader caches these assets in global game caches, ensuring seamless cross-scene access throughout the game.

Does the Phaser 4 Loader support fonts and atlases?

Yes, the Phaser 4 Loader supports loading fonts and atlases. It queues these asset types via the Loader plugin and maintains them in global caches for immediate use in game scenes.

Why are my Phaser scene assets not ready in create()?

Phaser scene assets are not ready in create() if they are not queued in preload(). The Loader plugin must process this.load.* calls during preload() to ensure all resources are cached before scene creation.