Are there any Unity games available on the app-store that have managed to get bellow the 20mb 3g download limit? I’d be interested to see what they consist of.
Yes, quite a few. Here’s one. There are even a few below 10MB.
–Eric
My game Oh Shoot! is 15.4MB. I doesn’t have any 3D models. It comes with a 512x512 and a 1024x1024 32bit rgba texture atlas, a collection of wav audio files and two mp3 songs. It’s an arm6 only build and uses micro mscorlib.
International Food Wars came in below 20 mb.
IFW
I have iOS basic license, so for me the best option to keep the size down was targetting the arm6 architecture.
I expect my new version of cubenaut to be under 20 mb as well, even though I’ve added alot of assets. It was previously a Universal build which was no benefit at all. Still waiting on Apple to approve it.
The first build of barnyard bounce on appstore was 2 meg. I achieved this in a number of ways, despite there being tonnes of apparent graphics:
-
all my png files were “web compressed with variable alpha” that is they had 256 colours each, and had plenty of different colours with alpha as well instead of just one alpha colour.
-
all my images were separate and sized as small as possible: they were only packed into an atlas when the game was running (at load time).
-
file sizes were dramatically smaller with samples by trying out a number of (aiff style) different compressions til we got what we felt was the smallest sizes.
Then I added openfeint and it doubled my size. Openfeint was bigger than my entire game. I think it might contribute to the fact I still get 150 or so downloads a day even well over a year later with no publicity. It’s a good path for a freemium game or simpler game to take.
In unity I’ve given up trying to fit into decent file sizes.
A question though - is it possible to have an ipad / iphone4 native res game using only arm6? if so why do people bother with arm7?
ShootStorm is iPad / iPhone 4 native res on armv6 only. Potential reasons for going armv7 only are faster running on those machines, and not supporting armv6 devices means you don’t have to make the app run nicely on the lower end hardware.
ShootStorm is under 20MB (current version is 18.2 MB, previous versions were as small as 17.4, but a longer music track and some extra GUI graphics and code were added), runs on all iOS devices, and I don’t have Unity Pro, so no build stripping.
To keep low I carefully consider everything that goes into each asset. The size of all graphics are reduced until there is a noticeable difference (atlases where suitable), then back up one step. All sounds are clipped as short as possible. All wav files are made mono.
The good thing is, most of these things also make the game run faster. I am able to get 60 FPS on all but the oldest devices (and even then for most of the time).
We made Ball-Hop Bowling with Unity and it’s just under 20 mb.
It’s a universal app and we think it looks pretty good on both the iphone and the ipad…
iQuarterback 2 Pocket Edition and iQuarterback 2 both fit under 20 mb.
I was under the impression that you could not use paletted textures on iphone (or any modern graphics card for that matter).
How do you go about getting a 256 colour image into the game?
ie,
what compression do you use in unity?
are you just using indexed colour in photoshop?
We just released a game that came in at 35 megs on iphone but the android version is only 10 megs!
There doesnt seem to be a way to really check how big your game is going to be before releasing it to the iphone store. I just assumed it would be similar in size to the android version.
the game is “Burn The City”
http://itunes.apple.com/us/app/burn-the-city/id444525916?mt=8&ls=1
I used the SOIL image library and my game was in C++. In game, it is converted to 16 bit at load time, which the gpu is happy with. Having it paletted in a file meant it was absolutely tiny: some full-screen graphics were as low as 12k.
As for unity, I simply don’t know how to plug that data into where unity would want the file from SOIL. I’m sorry I wasn’t clearer: my old game was made in xcode and C++ and I handled all the rendering/loading etc myself. Also a massive gain from 8 bit textures was that loading was instanteneous between screens (for example when one navigated from start screen to menu, it loaded every single time simply because it was instant with such small files).
It would be useful, I agree, to be able to figure out how to do this in unity. But it means you’ll need to handle loading from within the app and somehow get that data to unity’s texture stuff. Is it worth it? yes, but I don’t know unity well enough to do it.
no, I save full colour alpha from photoshop then use PNGQuant set of applications to decimate it into paletted with variable alpha. This isn’t possible without custom loading routines in unity. Thats a big job, and if you’re interested in taking it on I would be interested in your findings (as everyone would be I suspect).
Regarding file sizes: looks like you got hit by arm6+7 unified binary and appstores +4 meg DRM.
Because you used a universal binary on iOS. You could reduce the size substantially by using only ARM6 or only ARM7.
Remove the executable, zip the rest, then add the size of the zip to the size of the uncompressed executable.
Use Texture2D.LoadImage to load PNG files stored as a TextAsset. (Which is a bit of a misnomer since it’s obviously not text in this case.)
–Eric
Texture2D.LoadImage sounds interesting. Does that method have good performance on mobile devices (that anyone is aware of)?
Also, the scripting reference says that textures loaded via that method will be in-game as ARGB32 images - so any advantage to using this method is strictly filesize and not memory, right?
Only filesize and not memory, yes. I haven’t tested it on iOS, but I’d be really surprised if there was any kind of performance problem.
–Eric
Condog, how did you go about getting your ball hop game under 20 megs? I just downloaded it and it’s quite good! It looks like you have a fair bit of content in there and I would e expect it to come in at 50 megs or so. Are you just compressing all your images with pvrtc or are there any other notable tricks your doing?
Thanks Braddish. Glad you liked Ball-Hop Bowling. For the most part we only used one set of textures. On runtime, we halved the texture sizes for 3G resolutions and slightly stretched the texture sizes for the ipad. Also, we disabled mip maps which saved a little bit per texture (this is enabled by default when you first import a texture into unity). luckily this was acceptable to our artist since his quality bar is quite high.
In the front end menus, we tried to use RGB 24 bit wherever we could. RGBA 16 bit didn’t work too well because most of the textures had gradients and banding started to appear at this format. if the texture needed an alpha channel, we were stuck with using RGBA 32.
In the backend (the skee-ball table, the skee-balls, the wall, the floor, etc…), the textures are PVRTC 4 bits.
For audio, we have no sound track and all sfx are mono channeled.
also, just for comparison sake, the android version was just over 12 MB, using the identical assets as the ios version.
So as you can see, we spent a lot of time scrutinizing each and every asset to make sure we were optimized.
hope this helps!
We managed to get Diversion 1.1 ( Diversion on the App Store ) in the app store at 18.6 MB. I honestly didn’t think we had a chance to get it under 20 as it has 100 levels and 150+ characters, but the big difference in the end for us was sound. In the first release we had 5 different background soundtracks, for the update we limited it to one, and gave players the option to listen to their iPod music instead. We also crushed the sound effects using 16-bit mono and 22kHz (and even 11 on some).
We used similar methods to conedog for the textures. One thing that will really help you is the Unity Editor.log report in Console that breaks down the size of all your assets. e.g.
Looking at this report you can easily see which assets are causing you problems (what!! my font is using 500 kb!!).
Another trick is to delete the ‘Default@2x.png’ - it’s only a splash screen for retina display - and in most cases doesn’t look that different to the low res ‘Default.png’. Depending on your splash screen it can save you 0.5 mb.
Also look at the compression settings on your 3D models and animations.
It would be nice if there was an option to not include the default Unity resources. If you don’t actually use any (100% custom shaders, etc.), then it just sits there taking up >2MB of space for no reason (<300KB compressed, but still). You can delete the default resources file manually, and the game runs fine (if you really are not using any), but prints an error message, so I’d be wary about doing that for a release build.
–Eric
Hey guys I’m in serious trouble with my app size
Here’s the editor log for the assets:
Textures 11.8 mb 52.3%
Meshes 0.0 kb 0.0%
Animations 40.2 kb 0.2%
Sounds 4.7 mb 20.6%
Shaders 0.6 kb 0.0%
Other Assets 236.7 kb 1.0%
Levels 1.3 mb 5.9%
Scripts 600.6 kb 2.6%
Included DLLs 3.8 mb 16.8%
File headers 124.8 kb 0.5%
Complete size 22.6 mb 100.0%
This looks fine to me as we do need a lot of texture and sounds.
But after build the app in xcode and added OpenFeint support, the binary file goes up to 50mb! And it doesn’t matter if I build for armv6/7 or both. For the reference, the binary size before integrating OpenFeint is 35mb which is much less but still suspiciously high.
What’s wrong to make such a huge binary file possible?
The ipa file of the app is 24mb but the size display on iTunes is 49mb!
Please can anyone point me a direction to investigate? Thanks!
Nothing is wrong, you fire in 22mb of addon libraries, sound and textures which are added on top of the 15-20mb of unity + mono if you aren’t on iOS Pro with stripping (the upper end of the pure app binary depends on the .net namespaces you used)
If you use ARMV6 + ARMV7 this binary size will double as its present then twice
Unsure how OpenFeint is nowadays, in old days it hit with about 5mb.
Thanks for the fast reply dreamora
I rebuilt my project with armv7 only. This time not only I set it up in unity player setting, but also “armv7 only” in xcode build setting and the binary file reduced to 25mb, which is exactly the half of build for armv6+armv7.
So a 25mb binary without pro license is normal? And you mentioned a 15-20mb range of binary size, but what determines on which end it will be? How about the impact of middleware like SM2?
Thank you!