Question about Optimization/Memory Usage
Hello all. I am nearing the end of my project and I have been busy optimizing my game. I have noticed, however some strange things going on and I am hoping maybe someone has some idea what is happening.
Now, obviously, my game has lots of scripts and behaviors and whatnot, and I have followed AcceleratedGames' "★★ 31 Optimization Tips ★★" as closely as possible (I have yet to implement the "Timers" section).
However, I have noted that when I do a play through of my game, after I have finished, I return to the Main Menu I see the "Other" category jump significantly. In the Gamesalad Viewer stats, I see that my project's "Game Engine" numbers are up at about 65 MB while playing the game, and my "Other" stats are sitting around 12 MB. When I finish the game and return to the Main menu however, the "Game Engine" drops to about 18 MB and my "Other" jumps up to around 48 MB. This repeats with each subsequent play-through of the game (not closing the app; just starting a new game up), and the "Other" category just gets bigger and bigger.
When I finish a game, I change my scene to an "end of game" stats screen with a "Back Button". When that Back Button is pressed, it does a Rest Game Behavior (instead of Change Scene). I figured this would dump any loose files hanging around, but it does not seem to be doing this.
Anyone have any idea what is going on?
Now, obviously, my game has lots of scripts and behaviors and whatnot, and I have followed AcceleratedGames' "★★ 31 Optimization Tips ★★" as closely as possible (I have yet to implement the "Timers" section).
However, I have noted that when I do a play through of my game, after I have finished, I return to the Main Menu I see the "Other" category jump significantly. In the Gamesalad Viewer stats, I see that my project's "Game Engine" numbers are up at about 65 MB while playing the game, and my "Other" stats are sitting around 12 MB. When I finish the game and return to the Main menu however, the "Game Engine" drops to about 18 MB and my "Other" jumps up to around 48 MB. This repeats with each subsequent play-through of the game (not closing the app; just starting a new game up), and the "Other" category just gets bigger and bigger.
When I finish a game, I change my scene to an "end of game" stats screen with a "Back Button". When that Back Button is pressed, it does a Rest Game Behavior (instead of Change Scene). I figured this would dump any loose files hanging around, but it does not seem to be doing this.
Anyone have any idea what is going on?
Comments
We also find that the logic itself hurts performance a lot. I think that will be something that will be solved by the lua-free version.
One tip: The amount of attributes matters. We had about 60 variables to manage some level data, and when switched to tables, it took about 3 seconds off loading.