palanolho Posted June 9, 2018 Share Posted June 9, 2018 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 Quote Link to comment Share on other sites More sharing options...
jonforum Posted June 10, 2018 Share Posted June 10, 2018 on my side, my loader are a scene. Quote Link to comment Share on other sites More sharing options...
Makemake Hope Posted June 10, 2018 Share Posted June 10, 2018 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 Quote Link to comment Share on other sites More sharing options...
xerver Posted June 10, 2018 Share Posted June 10, 2018 I generally use that strategy, load some very small resources very quickly. Then use those to display a load screen while I download the rest of what will be needed. Quote Link to comment Share on other sites More sharing options...
palanolho Posted June 10, 2018 Author Share Posted June 10, 2018 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 Quote Link to comment Share on other sites More sharing options...
Makemake Hope Posted June 10, 2018 Share Posted June 10, 2018 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(); Quote Link to comment Share on other sites More sharing options...
Makemake Hope Posted June 10, 2018 Share Posted June 10, 2018 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.