Optimizing Images Question

I am now trying to optimize my game since it crashes when loading the gameplay on my iPad 1st gen.

Do I scale my actual image files down to the 64x64, 128x128, etc type numbers.

OR

Do I scale my actors down those sizes instead?


Does the game just take whatever size the image is and load it as the actors size?


I wasn't sure which route to take, could someone please clear this up for me?

Thanks

Comments

  • All I can say is that if you are using a behavior such as "spawn actor", it will bring in the actor/image as the size stated for its file. So, if you have that same actor placed in a scene already, but have modified it's size to your liking...but then destroy the actor only to later bring it back in, the new file will be a different size all together. Does that help?
  • ericzingelerericzingeler Member Posts: 334
    Have you tried publishing an adhoc build with resolution independence enabled to test? If you have retina art and are testing on the OG iPad, you'll get bad performance in the viewer. The publishing process will resize your images for not retina if resolution independence is selected.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    @EricTippett If you want to reduce RAM useage, yes, you can reduce the sizes of your images. And yes, as you said reducing a 128x128 image to 64x64 would be the way to do it.

    The actors will use whatever size image you give them. So you have to strike a balance between the game looking good but also not crashing your lowest spec device.

    If you really wanted you could have a 1000x1000 actor using an image that is 4x4.

    So the actor size doesn't really make a difference.

    You can also use a free programe called Image Alpha to reduce 24 bit pngs to 8bit pngs but still retain transparency. This won't make any difference to RAM usage but it will reduce the file size of images. So they will load quicker and you end up with a smaller zip file that you upload to apple.

  • zzap64zzap64 Member Posts: 405
    I expect your hitting your Ram threshold, iPad 1st gen is only 256 Ram.
    Temporary remove some of your larger sized (pixel size) images and observe the Ram numbers in the GS viewer on your device. Experiment adding/subtracting those images.
    With me, once I had gone above 130MB Ram the project crashes on that device.
    I experienced a 513x513 image using 4 MB Ram so like the folk say above, keep within the pixel size boundaries.
  • ericzingelerericzingeler Member Posts: 334
    @EricTippett You can also use a free programe called Image Alpha to reduce 24 bit pngs to 8bit pngs but still retain transparency. This won't make any difference to RAM usage but it will reduce the file size of images. So they will load quicker and you end up with a smaller zip file that you upload to apple.

    Going from 24-bit to 8-bit should actually reduce RAM usage as well, correct?
  • RexCarsalotRexCarsalot Member Posts: 96
    edited March 2013
    I don't know anything about Image Alpha, haven't used it, but I love these two free options, www.tinypng.org, which allows for batch reprocessing of png images, reducing them to 8-bit, 20 at a time. It's great, especially if you deal with hundreds of images at a time.

    For batch resizing, try the free program fotosizer. It's easy to use and there's no strings attached. I can't post a link from my Nook but it should be easy enough to google for anyone whi's interested.
  • RexCarsalotRexCarsalot Member Posts: 96
    edited March 2013
    I think Fotosizer is www.fotosizer.com...and may be on C-net.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    @ericzingeler No, the colour information in the image makes no difference to the RAM usage. GS places images in 'holders' which are preset sizes that are powers of 2.

    e.g.
    2x2, 2x4, 8x8, 4x128, 16x32, 512x512, 1024x64

    So a white square at 64x64 will take up the same RAM as a mini Mona Lisa at 64x64

    But like I said, reducing the file size of the images will make them load faster and make your final zip file smaller.

Sign In or Register to comment.