I have a game scene with a button that takes you back to the main menu. In the main menu I have a button that starts the game. When I rapidly switch between the scenes, memory goes up and the frame rate drops down significantly. How can I fix this?
Jump to content
Sounds like a leak. You may be re-creating content when you don't need to on each entry into the scenes.
Take a look at your content creation code and print out messages to the console every time the main creation functions are called.
Then, see if you're getting calls when you don't think you should be.
Go from there.
Just my 2-cents.
PS - Also verify your destruction code is working. It is incredibly easy to leak (hemorrhage) memory if you're new and not super familiar with scope & visibility, as well as the general flow of how Corona works and when content should be removed.
Edited by roaminggamer, 30 March 2018 - 08:42 AM.
Switch screens slowly?
As @rg says create and destroy are fundamental and must be addressed.
Whenever I create an object the very next thing I do is write the corresponding destroy code.
Once I have create and destroy sorted... only then will I actually do something with the object.
Community Forum Software by IP.Board