What ways can iOS (IPA) game size be optimized?

bigleaphr

  • Posts: 188
So finally got my iPad game built - yipee... However some issues

150MB IPA (For comparision my APK is around 45MB)

Open to thoughts and suggestions.

« Last Edit: January 23, 2013, 05:24:47 pm by Jon »


Almakos

  • Posts: 632
there is a limit or what?
Fishing Fantasy Trailer


bigleaphr

  • Posts: 188
No limit. But the file size may be a deal killer to sell my app on the iTunes market.

30MB in Flash - 40MB in Android - 150MB in iOS is a lil much.

twotimingpete

  • *
  • Posts: 1667
compress your graphics:

http://pngmini.com/

http://imageoptim.com/

I couldn't use the apple ones but the web one is amazing. This is pretty much a game changer for me. I never before realized it was possible to reach this level of reduction while maintaining useable edges around transparency. this is a big deal for me. thanks.

I'm also playing with the color quantizer program and it seems to be really good as well.

« Last Edit: December 13, 2012, 09:51:09 am by twotimingpete »

djip123

  • Posts: 982
All your images are converted to .png, and have all images for iOS apps have 3 images (1x, 2x and 4x), thats why the game can be in a way huge for iOS ;)
Go check out my website: http://gamecow.net

bigleaphr

  • Posts: 188
I am going to try and compress the PNG in the resources folder and see if that helps. Would prefer to get his below 50MB.

FYI i have 800 Actor Types (Images) Out of which 14 are scenes in 1920x1280 (6MB each)

JPEG scenes would have been a life saver.

1MrPaul1

  • *
  • Posts: 1285
This is because of 4x scale grafix I think.....
I don't know why we need 4x, it makes animations and game in all more poor visually, I already cut off all animations, decrease frames, decrease number of actors make my game worse to handle 4x graphics(that I don't need) but any way, even now(on start of production) my game not running on android, probably I hit the graphics size limit in one atlas(around 28 mb), graphics are small but when it in several scales, game growing so fast in size, and most not pleasing thing is I don't import and don't make graphics in 4x (this is just impossible for me physically, too much work even without it) and in fact I don't get any advantages from 4x and 2x.
So, Jon, Please, let us to choose, use scaled graphics or not

Innes

  • *
  • Posts: 1960
I just did a quick experiment with ImageOptim...

My resources folder had 6.1Mb of graphics in it, and after I dumped them all into ImageOptim, they were reduced to 3.5, which is pretty impressive.

Before using ImageOptim, the SWF created by Stencyl was 3Mb and, afterwards, it was 2.4Mb. I haven't set up an ad-hoc iOS certificate, so I can't output an IPA for comparison. Is there one stored temporarily when testing to a device?

I tested the game in Flash and on an iPhone 4S, and I could not perceive any difference in the quality of the graphics.

Of course, I backed up the game before messing the graphics compression!
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

captaincomic

  • *
  • Posts: 6108
@MrPaul
You can choose Scale Mode: Scale Dynamically, I think that should do what you want.

@Innes
That's interesting, I tried the same once and found that when I save the Stencyl game, the PNGs always get back to their original file size. But that was at the time of 2.2, maybe something has changed and now optimizing the PNGs works. :)

Biruang

  • Posts: 147
@MrPaul
You can choose Scale Mode: Scale Dynamically, I think that should do what you want.

@Innes
That's interesting, I tried the same once and found that when I save the Stencyl game, the PNGs always get back to their original file size. But that was at the time of 2.2, maybe something has changed and now optimizing the PNGs works. :)
It would be great, because the size of a game is a big downside. For example, my game can be < than 5mb, but it is 8.5 now (and only 45% are done). Optimized all of my images, but still 130-200kb ones are converted into 1.5. I'm using png.

h1rnz1lla

  • *
  • Posts: 649
this pngquant algorithm is the best i know, worth a try:
http://pngquant.org/

mlnaficy

  • Posts: 444
I saw this post and gave it a try, but went with tinypng.org where you drop your files onto their site, they reduce, and then you download each one again.  I thought it would be best to shrink my originals, then load them back into the game.  Even though all my 4x images were reduced 35-55%, it that made no difference at all for some reason in Stencyl. http://community.stencyl.com/index.php/topic,17573.new.html#new

Then I downloaded ImageOptim, which was far more convenient to just drop the whole resource file into the program.  It took hours to run through all the photos, but it made little difference.  I ran both the original images as well as the ones I already reduced, and both files saw only a 4-35% reduction (larger reductions in all the 4x, some of the 2x - the 1x and most of 2x saw very little change).  My 26MB file size was only reduced to 20-22MB for each game.  I'm not sure why I didn't get the same results as Innes.

Finally I decided to move all my resource images from another test backup containing the original images, move the images to a folder in My Docs, run them through tinypng, download, then drag back into the resource file.  This route is giving each of my images (1x, 2x, and 4x) a 35-60% reduction, averaging ~50%.  I'm not done with this yet as I have more than 1700 files in my resource folder, so I can't report the overall change, but I can see by the individual image sizes that the reductions are there.  This should be the overall change for ALL file types (iOS, android, and flash) because the 1x, 2x, and 4x images are fitting in the above reduction range pretty equally.  When testing the game, I cannot see any difference in the quality of the images I have already reduced.

bigleaphr

  • Posts: 188
I see there is a perfect fit (1x) option, can we also have an option to only use the 4x set? or would that cause problems for the iPhone to process the 1920x1280 graphics?

Thx.

« Last Edit: January 27, 2013, 09:35:43 pm by bigleaphr »