jtransc / gdx-backend-jtransc

GDX backend for JTransc: targeting every platform lime supports (html5, windows, linux, mac, android, ios...) (flash is wip) (consoles + unity likely to be supported in the future)
23 stars 6 forks source link

Preloader on HTML5 platform #9

Open czyzby opened 8 years ago

czyzby commented 8 years ago

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.

soywiz commented 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".

czyzby commented 8 years ago

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.