Installer Compression
My last game I distributed as a simple zip file. My new game is much larger and I was hoping to get better compression than LZW. Is there a way to configure zip to use something better than LZW or can the mac Installer program use a better compression than LZW (something like LZMA)?
Installer? Really? It's extremely rare for a game to have a legitimate need to be distributed in anything more than a drag-and-drop DMG, which is far better for users, so I'd first suggest reconsidering that.
That aside, is there some reason you can't build an uncompressed DMG and distribute an archive of it in some format other than zip (say, bz2) that gives you the compression ratio you want?
That aside, is there some reason you can't build an uncompressed DMG and distribute an archive of it in some format other than zip (say, bz2) that gives you the compression ratio you want?
Can you create a DMG file with bz2 or LZMA compression without having to wrap it again? When you download a bz2 wrapped DMG file does OS X automatically unzip it and present the DMG file to the user?
I'll echo Alex's response. It's very uncommon for Mac users to see installers, except for system components and really large applications that throw stuff all over your drive (photoshop installs adobe crap all over).
A zip or a dmg are both fine. How big is your new game? And how much of a difference is there between the different compression formats? You might be better off by actually trying to reduce the size of your game (compressing the music, running optipng on your textures, sizing them appropriately, slightly reducing color depths, etc)
A zip or a dmg are both fine. How big is your new game? And how much of a difference is there between the different compression formats? You might be better off by actually trying to reduce the size of your game (compressing the music, running optipng on your textures, sizing them appropriately, slightly reducing color depths, etc)
Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
I don't want an installer or care about one, sorry I must be using the wrong wording. Using a zip file or DMG file is fine, I'm just trying to see if there are options to make it smaller when creating the zip or dmg file, by using a different compressor.
My game data is already highly compressed, using jpg and ogg where possible.
To give you an idea of why you should be looking at this is, zip compresses my data to 105MB, while LZMA achieves 74MB, quite a huge difference and well worth it for the user if they are on a slower connection!
My game data is already highly compressed, using jpg and ogg where possible.
To give you an idea of why you should be looking at this is, zip compresses my data to 105MB, while LZMA achieves 74MB, quite a huge difference and well worth it for the user if they are on a slower connection!
Okay, that sounds good Rasterman. That's a pretty significant size difference. Out of curiosity, I'd try putting your game in a compressed dmg. That uses bzip2 compression, as I understand it. I guess it probably won't be quite as good as LZMA... but the weakness of the zip compression is that it doesn't benefit from similarities between multiple files in your archive, since each file is compressed individually.
Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
I discovered I can make a zip file with bzip2 compression with 7zip, I'm not sure if Mac opens and installs it like a normal zip file though, looks like its close to lzma, so that is a good option if the download to install is just like a normal zip.
Why all the pain with the weird archive formats? While noble to try to get the download sizes down, it's not worth its a lot more work for you or relies upon the user having the fanciest compression programs installed on their computers.
.zip files get mediocre compression partly because each file is compressed separately. Neat if you only want to get one file out of the archive, useless in the internet age. If you put it on a DMG and then compress that, you won't have the same issue and you can compress it with something like bzip2 which you can guarantee that any Mac user will be able to decompress.
.zip files get mediocre compression partly because each file is compressed separately. Neat if you only want to get one file out of the archive, useless in the internet age. If you put it on a DMG and then compress that, you won't have the same issue and you can compress it with something like bzip2 which you can guarantee that any Mac user will be able to decompress.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Compressed dmgs are bzip2 and Mac users are used to the format. It works on all their machines and they won't even know it's compressed.
Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
Not all compressed DMGs are bzip2; most are gzip, it's not necessarily straightforward to create a bzip2'd DMG, and versions of Mac OS X prior to 10.4 (?) can't extract bzip2'd DMGs.
Alternatively you could package all your game assets into a custom format that is decompressed on demand when your game loads, i.e. like doom ".wad" files. That way you have complete control over the compression of your assets regardless of the actual distribution packaging (dmg/zip) used for your application.
OneSadCookie Wrote:Not all compressed DMGs are bzip2; most are gzip, it's not necessarily straightforward to create a bzip2'd DMG, and versions of Mac OS X prior to 10.4 (?) can't extract bzip2'd DMGs.
Thanks for that bit of info, sounds like I'll be sticking with the normal zip file. I tested gzip compression, its only 1MB or so better than normal zip so no point in using it.
Also OSX 10.5.8 cannot decompress a .zip file compressed with 7zip using bzip2 compression, so that's out.
aBabyRabbit Wrote:Alternatively you could package all your game assets into a custom format that is decompressed on demand when your game loads, i.e. like doom ".wad" files. That way you have complete control over the compression of your assets regardless of the actual distribution packaging (dmg/zip) used for your application.
Yeah I thought of that, but customizing game code for this is not worth it for me, another thing I thought about doing is using installer script to do a custom decompression of the data, but since you guys are shooting me down me on every front I try to pursue with this it doesn't sound like its worth it. I can't believe OS X doesn't have better built in compressors for zip
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Automatic creation of app bundle in dmg installer | peterp | 7 | 4,323 |
Feb 24, 2010 01:22 PM Last Post: cmiller |
|
| Installer for Mac | Thenend | 8 | 4,589 |
Nov 2, 2005 05:54 PM Last Post: Duane |
|
| Best Compression Choice | Jake | 20 | 7,223 |
Jun 24, 2005 07:06 PM Last Post: Jake |
|

