So in my application, the Corona SDK splash screen isn’t going away until like 3 seconds after the code starts running. At what point is it supposed to go away and is there anyway to check when it is gone?
- Are you using composer.*
- If “Yes”, are you starting your game logic in the create() call?
- If “Yes”, start game logic id scenes show() listener on the ‘did’ phase.
I am using composer.*
What I’m trying to do is have a custom splash screen show after the corona sdk one.
I create the splash screen in main.lua, but it’s not its own view. It’s just a display object.
Would you suggest making the custom splash screen its own view (.lua) and then using
composer to go to this view?
Also, it seems to only be happening on Android devices. The simulator and iOS don’t see this problem.
That’s what I do. I don’t like to create any graphics in main.lua. I use it for initialization only.
Rob
You can easily do this in main.lua as follows
//load splash here local function loadMyGame() //init code here, load images, sounds, DB stuff //go to first scene when done composer.gotoScene("mainmenu") end //add a one frame delay to allow screen to update and show the custom splash timer.performWithDelay(1, loadMyGame)
Simple…
Well that is what I’m doing. And yet the corona sdk splash screen stays up until a while after my custom splash screen is hidden (which happens when the timer performs loadMyGame).
Oh well I know this works as I do it for all my games… Maybe you are killing your splash screen too early?
What do you mean by too early? When exactly would too early be? I was under the impression that main.lua would not run until the corona sdk splash screen has been hidden. Is this not the case?
- Are you using composer.*
- If “Yes”, are you starting your game logic in the create() call?
- If “Yes”, start game logic id scenes show() listener on the ‘did’ phase.
I am using composer.*
What I’m trying to do is have a custom splash screen show after the corona sdk one.
I create the splash screen in main.lua, but it’s not its own view. It’s just a display object.
Would you suggest making the custom splash screen its own view (.lua) and then using
composer to go to this view?
Also, it seems to only be happening on Android devices. The simulator and iOS don’t see this problem.
That’s what I do. I don’t like to create any graphics in main.lua. I use it for initialization only.
Rob
You can easily do this in main.lua as follows
//load splash here local function loadMyGame() //init code here, load images, sounds, DB stuff //go to first scene when done composer.gotoScene("mainmenu") end //add a one frame delay to allow screen to update and show the custom splash timer.performWithDelay(1, loadMyGame)
Simple…
Well that is what I’m doing. And yet the corona sdk splash screen stays up until a while after my custom splash screen is hidden (which happens when the timer performs loadMyGame).
Oh well I know this works as I do it for all my games… Maybe you are killing your splash screen too early?
What do you mean by too early? When exactly would too early be? I was under the impression that main.lua would not run until the corona sdk splash screen has been hidden. Is this not the case?