That graphics power of 2 rule... questions

beaudoin_nbeaudoin_n Member Posts: 184
edited November -1 in Working with GS (Mac)
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

Comments

  • beaudoin_nbeaudoin_n Member Posts: 184
    i find that 32X32 would be too small for an object that needs to be touched/dragged... don't you ?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I don't thin it is totally necessary. I just try to avoid images that are 65 or 130 or anything just above one of the power of 2s.
  • beaudoin_nbeaudoin_n Member Posts: 184
    so you'd go 64X64 instead of 72X72 ?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    As a side note, I would make your images 46x46 instead of 45x45.

    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.
Sign In or Register to comment.