[SOLVED] Getting rid of the stutter between launch image and app start

Hi there,

I was just wondering if there is a way to get rid of the quite perceptible stutter between the launch image and the time the actual app loads. (I’m using director class, if that has anything to do with it.) I’ve tried having the app actually launch into a scene that contains the exact same image as the launch image, but there is still that noticeable “flicker”.

Any way to fix this?

Thanks!
Logan [import]uid: 44896 topic_id: 17748 reply_id: 317748[/import]

I have not experienced this myself; is your first scene very intensive? What kind of device are you testing on?

Peach :slight_smile: [import]uid: 52491 topic_id: 17748 reply_id: 67672[/import]

Well, the scene is now very much not-intensive :stuck_out_tongue: I thought that maybe it was the jump from static image to a scene with a lot of concurrent transitions that was causing the stutter, so I changed the first scene to simply be an image that is displayed for a few seconds. (The same image as the launch image.) The stutter is really just kind of a momentary flash where the image disappears for a split second.

I’m testing on an iPhone 4. (This also happens in the simulator, though.)

Logan [import]uid: 44896 topic_id: 17748 reply_id: 67673[/import]

Perhaps worth testing without Director to see results? What build are you using? [import]uid: 52491 topic_id: 17748 reply_id: 67708[/import]

Aha! It’s totally Director Class. Sadness.
(I’m using build 671, btw. But it’s definitely Director Class.) [import]uid: 44896 topic_id: 17748 reply_id: 67812[/import]

Perhaps what you could do is use a delay before actually using director.

As in, set a splash screen in main.lua and after 2 seconds do all the director stuff and switch to menu.lua. (Or whatever.)

Maybe give that a try?

Peach :slight_smile: [import]uid: 52491 topic_id: 17748 reply_id: 67868[/import]

I’ll try that out, thanks!

(I know this isn’t the Director Class part of the forum…but, will it mess up how director works if I just throw a timer into the standard main.lua setup that director class requires? I’m not exactly sure how to go about doing it without breaking things…)

Logan [import]uid: 44896 topic_id: 17748 reply_id: 68039[/import]

If you know exactly what your app is going to look like at launch, you can take a screenshot, save it as Default.png (and a Default@2x.png if on an iPhone4) and that image will show instantly on an iOS device.

That way, if it’s a loading issue, it will appear as though your app has loaded instantly. Many apps do this, but leave out text and things like that.

Update: Forgot to mention, you just drop Default.png and Default@2x.png in your project directory—nothing else has to be done. [import]uid: 52430 topic_id: 17748 reply_id: 68065[/import]

I actually have that already. The problem I’m having is that there is a very noticeable stutter between when the default.png image is displayed and when the first scene is loaded. Basically, there is a quick flash to blackness, and then the scene is displayed.

Logan [import]uid: 44896 topic_id: 17748 reply_id: 68066[/import]

Hey again Logan,

I do not think the timer method should present any kind of problem, although really you’d have to try it to be sure.

I’d encourage you to do that as it sounds like if it works fine your issues are resolved.

Peach :slight_smile: [import]uid: 52491 topic_id: 17748 reply_id: 68080[/import]

What exactly does Default.png do?
Is that like a permanent wallpaper for your app that always show up in the background? [import]uid: 39031 topic_id: 17748 reply_id: 68223[/import]

That did it! Just avoiding the first director class change got rid of the jitter completely! Yay! Thanks :slight_smile:

@iolo72 - Default.png is just a startup image that is displayed while iOS actually loads the app. [import]uid: 44896 topic_id: 17748 reply_id: 68252[/import]

Glad you fixed your problem!

Also: Consider trying the Storyboard API that was recently released. In the future, we can provide support for your problems if the issue is related to that:

http://developer.anscamobile.com/content/storyboard
http://blog.anscamobile.com/2011/11/introducing-the-storyboard-api/
[import]uid: 52430 topic_id: 17748 reply_id: 68272[/import]

Oh, wow! Totally didn’t see this Storyboard API announcement…that’s awesome! I’m probably too far into things with this app to make the switch from Director class, but next app for sure.

Thanks!
Logan [import]uid: 44896 topic_id: 17748 reply_id: 68278[/import]