Power of 8 (good band...)

gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
edited November -1 in Working with GS (Mac)
Hi, I thought I'd better check this, to be on the safe side...

I've read that it's best (or critical?) to use the power of 8 for image sizes in GS. So 8, 16, 32, 64, 128, etc; for heights and widths. So I could have an image 64 x 256 for instance. OK, because neither the height and width of the iPhone screen doesn't fall into the 8, 16, 32, etc., malarky, I was thinking that image sizes destined for the iPhone would be OK, providing they're divisible by 8, e.g. 24 x 96. could anyone confirm this please? And for interest, what is the result of using images in an iPhone app that totally outside of either of these; are the images distorted in any way, or not as clear maybe, can any one say?

---------------------------------------------------------------
Spiral Gyro Games

""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Comments

  • design219design219 Member Posts: 2,273
    I've never concerned myself with the "powers" thing, and it's not been a problem for me.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    They can be any size up to 1024 as long as they are even numbers. If you have an odd number of pixels the image will blur slightly. I believe though that if you go over one stage in the power of 8 scale, that the memory resources increase to the next level... so using a 66x66 image would be basically the same as a 128x128 actor, rather than a 64x64 so you might want to keep that in mind for optimization purposes. I may be wrong and I probably didn't word it correctly (or clearly) as I'm not very technical minded. LOL.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    FYI, it's the power of 2 rule, not the power of 8...

    Graphics are stored in memory in chunks that have dimensions of either: 2,4,8,16,32,64,128,256,512, or 1024

    1024 is the largest dimension one of your images can be. If you need something larger, you will need to have two or more actors sitting side by side.

    You don't need to let it dictate your design, just be aware of it.

    A graphic that is 130x128 needs to be placed into a 256x128 holder. You would be wasting that extra memory for basically no benefit. Memory on these devices is pretty precious, and you don't want to needlessly waste it.

    As the devices become faster, it becomes less of an issue.
  • design219design219 Member Posts: 2,273
    POLYGAMe said:
    They can be any size up to 1024 as long as they are even numbers. If you have an odd number of pixels the image will blur slightly.
    Not true, you can use odd sizes if you go into the graphics setting and set it to "fixed" instead of "stretched".
  • AfterBurnettAfterBurnett Member Posts: 3,474
    I meant even pixel counts. Not having equal sides ;) If you have say a 65x34 image it will be slightly blurry... if it's 64x34 it'll be fine.
  • design219design219 Member Posts: 2,273
    I understood what you meant. You can do a 65 x 11 or any odd pixel count side IF you set the graphics attributes correctly. They will not be blurry. Try it.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Thanks, guys.

    :-)

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • AfterBurnettAfterBurnett Member Posts: 3,474
    design219 said:
    I understood what you meant. You can do a 65 x 11 or any odd pixel count side IF you set the graphics attributes correctly. They will not be blurry. Try it.

    Thanks! I was not aware of that! I was just going off of what others said on the forums.and my own blurry gfx. LOL. I'll give it a go!
  • PhoticsPhotics Member Posts: 4,172
    design219 said:
    I've never concerned myself with the "powers" thing, and it's not been a problem for me.

    Page 163 of the Unofficial GameSalad Textbook might change your mind.
  • design219design219 Member Posts: 2,273
    Photics said:
    Page 163 of the Unofficial GameSalad Textbook might change your mind.

    I'm looking forward to reading about it. I've just not had performance issues bad enough to be a concern.
Sign In or Register to comment.