Background loading
Elliot

When I load my assets in wade, using functions such as wade.loadImage(), the game stops running and shows a loading screen (if a loading screen was set).

 
I understand why this happens, and it's really convenient most of the time. However I sometimes need to load stuff in the background, while the game is still running. Ideally, I would also need to be notified when it's finished loading... not only images though, also sounds, scripts, and so on.
 
Can we do that with this version of wade? If not, can you do something like that for the next version? Would be really useful to me.
 
Thanks
1 Comment
Taddeus

I do this with preload functions: wade.preloadImage()wade.preloadJson()wade.preloadAudio()wade.preloadScript(). They don't pause the game, and you have callbacks:

 
wade.preloadScript('script1.js', function(){    wade.preloadScript('script2.js', function()    {        console.log('I have loaded 2 scripts in background!');    });});
Post a reply
Add Attachment
Submit Reply
Login to Reply