Any way to keep music playing during collection loading? -thanks
Use load async for your collection proxies, that attempts to load-balance and distribute over more than one frame the computation involved. Which means that if you load big atlases it might do a hiccup, but for most cases it should be able to load smoothly. http://www.defold.com/ref/collection-proxy/#async_load
Thanks, I overlooked it. Still not perfect but way better.
Yes, as @DeManiac said, async loading of collections is the best way to currently solve this. It’s not optimal, but it’s the best there is for now.
Actually, I don’t think the issue is solved. Music still works pretty bad on loading, even async. And music is very important part of any game. Breaking music on loading breaks the whole atmosphere (especially in html5 game, when we have to use smaller scenes and do loading pretty often).
Also stop_sound message doesn’t work for me, could you also check this please?
I have the same issue.
When I try to load (async_load) winpopup collection, I have a small freeze of sound (on end of collection loading, i think).
It is bad for user experience.
I tried to find some workaround, but nothing helps.
For now I am working on merge of my winpopup with main game collection for preloading all resources before level starts - it is the one solution what I found for now.
Do you know about this issue? (maybe you already have a ticket?)
Have you plans to fix that? Is it possible to fix?
What does the winpopup collection consist of? Are there any huge assets? I believe that the async_load loads one asset at a time, but it will not divide the loading of that single asset over multiple frames, which could cause lag if the asset is large. @Johan_Beck-Noren can probably correct me if I’m wrong.
Yes, it’s a big collection with many different things: few spine animations, few particles, sounds and etc.
But these are all parts of a popup, I can’t cut it to different collections.
And one more point - in winpopup I’m using the same texture as in game UI and as I understand it shouldn’t load one more time for the popup, yes?
Even though the resources are loaded into memory asynchronously there are a number of things that still happen on the main thread, for example uploading textures/data to the GPU.
So if you have a collection proxy loaded with async with a lot of big resources there is a chance there will be some heavy work done on the main thread as well. The only workaround I can think of in your case is to do just like you said, preload some of the large resources where possible to offload the work from the async_load.
ok, thank you.
As I understand it can’t be fixed in future?
(I already merged my collections, and it works good)
It can and should be looked at but it is a bigger task that needs to be designed and implemented, probably in the future when we take a wider look at our rendering
Ok, but one more time as important point:
I did not load new texture, I just load collection that used the same texture like already loaded UI. In my case this freeze not about load big texture to GPU memory. Just in case.
I understand, the upload of textures to the GPU was just an example of something that is not done async. The point is that not all work is done async when calling async_load
/Johan