Image Compression.

olster1olster1 Member Posts: 396
edited November -1 in Working with GS (Mac)
I have 80 scenes each with it's own unique 960x640 image for a background (actor size 480x320)

I'm using gimp to create these levels and with maximum png compression. They are averaging at about 320kb each. 25.6MB is a lot just on the level images. I have tried converting to jpg and letting GS convert them to png but that seems to get the same results :/ Are there any tips you can give me? Is there any good image compression software?

Or do I have to accept the large file size if I wan't that may levels?

Comments

  • GamersRejoiceGamersRejoice Member Posts: 817
    tshirtbooth said:
    Hey there, I had this same issue when i did my photo hunt game.

    What you need to do is take all your png images and convert them to jpg's make SURE there named the same still.
    Then right click on your project and view package content.
    go into the image folder and replace all the images with the jpg images.

    Then you need to go into the XML file and edit each image to say .jpg rather then PNG

    hope that helps.

    cheers

    That's a neat trick! Will the files stay jpgs or does GameSalad automatically convert them when you open up the game project again?
  • olster1olster1 Member Posts: 396
    Thanks Tshirt, I'll give it a pop.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    theyll stay jpg since the xml is edited to except them
  • GamersRejoiceGamersRejoice Member Posts: 817
    Which XML file are we talking about here? The xml for each actor that is using the now JPG image? Or is there a master xml file or something?
  • GamersRejoiceGamersRejoice Member Posts: 817
    This should definitely help my game out! Thanks!
  • gamedivisiongamedivision Member Posts: 807
    I didn't know jpeg would be smaller than png
  • olster1olster1 Member Posts: 396
    Works like a charm... Thank you so much :D
  • GamersRejoiceGamersRejoice Member Posts: 817
    Ok just to make sure I'm doing this right, do I need to now go into my game project and on the "self.image" do i need to change those to .jpg too? Or leave them as is?
  • olster1olster1 Member Posts: 396
    Import all your images as png's into gamesalad. View contents of the file. Drag the jpg versions into the images folder. Manually delete the png versions. Open the assets.xml and replace the .png for .jpg for every image. No need to do anything within gamesalad itself apart from importing the png files.
  • gamedivisiongamedivision Member Posts: 807
    finally got round to doing this what a great saving 754kb png into a 115kb jpg with no visual change only one thing the image doesnt show in the image folder in the viewer you can open package content and check it but i dont care about that
  • outasiteoutasite Member Posts: 417
    Also, Image Optim is super neat too. Just throw your images from your package contents into it and let it do its magic. It just gets rid of the extra stuff in the file you don't need. Helps to decrease app file size.

    Did for my TOTB3 game. Final was 4.7 mb, and after Image Optim it went down to 3.9.
    Yes its free.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Sounds really useful!

    Am really struggling to get the full version of Honey Tribe under 20mb. (I gave up for a while but decided it was stupid to leave it over 20mb)

    This sounds like it will do the trick!

    Thanks for posting TSB :)

    EDIT: Will it still work out ok with resolution independence checked?

    ----------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • old_kipperold_kipper Member Posts: 1,420
    There are things you can do, but it depends on what you are doing with the graphics within the game. Sprites/actors that have alpha channels can be reduced to 8bit png files and still have an alpha channel. Those that don't need the alpha channel can be reduced to 8bit with no alpha. larger images that don't need alpha are worth replacing with jpg file and the xml doc altered as TSB suggested. You can also squash images (I do it vertically) and then resize them back up in the actor attributes. And ogg files can be compressed at tighter compression rates.

    The downside of these are-

    8bit with alpha give a less smooth edges against the alpha.

    jpg quality is governed by how are the compression is pushed but is is surprising what you can get away with.

    ogg files drop in quality as the compression is pushed harder, but in a lot of cases it is acceptable (VLC can batch process audio files to different compression rates).

    hope that helps

    kipper

    (I have a half hour story with 84 images and about 26 minutes of audio that I have managed to get to 15meg so I can leave space for the engine. It has taken a bit of graft but it is possible).
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    old_kipper said:
    There are things you can do, but it depends on what you are doing with the graphics within the game. Sprites/actors that have alpha channels can be reduced to 8bit png files and still have an alpha channel. Those that don't need the alpha channel can be reduced to 8bit with no alpha. larger images that don't need alpha are worth replacing with jpg file and the xml doc altered as TSB suggested. You can also squash images (I do it vertically) and then resize them back up in the actor attributes. And ogg files can be compressed at tighter compression rates.

    The downside of these are-

    8bit with alpha give a less smooth edges against the alpha.

    jpg quality is governed by how are the compression is pushed but is is surprising what you can get away with.

    ogg files drop in quality as the compression is pushed harder, but in a lot of cases it is acceptable (VLC can batch process audio files to different compression rates).

    hope that helps

    kipper

    (I have a half hour story with 84 images and about 26 minutes of audio that I have managed to get to 15meg so I can leave space for the engine. It has taken a bit of graft but it is possible).

    Yeah i was using png8 at 128 colours for full screen images. And they come out at roughly 350kb. With jpg I can halve that and the image quality is actually better.

    The .ogg files are already compressed a lot, although I've kept stereo files. Can't bring myself to have mono music in my game. This is 2011, not 1950...!

    Might squeeze the two mp3 tracks I have a bit more though.

    Would also be nice if GS didn't automatically add 300kb of unused GS splash screens when you publsh!

    Are you sure you've left enough room for the engine? In Honey Tribe it takes up 40mb, although that's 'cos everything is in one scene to avoid loading times between levels.

    ----------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • mattyr64mattyr64 Member Posts: 82
    Not noticed this thread until now, this is very interesting. Will definitely help to optimise my Green Knight game, I'm using quite large images as the backdrops, so thanks very muchly for the info guys!
  • old_kipperold_kipper Member Posts: 1,420
    My reckoning was that the base engine is 4.8meg compressed, and that there are is 2 movies of about 300k total, but I didn't know that they keep the 300k movie space in pro... tighter squash...

    And I have everything across scenes with some backloading in certain cases.

    I have got so mean with this that I wince when I have to use alpha channeled graphics in the menu system (but now flip things with the new boolean to save image file space). As for stereo... "when I was a lad, we had to live in a wet paper bag and eat gravel..."
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    old_kipper said:

    I have got so mean with this that I wince when I have to use alpha channeled graphics in the menu system (but now flip things with the new boolean to save image file space). As for stereo... "when I was a lad, we had to live in a wet paper bag and eat gravel..."

    Born with a sliver spoon... you come round here with your fancy gravel thinking that you're better than us...! We were lucky if we got mud on a sunday.

    You'll like this:

    http://www.gdcvault.com/play/1014632/Classic-Game-Postmortem-PITFALL
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Ok, so it seems we have to make a choice between app size and RAM usage.

    Using TSB's jpg swap I'm able to get the full version of Honey Tribe to under 20mb. Which I was struggling with before using this tip.

    However, I'm using resolution independence.

    But the jpg images at 960x640 don't get duplicates which would normally be resized to 480x320.

    So that means a non retina device will still be using the retina sized jpg images. So the RAM usage could get excessive depending on how many jpgs you're using.

    So for the moment I'll probably try and strike a balance to use as few jpgs as possible while still remaining under 20mb.

    I think it would be much better if we had the option to have more manual control over the auto-resized images.

    ----------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • old_kipperold_kipper Member Posts: 1,420
    I maybe out of step with some here but I don't think retina is really worth the increase in file size in a lot of cases. When I've been involved in printed work we always would keep the original art away from the print as if people saw it side by side they would always compare it, but if you didn't they were usually happy with the print version. This is how i feel about retina...
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    old_kipper said:
    I maybe out of step with some here but I don't think retina is really worth the increase in file size in a lot of cases. When I've been involved in printed work we always would keep the original art away from the print as if people saw it side by side they would always compare it, but if you didn't they were usually happy with the print version. This is how i feel about retina...

    Yeah I can see your point. But it looks so nice and sharp on an iphone 4 using 960x640 images. It would be hard to give that up now that I know the difference...

    But yeah, probably Joe Blogs would be fine with it. Although the reviewers might be more fussy.
  • old_kipperold_kipper Member Posts: 1,420
    If you really feel that way, how about anything that moves put in at standard res? I doubt most would catch the difference. As to reviewer, I don't know. I can't think of a case when a book reviewer has commented on the print quality over the story or illustrations. Perhaps you might contact one of the people that gave you a good review and discuss it with them after explaining the dilemma. I think they might get it, and also give an honest opinion of their view.

    I also think that quite a lot can be done with image processing to give a better impression of graphics. I don't think that many people properly consider the effect of contrast of objects to define them against backgrounds etc, or the use of colour in the design and even general UI. In my opinion these more important for clarity within the scene, and if got right, resolution will be less of an issue.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    old_kipper said:
    If you really feel that way, how about anything that moves put in at standard res? I doubt most would catch the difference. As to reviewer, I don't know. I can't think of a case when a book reviewer has commented on the print quality over the story or illustrations. Perhaps you might contact one of the people that gave you a good review and discuss it with them after explaining the dilemma. I think they might get it, and also give an honest opinion of their view.

    I also think that quite a lot can be done with image processing to give a better impression of graphics. I don't think that many people properly consider the effect of contrast of objects to define them against backgrounds etc, or the use of colour in the design and even general UI. In my opinion these more important for clarity within the scene, and if got right, resolution will be less of an issue.

    Ok, some interesting points there. Do you work in graphic design for print advertising?

    Have you played Honey Tribe? (The free version is in the link below). If I were to let go of the hi-rez images, what would you suggest to make sure it looked good on a retina device?

    ----------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • old_kipperold_kipper Member Posts: 1,420
    HoneyTribeStudios said:
    Ok, some interesting points there. Do you work in graphic design for print advertising?

    Have you played Honey Tribe? (The free version is in the link below). If I were to let go of the hi-rez images, what would you suggest to make sure it looked good on a retina device?

    First question- yes. Second question- No but I will. Third question... I will have a play with the game and then think and post back here in a day or two. Too much on the plate for immediate feedback...
Sign In or Register to comment.