That graphics power of 2 rule... questions
beaudoin_n
Member Posts: 184
Hi,
I am making my prototype with square objects, but still i'd like to have optimal performance once they convert to graphics.
So what exactly is this rule ?
For now i have 1 45X45 object that will have its image based on condition (ie if attribute self.image = 1 then change image to 1.jpg)
and 72X72 objects
And i plan on having a background image (480X320)
And maybe 2 different sizes of buttons.
Shoud it be 46X46 (divisible by 2) or it really doesn't matter at all..
Thanks
I am making my prototype with square objects, but still i'd like to have optimal performance once they convert to graphics.
So what exactly is this rule ?
For now i have 1 45X45 object that will have its image based on condition (ie if attribute self.image = 1 then change image to 1.jpg)
and 72X72 objects
And i plan on having a background image (480X320)
And maybe 2 different sizes of buttons.
Shoud it be 46X46 (divisible by 2) or it really doesn't matter at all..
Thanks
Comments
Regardless of the power of two rule, if any of the dimensions of your image is odd, it will blur in GameSalad.
GameSalad centers everything, so if you have an odd dimension, it has to split that pixel to place the graphic, causing the blur.
---
For the power of two stuff, unless you are making an extremely processor intensive game, don't let it dictate your design.
The memory on the device is very limited. For your 46x46 images, GameSalad has to reserve a 64x64 chunk of memory. However, that is true if your images are 60x40, or 52x42, etc...
You do not have to make all of your graphic dimensions be exactly powers of two, but if you do, you get the most "bang" for your buck.
What you want to avoid, like sciTunes said, is making one of the dimensions of your graphic juuuust a little bit more than the previous power of two, like 66x50 for example. That would require a 128x64 chunk of memory, and would it really kill the design to make it 64x50?
It is just something to be aware of.