-
Giant Memory eater?
I have one frame, 25 objects and 115 Mb :o
How on Earth do I reduce that many mega bytes? It's only the first frame out of like another 20 and I haven't even finished that first frame o___O
I think it is because I have a giant backdrop for the platforms, not little tiles. The platform is 5000 pixels in width. I also have another tile that goes on top of the platform. This has all the grass, trees etc on it and it is also 5000 pixels in width. So Both Platform and Grass tile are 5000 pixels in width and they are both backdrops.
The current frame size is 5000 x 768 and I also have an active object (the sky) which is that big. It HAS to be an active object because there are some events on it.
Thanks to HWA my game isn't laggy...not yet.
Now that you have all the information about my game, are there any suggestions on making the size smaller?
Thanks! :grin:
-
Re: Giant Memory eater?
I have read your article but try to cut the sky in different objects
-
Re: Giant Memory eater?
Big huge active objects take a lot of memory.
-
Re: Giant Memory eater?
i don't always trust the debugger since doing something like minimizing/restoring the window will cause the memory usage meter to drop
i have no idea if it's just not updating all the time, or if it's actually freeing memory when the window is minimized, or what
(if you're talking about the debugger, that is)
-
Re: Giant Memory eater?
The frame of that size alone is roughly 13 MB (even with nothing on it). If you have multiple layers, it's that again for each. The backdrops "merge" with the frame/layer, so no need to worry about those.
On top of that, ~3/1000KB for each pixel of your active objects. 4/1000KB if you use an alpha channel.
I don't get anywhere near 115MB, so MMF must be doing something out of the ordinary again..
-
Re: Giant Memory eater?
Yes I have like 4 layers and every object uses an Alpha channel.
I will try my best to cut the Sky into pieces.
-
Re: Giant Memory eater?
I guess that the images are stored without any compression, calculate the RAM usage for each picture yourself then: width x height x 4 (RGBA).
-
Re: Giant Memory eater?
Well then it's definitely the layers. Why do you need 4 layers (they make your game pretty slow too, btw)?
-
Re: Giant Memory eater?
>> Well then it's definitely the layers.
No, layers don't take any specific memory (except in HWA if they have effects, but that should not be very big).
Note: if you use the HWA version you should not use images larger than 1024 or 2048 pixels. The current version crashes in this case on some old video cards (the next version won't crash but the images might be reduced to 2048, 1024 pixels or even less - it depends on the video card).
-
Re: Giant Memory eater?
Is that why layers slow the game down so much? Because background objects aren't reduced to a bitmap?