Hello!
I’m making an OpenFl game using the native target & it’s loading slowly on mobile devices. How can I reduce the loading time for the user?
The issue occurs when I’m either 1) loading assets from my SWF library or 2) creating variables in my code (eg. the variables associated with UI elements).
Currently, I do all the loading/initialization shortly after the player launches my game. For the first 7 seconds, they just see a static loading image. Not ideal!
I’ve tried to decrease the length of time but with only limited success. I’ve found that if I do too much loading/initialization at once, the rest of the game freezes until it’s complete.
Here’s what I’ve tried:
1. Multi-threading: It sometimes helped but I couldn’t get it to work consistently.
(Also, I’ve read people saying not to use it with DisplayList items.)
It’s quite possible I’m not using it correctly.
2.Assets.loadBitmapData helped to load a few assets asychronously & save a small amount of time. But most of my assets are MovieClips.
3.Breaking up my loading & initialization code into small pieces that are executed on different frames. This saved me a few seconds. My impression is this is what [some people do][1]. I suppose I could break up my loading code into 20 or so small pieces run on different frames, but I’m hoping there’s a more elegant solution.
I hope to decrease the loading delay by a few more seconds. My game is only medium-sized & the SWF file I load is 20 MB.
It’d be ideal if the game could be doing something in the foreground while assets are simultaneously being loaded. My impression is that OpenFl only has limited ability to do this. Or am I wrong?
Thanks!
Damian
P.S. The specific devices it’s loading slowly on are BlackBerry devices - Z10, Q10 and Z30.
[1]: http://www.openfl.org/archive/community/general-discussion/openfl-dynamic-asset-loading/