3 MB game's images use 22 MB in viewer
Hunnenkoenig
Member Posts: 1,173
Please let me know, how it is possible?
My images are 1,7 MB on the hard drive. If I start my game and not even all images are shown, they become 22 MB in the viewer.
With the engine together I have 64 MB memory usage.
My images are 1,7 MB on the hard drive. If I start my game and not even all images are shown, they become 22 MB in the viewer.
With the engine together I have 64 MB memory usage.
Comments
Oh, I think, I know why.
Because my images are not sized like 32x32 and such and they will blown up to the next highest size (something like that is in the FAQ)
The problem is, in my case it has no sense to size the images this way....
hm...
I will see, what I can do.
Regardless of how well you compress your images, the display still has to draw every pixel.
I'm not exactly sure how the iPhone calculates it, as it uses openGL and other technologies, but for a computer screen, it is calculated like this:
Image Width * Image Height * Bit-Depth(in bytes)
So let's say you have an image that is 480x320, at 24-bit (the iPhone displays everything at 24-bit, which is 3 bytes per pixel), that would require about 450Kb of RAM to display it:
480x320 = 153,600 pixels times 3 bytes for each pixel equals 460,800 bytes
Now, if you have several images stacked on top of each other, I'm not sure how it gets calculated, but perhaps it tallies them all up separately?
Of course I could be totally wrong!