Jump to content

Any effective way of loading everything before start rendering the canvas?


palanolho
 Share

Recommended Posts

Hi everyone,

On a game I'm playing with, I have a couple of things that I'm loading so that I can use them later. In particular, I have:

  • images
  • sounds (using howlerJS)
  • spine animations

Does anyone know of an easy/effective way to load everything before actually rendering the scene? Possibly, a "loading screen" would be displayed while everything is being loaded.

 

Many thanks in advance

- Miguel

 

 

Link to comment
Share on other sites

You could load some smaller assets for a Loading icon/animation first. Those can be loaded  in a scene that goes before Preloader scene. Than you could switch to Preloader scene, start showing Loading icon/animation, then start preloading everything else. If this is what you mean :)

Link to comment
Share on other sites

16 minutes ago, palanolho said:

Can I load multiple "PIXI.loader" and corresponding ".load()" functions?

Yes, you can. Like creating this new one for a "loader" preload and using a default one (PIXI.loader) for the main preload.

var newLoader = new PIXI.Loader();
newLoader.load();
Link to comment
Share on other sites

17 minutes ago, palanolho said:

Can I load multiple "PIXI.loader" and corresponding ".load()" functions? or fo I need to do it all on the same time?

Also, do you know any tutorial or guidelines on how to create multiple scenes?

 

many thanks

For a new scene I generally use a class that extends PIXI.Container with all the needed functions. So I switch different scenes by adding / removing it to game stage.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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