Hi all of you.
I have a simple question: If I have a lot of surfaces I'm blitting into will this affect the size of my game?
Thank you.
Printable View
Hi all of you.
I have a simple question: If I have a lot of surfaces I'm blitting into will this affect the size of my game?
Thank you.
yes, but in considerably more on memory usage, and also more important than the size of the executable.
Surfaces have a small fixed overhead, I don't know how much but I shouldn't think more that a kilobyte, and then there is the actual image data. If you have a 32-bit surface at 800x600, it will be 32*800*600 bits of image data, or 4*800*600 bytes, which is 1875 Kb, or a little over 1.8 Mb. That has to be stored somewhere, either in system memory or video memory, depending where you specify it should and where there is room for it at runtime. If you have lots of large surfaces at high colour depths, you will use up a lot of memory with textures, so if you have lots of textures to load in your game (like more than 10 megabytes maybe, you decide what's acceptable though) you may want to load the surfaces as they're needed and unload ones you don't need while the game is running.
Ok thank you.