Memory Usage - Other?

Hey there. I'm working on a fairly simple game.
My memory usage for sounds is typically 1mb, for images under 8mb, and for the game engine around another 8mb. However I'm getting over 40mb in the "other" category!
What exactly affects the "other" category so I know what I should change?
Thank you!
My memory usage for sounds is typically 1mb, for images under 8mb, and for the game engine around another 8mb. However I'm getting over 40mb in the "other" category!
What exactly affects the "other" category so I know what I should change?
Thank you!
Comments
Now those aren't all on the stage - those are just my total amount of prototypes.
Even on my splash screen scene, where I have 1 actor - my logo, and I play 1 sound (which is less than 100kb) I get 35+mb in the "other" category.
It's obviously not actors or rules. Refer to my previous post ^.
There are 3 sections in the "memory" department. Audio, images, and other.
All I need to know is what "other" encompasses.
It could also be the amount of Rules? Or Scenes?
I would make a duplicate version of your game.
Start chopping things out one by one and run a test in the GS Viewer after each thing eliminated. That will help you find the culprit.
Good luck!
I am having issues with my game too. I noticed that the total memory keeps increasing over time and by 2-3 mins the game crashes. At that point, the memory has reached 47.6mb. It starts are around 23mb. This is a big problem I am facing now.
Has this got to do with the constant spawning I have in my game? We did discuss about how FPS drops with spawning too many actors but mine has not dropped below 31 fps despite constant enemy spawning and multiple bullets spawning. Does this mean its high time I swapped to the "pre-spawn everything and move dead creeps offscreen" algorithm? But even if I do spawn, if I destroy it correctly, does it still cause memory leaks?
At 45MB or so the device will crash.
You need to recycle everything to pull it off. That goes for creeps as well as bullets. Explosions, everything...
You could just target the iPad or iPhone4, but on yhose older devices, its brutal.
And then run it on the device. That will give you an idea of what the game can handle.
Or use display text to keep track of all the stuff you spawn and note when it gets near 40mb or so...
These actors respawn off stage, so if I just moved them instead of destroy and respawn, that should help. Thanks for the info!
I had no idea. But now I think I can go into it and put a periodic break to another scene to clear this up, but if I had known before...
_______________
Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
The game I am making now is an endless game and this is VITAL.. Gendai?
I played for many minutes of constant spawning and destroying and the memory fluctuated a bit, but stayed within a couple megs of the same size.
Where did this notion about spawning and destroying blocking up memory come from?
_________________________________
Nesen Probe: Is this the single most unappealing game in the history of GameSalad? I can't seem to give it away! Anywhere. But if anyone want's to try it out, codes are still available! http://gamesalad.com/forums/topic.php?id=8097
Can you try a test for me?
Just try spawning an Actor that has a 1024x1024 .png in it. It can be any graphic. You can just make a big gray box in Photoshop, anything. And make sure it isn't scaled, but actually 1024x1024.
When it gets spawned, the image usage RAM should jump up by 2MB.
When you destroy it, hopefully it should then drop by 2MB.
The same thing if you want to add sound effects to that Actor. The audio RAM should rise by the size of the .ogg file.
It always seems to just keep climbing for me. The RAM doesn't get relinquished until I Change Scenes.
0.8.7 is fine. It happened then for me too.
I'll also run some tests myself.
If you notice it drop back down, that would be awesome! Maybe I have the setup in my game incorrect, and it's not destroying the Actors properly.
Here's my results...
I made a dummy test .png in Photoshop. It is 1024x1024
In the first test, I made two Actors in the Library. The first Actor has a simple Rule:
When Mouse is Down
Spawn Actor 2
Actor 2 has my .png image in it. And a Timer that destroys itself after 3 seconds.
I drag actor 1 out into the Scene and test it. Interestingly, the image RAM is now already at 2MB - even though there is just a plain white box in the Scene with no graphics.
Tapping the screen spawns Actor 2 and the RAM does NOT increase - but it is already at 2MB. Apparently GS goes through all the Rules and pre-adds any spawned images to RAM automatically - whether you decide to spawn them or not.
When the Actor gets destroyed in seconds, the RAM does NOT go back down for me.
Test #2
In this test, I just have 1 Actor with no graphics - just a plain white box.
And in this case, I use a Change Attribute to change its image, like this:
Rule
When Mouse is down
Change Attribute: self.Image To: "test.png"
and then a 3 second timer to destroy itself
Now when I run the test, the image RAM is correctly at 0K. When I tap the screen, NOW it jumps up to 2MB. This is what I expect. When it destroys itself, the RAM is not freed up for me.
I am using the second method in my game, Changing the images when I need them. This way it only adds to the RAM total when I actually use the image. But in both cases, the RAM never drops for me.
If you can help me figure out a solution to this, that would be sooooooo awesome!
Joe
Sorry, I've been out of town all day. I'll try some more testing tomorrow. I'm wiped out tonight. This would be great to get figured out.
_________________________________
Nesen Probe: Is this the single most unappealing game in the history of GameSalad? I can't seem to give it away! Anywhere. But if anyone want's to try it out, codes are still available! http://gamesalad.com/forums/topic.php?id=8097