Finally got the game under 20mb! (+ a handy png tool)

Discussion in 'Public Game Developers Forum' started by Shaz, Aug 24, 2011.

  1. Shaz

    Shaz Well-Known Member

    #1 Shaz, Aug 24, 2011
    Last edited: Aug 24, 2011
    So I'd temporarily given up on getting our debut game, Honey Tribe, under 20mb. But after Blitter and Mr.Ugly put the thought back in my mind I gave it another go. So thanks for that :)

    Not sure if it will make a difference to downloads but I'll find out soon enough.

    We just released the latest version: v1.1.1

    On a related note, the guy who made imageOptim has another tool which can add full alpha channel to png8 images: http://pornel.net/imagealpha
     
  2. Photics

    Photics Well-Known Member

    Jun 1, 2010
    378
    0
    0
    You use GameSalad right?

    That software compresses the images for you when you test/publish. I stopped using imageOptim for GameSalad games because it seemed redundant.

    What do you mean by under 20 MB? If you mean the bottom-right indicator in the GameSalad Creator, that's not the final number. The published file you get back from GameSalad has to be zipped... and then it may change size again (either larger or smaller) after Apple puts it on the App Store.

    To help reduce the size of my projects, I've been reducing the number of colors in my images — using indexed PNG files. By limiting the PNG to 256 colors (or even less) the file size is dramatically reduced. That won't reduce the RAM usage for a GameSalad app, but I find that it improves loading times and it reduces the file size of the game.

    Also, even if it says 15 MB in the GameSalad Creator, having Resolution Independence enabled can dramatically increase the size of the game.
     
  3. Shaz

    Shaz Well-Known Member

    #3 Shaz, Aug 24, 2011
    Last edited: Aug 24, 2011
    If you click on the link in my signature you'll see the latest version of Honey Tribe on the app store in now under 20mb. That's what I mean.
     
  4. blitter

    blitter Well-Known Member

    Nice one Shaz, let us know the download percent difference if anything becomes apparent over time. I think it might be hard to spot, charts seem to mostly fluctuate from what I've seen.
     
  5. Luke Kellett

    Luke Kellett Well-Known Member

    Jun 7, 2011
    286
    0
    0
    Indie iPhone Game Developer
    Melbourne, Australia
    Just as a matter of interested, how big was the game when you submitted it to Apple?

    I published a game that grew from 14mb to 23mb after Apple had their way with it :-(
     
  6. Shaz

    Shaz Well-Known Member

    Cheers, yeah it's hard to know what has an effect and what doesn't as ,like every other dev, I'll be trying various things to increase the downloads.

    Well the zipped file I uploaded to Apple was 19.2MB and the file on the app store is 19.3MB

    I've read others saying as much as 400kb can be added, but an extra 9MB sounds a bit strange... Maybe they added in a secret mini game for you :p
     
  7. Photics

    Photics Well-Known Member

    Jun 1, 2010
    378
    0
    0
    I think that you might have done something else to reduce the size of your game. GameSalad compresses PNG images for you. While ImageOptim is a handy application, it's not really useful for a GameSalad workflow. To be sure, I tested it...

    compression-comparison.png

    I took BOT #1 and tested things out. This comic application is primarily large images. The 16 large images in this app are 762x1024. I republished it to get the original size. Then, I created a second build of the game, where I ran it through ImageOptim first. It was a nice reduction in size... about 12%. Yet, that was not reflected by the compressed build. The size difference is clearly not 12% smaller. It's almost the same size.

    The space savings was miniscule... about 43K.
     
  8. Shaz

    Shaz Well-Known Member

    Indeed, there were many factors involved in reducing the size of the game.

    First I traveled to each corner of the world to do battle with the 4 arch mages of app size wisdom. It has long been known that their secrets will only be revealed to mighty champions who dare to brave... the MAZES OF SCARY DEATH! Hideous beasts they can summon, nefarious traps they can lay.

    But I felt no fear.

    Climbing atop Lookout Hill I bellowed to the first mage "I seek your app-size-reduction knowledge wizard! I demand you tell me. I DEMAND IT!"

    And with my trusty super-magic-pocket-computer in hand I rushed forward to meet my fate.[​IMG]

    And lo.

    After the mage's castle had crumbled and his beasts were slain I claimed my prize... The oracle of bits, enslaved by the mage and now freed revealed to me her secrets!
    [​IMG]

    And as is tradition, I can only tell of these secrets... when bested in battle!
     
  9. mr.Ugly

    mr.Ugly Well-Known Member

    Dec 1, 2009
    1,673
    0
    36
    Berlin, Germany
    @photics

    you answered your question yourself.. you use mainly big images.. which if they are a comic are usualy not transparent.. and in this case shaz stated that the tools gives you an alpha channel on an png8.. since the game (if you check it out) uses alot of sprites with alpha i can fully understand that he shaved alot off the app that way..


    @shaz: let us know how the sales are coming.. cheers
     
  10. blitter

    blitter Well-Known Member

    Cool is that like a detachable screen! :-D
     
  11. Shaz

    Shaz Well-Known Member

    You seek a bonus game with The Oracle? Only the gamiest of gamers will meet her approval.

    (Perhaps I should point out that I have no idea who that woman is but just found the photo on google. I'm just assuming she's into people who like games) :)
     
  12. blitter

    blitter Well-Known Member

    Haha I thought it was a self-intro! I bet most of us did...oh well back to compression method reading, zzz.
     
  13. milkmangames

    milkmangames Well-Known Member

    Apart from the few hundred k of images, the main difference is the encryption applied to the actual binary (executable.) This means any zip compression of that part of your app may be lost. Some engines or systems (like unity) leave a particularly large binary so you are more susceptible to a big increase in size.

    the article explains how to make a safe estimate of the size change to expect:

    http://www.indiepinion.com/steffenj/how-to-calculate-the-size-of-an-iphone-app-after-approval/
     
  14. Shaz

    Shaz Well-Known Member

    Don't worry Blitter, I'm sure she's out there... waiting for you....

    If you track her down you'll need to impress her though. I suggest you impress her with a display of style and finess:

    [​IMG]

    And then a heart warming gift too

    [​IMG]

    If that doesn't sweep her off her feet nothing will.
     
  15. Photics

    Photics Well-Known Member

    Jun 1, 2010
    378
    0
    0
    Even if that's true... and I'm testing it again with a different project... GameSalad creates the low resolution (non-retina) graphics. ImageOptim can't even touch those. I've tried running ImageOptim on images received from the GameSalad server... it was a big 0% reduction.

    But to be sure, I'm testing it again.
     
  16. Photics

    Photics Well-Known Member

    Jun 1, 2010
    378
    0
    0
    I tested it again with BOT. This is a huge GameSalad project, with lots of different images. Again, the difference was minimal...

    bot-compression-comparison.png

    On a 156 MB project, about 100 KB is not a lot.

    True, a lot of the images were already compressed with ImageOptim, but plenty were not. That's where this all originates. While building BOT, reducing the size of the game was critical. It got so bad that I couldn't even upload the game successfully to the GameSalad server.

    It would be nice to think of ImageOptim as a silver bullet for GameSalad development — improving loading times, reducing game size and not changing quality — but the testing results shows otherwise.
     
  17. Shaz

    Shaz Well-Known Member

    #17 Shaz, Aug 26, 2011
    Last edited: Aug 26, 2011
    For no apparent reason Fonejacker comes to mind.

     
  18. baris

    baris Well-Known Member

    Jul 30, 2010
    252
    0
    16
    I guess the main reason ImageOptim doesn't reduce the eventual size of the app much, is that XCode also "optimizes" png images.. When I turned off the 'optimize png images' (or something like that) option, most of the savings from ImageOptim were indeed reflected in the final app size. I think this probably has an adverse effect on performance (stopping XCode from premultiplying alpha, etc.), but I didn't have performance issues in my case. I don't know anything about the specifics of GameSalad though.
     

Share This Page