Open czyzby opened 8 years ago
Yep. That's the case. In libgdx I had to do that kind of synchronous loading. (embedResources
option).
In our codebase using jtransc-media we are loading them asynchronously on demand. But since libgdx is designed to access IO synchronously we have this problem.
I will check how to add a preloader. Probably looking for "haxe lime preloader" or "haxe openfl preloader".
Actually, LibGDX supports async files loading through AssetManager. Assets loaded using AssetManager
could - and should - be prepared asynchronously. I suggest making the synchronous approach optional and reimplementing AssetManager
to provide actual cross-platform load-on-demand asynchronous asset loading.
The application usually "hang" after the page fully loads - I'm guessing that's the assets preloading period. Adding a simple progress bar - kind of like LibGDX GWT backend does - would be nice.