Hello everyone,
Im facing following challenge:
I have a game where player sees only part of whole scene.
When player taps button, view of the player changes: objects that are on this new view are loaded and objects that are on current view are removed after view is changed. This works fine.
Only problem is that while objects for new view are loaded, app lags slightly. I would like to load objects more “smoothly” even if this resulted in longer load time. Now, physics and staff just lags while new view objects are being loaded.
Load function iterates indexed table and does something for each iteration (=index of table), depending on object type (sprite animation, spine skeleton, image…), adds listeners etc.
I welcome all tips on how to do this. I would like to have a result when new view objects load for longer time but they dont create bottleneck. Maybe I could use “enterFrame” listener of “timer.performWithDelay” (and load only part of table each frame/timer run)? Is there a better way to do this?
Thank you for reading whole thing.
Jiri