What problem does it solve?
This Skill solves the challenge of reliably loading and organizing external assets in Phaser 4 so they’re ready when gameplay starts, including tracking load progress and handling load-time errors.
Core Features & Use Cases
- Preload-safe asset loading: Queues assets in
preload() and guarantees they’re available by create(), preventing “undefined texture/data” bugs.
- Loader configuration and correct URL/caching behavior: Manages
baseURL, path, and prefix so assets resolve correctly and cache keys are referenced consistently across scenes.
- Progress, completion, and error handling: Uses Loader events (like
progress, complete, and loaderror) to build loading screens and diagnose failures.
Use case: You’re building a level-select flow where each level has its own images, sprite sheets/atlases, audio, JSON, and tilemaps; use this Skill to load everything during scene preload() while showing an accurate progress bar and failing gracefully if any file can’t be fetched.
Quick Start
Add your asset loading calls to a Phaser Scene’s preload() method and then read the cached assets in create() after the Loader finishes.