Question about Phaser Asset Management

The Cache, which is the system that holds the loaded files, is global for the game. So yes, you can have a boot scene that loads all of the assets you’re going to need at once - and actually, many people prefer to do it this way.

How you invoke the loader is up to you. You can create any config file you want and parse it however you want, as long as you translate it to calls to the loader. If you prefer something built-in, Phaser has a feature called file packs that are similar to config files.

I honestly can’t give you a good reason for it. It’s been like this since at least Phaser 2. Of course, nothing prevents you from writing your own wrapper or parsing your own config format.

2 Likes