Change in 2016.2994 causes increased transition times between scenes

Hi,

We recently tried to update the version of Corona we use to build. After the change we noticed a black screen flashing when doing some scene changes. We narrowed the change down to something that was included in 2016.2994. It only happens on some scene changes so I suspect larger scenes are causing this.

Does anyone else have this issue? Is there a way around it? Is this extra delay something we just need to live with now?

Here is how the scene change is coded.

composer.gotoScene("nextScene") composer.removeScene("currentScene")

Hi Matthew. I responded to the support query on this, but for the benefit of others, we generally do not recommend removing the scene you’re in. In this case composer.gotoScene() dispatches multiple events and returns before the scene is created. If you remove the current scene, if the other scene takes some time to build and show. 

You can either remove the scene from another scene (remove a scene before you go to it or remove the scene you just left). However, we’ve recently tested scene removal and if you put your removeScene() call in the scene:hide() function’s “did” phase. At that point the scene you’re going to is completely on screen and should avoid the flicker.

Rob

Thanks Rob!

Doing the remove in the hide function sounds like the best solution and seems like an easy change to make.

Hi Matthew. I responded to the support query on this, but for the benefit of others, we generally do not recommend removing the scene you’re in. In this case composer.gotoScene() dispatches multiple events and returns before the scene is created. If you remove the current scene, if the other scene takes some time to build and show. 

You can either remove the scene from another scene (remove a scene before you go to it or remove the scene you just left). However, we’ve recently tested scene removal and if you put your removeScene() call in the scene:hide() function’s “did” phase. At that point the scene you’re going to is completely on screen and should avoid the flicker.

Rob

Thanks Rob!

Doing the remove in the hide function sounds like the best solution and seems like an easy change to make.