Jump to content

Multiple upload recursively


Fenopiù
 Share

Recommended Posts

Good morning!

I've a (really probably) noob question.

I have to preload all the file in one folder and its subfolder.

If I know before the upload all the stuff stored in these folders I can easly do it with

game.load.images([keys], [urls?]);

or

game.load.pack(key, url?, data?, callbackContext?);

but if I don't want to edit multiple times the string or json file (in example to have the same code valid for multiple projects or if I have some stuff now and in the future a lot more), there is a way to do it?

I've google for a while finding nothing for Phaser, nor Typescript nor JavaScript.

Thanks to whoever can help me! :-)

Link to comment
Share on other sites

On 11/28/2017 at 8:32 AM, Fenopiù said:

and in the future a lot more), there is a way to do it?

I've google for a while finding nothing for Phaser, nor Typescript nor JavaScript.

With Phaser Editor you can create an asset-pack.json file very easy, with a dedicated UI for it, and you can use a copy of the assets+pack in different projects. Actually, you can create different pack files to share common assets in different projects, and create additional packs for the particularities of each game.

You can try the evaluation copy and check if it is what you need. Just to mention that you can use Phaser Editor for assets management (and if you like, visual scenes creation too) but keep coding in the editor of your choice.

Take a look at the related Phaser Editor doc: http://phasereditor.boniatillo.com/docs/assets_manager.html

We updated this tutorial too, with a step by step guide and source code: https://gamedevacademy.org/make-a-mario-style-platformer-with-the-phaser-editor/

By the way, if you are using common assets in different projects, probably it is convenient for you to create prefabs (assets+behaviors) commons to different projects, you can do it with Phaser Editor too, just try the Phaser Example Project wizard, and select any of the examples shown in the Phaser Editor category: http://phasereditor.boniatillo.com/docs/first_steps.html#phaser-example-project-wizard

 

Regards

Arian

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...