Slow down longer app is open

Hey guys, hoping somebody may have some insight on a performance issue I am having. Thanks to the help of some of you on these forums I was able to get my games performance running pretty smooth by shortening my code and making it more efficient. However I have a strange problem I can't get past. When opening my game it plays fine at first. However if the game is left open on a device for long periods of time (6+ hours). The camera movement and gameplay starts getting choppier and choppier over time. Like if you close out with the home button but keep playing the game every hour or so, so that when you open it it just goes back to where you were and not the loading screen.
I was wondering if anyone had an idea what types of things can cause slow down over long play periods without the game resetting. Are there certain behaviors that stack up or something? My levels last around 20 seconds each then go to a new scene or back to the main menu. When you replay a level it resets. I did have music looping, thought it might be that but made a version with no music and still get same issue. Any thoughts would be very appreciated, thanks!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Thanks @tatiang this definitely looks like something worth trying out as it could very well be what is causing the problem. I see that you commented on that post saying you might try it, did you ever do that? Did you have a game that had the ram increasing over time?

    Also @fryingbaconstudios you said "I've exchanged messages with codewizard about this and they are working on that. They had to scrap their custom memory allocator because of crash issues and returned to the default LUAjt one. Once they get the creator stabilized the will redo their memory system."
    Do you know if this has happened? Is the current version of Gamesalad still having this problem? Would version 0.11 have this solved? Wondering if I should go through the trouble to try this solution or if they have a fix coming out soon. @codewizard is this still and issue?

    Thanks a lot, hopefully this can solve my problem. Only bummer is that in order to test to know for sure I have to make sure my game stays running for a long time. Any better way to test?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @erockross I never did try. I haven't had that problem and when I've worked on clients' files that were crashing or lagging, I always optimized the code (no secret technique or tool... just hard work and an eye for simplifying!) and it fixed the problem.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Yeah, I could be wrong but I really think I have done a great job of simplifying my code as my game runs perfectly for the first 6-12 hours it is open on a device, it is afterwards that the camera movement starts getting choppy...
    The strange thing is I tested in instruments with a version that had been open for a long time and was choppy and a version that was opened fresh and they were both using the same amount of ram.
    Pretty weird, I have wishful thinking that maybe version 0.11 might make this problem disappear.
Sign In or Register to comment.