I'm having some issues with my latest game-attempt. It runs fairly smoothly, although I have to say it's pushing against the 30 fps mark, which it sometimes dips below - especially when touch events are registered - but the start of the game is really terrible! The first three seconds everything is choppy as hell, and the frame-rate seems to be about 5 fps tops.
Is this a Corona issue, with too much going on in the startup code of Corona itself? I'm not seeing this in Objective-C or Cocos2D apps, but this could of course be due to good programming of the programmers, not just the framework.
Is this something you have workarounds for? It seems like not introducing everything at the same time on screen helps, but the again at the start of a level you do sort of need everything to spawn almost simultaneously.
In another project I've put a menu screen in front of the first level specifically to offload the stress a bit during app startup, but then in that menu screen even a simple button rollover is laggy. In my last game I'm doing the same (just one button on an otherwise empty screen, that launches the game), but there it just seems do postpone the problem, with hiccups occuring when you push the button and the level starts.
I try to structure my level-start code well, with several steps in a seemingly good order (SetupArrays, then LoadMap, then SetupSprites with lots of drawing calls, and lastly SetupEventListeners is called with a delay of 100 to give the app some time to rest) but this doesn't seem to help that much. Until now my best results are just waiting 2-3 seconds when the level starts, and then gameplay is more or less fluent, but you can hardly ask the same from your gamers, huh?
Any tips or similar experiences?
thanks,
Thomas