I have a lot of updates running at once in my app. These updates are categorized for the important sprites in my game, so the Ais are running their own update, a cabinet which generates random loot and is opened when tapped is going through its own update, etc. Does this take up too much memory? Because on a 2g ipod the app gives a memory warning level = 2 when in the main city (with the most sprites in the scene at once) and gives a memory warning level = 1 when the updates for some major sprites are remove. Pretty much Im trying to ask if it is worth it to almost destroy my way of organization and only update in one scene...so run only one update and pass in every sprite's data in that one update. This would take a very long time and I would have to restructure a lot of well organized code. Thats why I really want to know if it is worth doing so. I want to make this app playable on the ipod 2g with no memory issues and if I need to do this then I will. Also, here is some more background info that is contributing to the memory issues. I would like to know if I can resolve these issues instead of the update issue which does not fix the whole thing anyway...
1.)I have 11 plists loaded in at once (each 1024 x 1024) and I will need some frames from each of them in the scene at one time. Should I organize it so that I use less? If so how many should be in the scene at once?
2.)I have a lot of arrays initalized at the beginning of the game. Should I restructure my code to get rid of all these arrays? The arrays contain CCSprites and b2Bodys (pointers)
3.) I have a NSDictionary thats stores a lot of NSNumbers. I had posted another question regarding whether or not these take up too much memory and almost evreyone said that unless you are storing 1 million of them it will ot matter. I am only storing maybe 200.
4.)I have some global variables that need to be retained (including arrays and ccsprites) should I somehow get rid of these global variables? I know its not good practice to use them but I did not know this when I first started programming my game....Also, if possible this option should be ruled out because I need the GameScene layer and the hero sprite as global variables no matter what...
Thanks for any suggestions!!