Black frame after Launch image in Codea Xcode project

When exporting a Codea app to an Xcode project, there is a single black frame that gets displayed between the launch image and the first frame of the app. Is there a way to fix this? It’s especially problematic when the launch screen is the same as the app’s first frame, because you get a black flash instead of a smooth transition.

I’ve never seen this.

I just exported the empty app that gets generated when creating a new project, and it shows one black frame between the launch image and the background color from the draw() function when running it on Xcode. I assume everyone has this problem, even if you haven’t seen it.

I have had this problem when using an IOS simulator. Are you using the simulator, or a connected device?

It happens on both the simulator and devices. The black flash defeats part of the purpose of having a launch image. I’m sure anyone running exported Codea apps on devices would have this problem.

@SpellCollapse - Now I see it (on a slower device). You might try a method similar to StackIt: Have a black launch image and have the actual app fade in from blackness.
If you want the black launch images, LMK.

I’d prefer an actual launch image, and Apple insists on one in their documentation. I’ve tried drawing in the setup() function and different backing modes, but nothing worked. Codea does not seem to allow drawing to the very first frame. Even if the device is fast, the black flash is unsightly.

@SpellCollapse - I don’t think Apple really cares. I’ve seen lots of other games that do the same thing. But alright.

Does a single black frame really matter?

How could a single black frame at the beginning completely destroy the entire experience of the app?

I really don’t want to debate whether or not a black flash after the launch screen is acceptable. I’m looking for a fix.

I’ve been able to change the black frame to a different color by using a background color or a rectangle in the setup() function. But if I use a sprite, it will not draw from the setup function, so now I can get a flash of any color I want, but that is no fix.

You could cheat and make the app fade in after starting

The launch image exists so that the user does not have to stare at a black screen while the app starts up. I would like to use it as it was intended. Like many apps, my app does a lot of prep work in the setup() function, so the black flash is somewhat long.

You can download Spell Collapse Free (AppStore.com/SpellCollapseFree) if you want to see the problem in action. I can also send anyone a promo code for the paid version, Spell Collapse (AppStore.com/SpellCollapse). It is one of best rated word games on the App Store with 4.6 stars, and almost completely done in Codea.

I also have a free app called Flighty Birds (AppStore.com/FlightyBirds), that also demonstrates the problem. This game has objects that slide onto the launch image screen, which would look amazing if there wasn’t a long black flash that interrupts the effect.

@SpellCollapse, I have installed flighty birds and I see no such error. The transition is perfect, with the objects sliding onto the screen seamlessly (no interrupting black screen)

@JakAttack - That’s strange. When you start it, there will be a blue sky and sun with the word “LOADING” as a launch screen. When the word “LOADING” disappears and the scene slides on the screen, there should be a back frame for a half/quarter second. The black frame appears on all 6 devices I have tried, and in the simulator.

@SpellCollapse I believe If you draw an image as the first thing in the function setup() then it will show during the black screen. Try making a background exactly the same as your loading screen. I didn’t check if this works but I think it does.

@jrohanian - Only background() and rect() work in the setup() function, and sprite() does not work.

@SpellCollapse sprite() works fine for me in the setup function.

@SkyTheCoder - Was this on the iPad using Codea, or on the Mac with Xcode?