loading-assets

Load Phaser 4 game assets via the Loader with progress events.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill loading-assets-artriv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loading-assets
Source: https://github.com/ArtRiv/game-topicos-especiais/tree/main/skills/loading-assets
Command: npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill loading-assets-artriv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Loading Phaser game assets reliably and with clear progress feedback can become error-prone and slow to integrate across scenes.

Core Features & Use Cases

  • Queue and load assets correctly: Use Phaser's Loader (this.load) to fetch images, spritesheets, atlases, audio, JSON, tilemaps, bitmap fonts, and more during preload().
  • Work safely across scenes: Loaded assets are stored in global caches (textures in the Texture Manager; other data in typed game.cache sub-caches), making them reusable everywhere.
  • Provide responsive load UX: Track progress and handle failures using Loader events like progress, filecomplete, loaderror, and complete.

Quick Start

Use the loading-assets skill to implement preload() in your Scene and then reference the cached keys in create() once loading completes.

Frequently Asked Questions about loading-assets

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

FAQPage Schema
How do I preload Phaser assets like spritesheets and tilemaps in a scene?

To preload Phaser assets, queue files inside the `preload()` method using `this.load`, which automatically starts the loader for fetching images, spritesheets, atlases, audio, JSON, and tilemaps for your scene.

What are Phaser loader events for tracking asset loading progress?

Phaser loader events like `progress`, `filecomplete`, `loaderror`, and `complete` provide mechanisms to manage progress, handle file load failures, and trigger actions when all assets finish loading.

Can I load Phaser assets outside of the preload method?

Yes, you can load Phaser assets outside of `preload()`, but you must manually start the loader after queuing your files to fetch images, audio, or JSON data for gameplay use.

How does Phaser store loaded game assets for use across multiple scenes?

Phaser stores loaded game assets in global caches, placing textures in the Texture Manager and other data in typed `game.cache` sub-caches, making them reusable everywhere across your scenes.

How do I resolve asset URLs when loading files in Phaser?

Resolve Phaser asset URLs by configuring `baseURL`, `path`, or `prefix` settings on the loader before queuing files, allowing you to fetch assets from remote servers or local directories.

Why do my Phaser assets fail to load when starting the loader manually?

Manual Phaser asset loading fails if you do not explicitly start the loader after queuing files outside `preload()`, or if URL resolution settings like `baseURL` or `path` are configured incorrectly.