Question how GS renders files ie power of 2...
billpaterno
Member Posts: 26
Quick question. I see that all art gets rendered to the power of 2 so it makes sense to try and optimize your artwork before coding. However, I am curious if you bring in an image that is not the power of 2, but you scale it in GS to fit that number, will GS reformat the files or are you bloating your app with unnecessary size?
Comments
So if your image is 128x75, GameSalad will reserve a space in memory that can hold a 128x128 image.
You would get the most "bang" for your buck if you image was 128x128, but this isn't always possible.
What you want to avoid though, is making your images a little bit higher than the previous power of two...
For example, if your image was 129x75, GameSalad would now have to reserve a space that can hold a 512x512 image.
Your images can be any size you want, just be aware of the "container size" that they need.
the powers of two are:
2,4,8,16,32,64,128,256,512,1024,2048, etc...
And it doesn't mean that all of your graphics need to be squares or anything like that.
Your artwork can be any size - you aren't limited to anything.
It's just something to be aware of when you're designing your game.
a graphic that is 129x43 takes up way more memory than a graphic that is 128x43.
If one of the dimensions of your graphic goes above a power of two, gamesalad will be forced to use the next memory size to hold it. So just try to avoid situations like that. In this case, GS will have to use a 512x512 space in memory to hold the 129x43, whereas the smaller one fits into 128x128.
but i guess i'm still wrong. i thought the textures mapped to squares, but if rectangles work, that's even better.