Function test before app start

@adrianm, @schizoid2k; I have written a topic in the general discussion section in this link: https://forums.coronalabs.com/topic/67889-small-problem-with-composergotoscene-transitions/ I apologize if I started the new topic in a wrong place since I have not received any answers. I am new to this forum and my intention is to make things right. In that topic is the code of one of the scenes in which I think there may be problems. I’ve participated in other forums that have a different user interface. I would appreciate doing things organized to avoid breaches of the rules. If I made some mistake by writing something in the wrong place I would appreciate any moderator help me. Actually I would like to solve the problem of transitions. Any help is welcome. Thank you for all your attention.

@adrianm your idea sound great but I do not know how to do it.

You can preload a scene by using composer.loadScene() and when that is finished loading you can use composer.gotoScene() to transition it at a later date.

A more complicated version would load and cache your textures in main.lua and then use them in your scenes.  Note: loading a graphic into memory is much slower than actually displaying it once it’s loaded.  More info on this technique is here.

Thanks adrianm I’m going to read and test that right now!

I load in main lua the 20 scenes that my application has using the composer.loadScene() and this is what happens to me now.  1) My cell phone is very very hot when running and keep my application open, if I leave the application, to do a google search for example, when I return to the application I have the same problem, transitions do not run the first time.

do I need to use a system event that reload the main lua or an external module with a function to use the composer.loadScene()?
or, I need to use the composer.loadScene() inside composer scene events for those scenes that I’m going to move from the scene where I am?

–Mounting the scene is easy but making the application work as it should is a challenge for beginners like me who have no programming knowledge.–

Thanks in advance for all the help

Depending on how big your scenes are I’m not sure loading all of them is wise. Mobile devices don’t have a lot of free memory and even less free GPU memory. When you run low on memory, your app will perform poorly.

Rob

Thanks Rob Miracle! For the moment I solved the problem by eliminating all transitions. I still notice a delay like a second when I change the scene. I am eliminating parts, building and testing to see if I identify what the problem is.

Only preload your next scene - not all scenes!  Android releases textures when you switch focus away from your app.  The slowdown you are seeing is the Corona reloading your textures.

Unless your textures are real small you cannot load and transition at the same time. You have to preload and then transition.

Look at the Corona sample in Graphics called TextureLoad.  This should help you.

Thanks adrianm, I’m going to take a look right now.