3
\$\begingroup\$

I've been experimenting with Unity3D 4.3's 2D features. I've created a simple prototype game to learn how Unity works, how to create sprite animations, collisions and all the basic things. My project compiled for PC was approximately 23MB.

The game includes one larger bitmap for a background (originally 1MB JPEG). The player spritesheet was black and white with almost no details. So all the assets had (in their original, compressed form) no more than 2-3 MB. I ended up with one large executable file (about 10MB) and a folder with .dll files and assets (5-6MB).

Can that be reduced?

My experience with C# WinForms code makes me believe that executables and DLLs grow that big only when binary data was involved (images, sound, etc). Is that the case with Unity? I am interested in developing 2D applications for Android and iOS, where low total app size is a priority.

\$\endgroup\$
0

2 Answers 2

3
\$\begingroup\$

Thesedays, 23MB for mobile game sounds not that big at all. Unity has many great advantages, but it's shared libraries, mono files and so on takes a lot of place unfortunately.

The other way round, Apple has limited their apps to be downloaded over 3G to 100MB, so the 23MB is not that much anyway, in comparison to this limit. Especially, that now the size won't be increasing very rapidly.

A lot of not very big apps was made with Unity and I suppose that users aren't expecting the apps to be very small. You can take a look at Unity's Showcase and filter it by iOS/Android platform, then check the app size in the store - they're about 40MB for simple 2D game, so it's not that unusual.

Unity development is just mush more faster than native, or even cross platform development like Adobe AIR, and you have all platforms you need. Also the performance is almost as good as native, especially for smaller teams without extra time and money to tweak their own, specialised engines.

EDIT: With other C++/C# executables it is often common, that these installers doesn't include shared Redistributable packages, which add few MB to the overall build size if they were included. Here Unity is including everything. Also being managed, not native language seems to add some overhead.

Also the overhead according to the Unity documentation, could be reduced from 23MB to 12MB:

How small can an app be made with Unity? An empty project would take less than 22 MB in the App Store if all the size optimizations were turned off. If you own an Advanced License (and therefore have access to the stripping option), the empty scene with just the main camera can be reduced to less than 12 MB in the App Store (zipped and DRM attached).

Here's the guide to decreasing this size: build size optimization.

\$\endgroup\$
3
  • \$\begingroup\$ Assuming that you can't reduce the package size, those Showcase examples will always carry that 20MB+ overhead since they are built with Unity. \$\endgroup\$ Commented Apr 29, 2014 at 7:26
  • \$\begingroup\$ Yes, they will have this overhead, by the purpose of me mentioning them was rather to show a variety of titles which doesn't care about this - then you can check by yourself whether these games are widely downloaded and played by users or not. \$\endgroup\$
    – kreys
    Commented Apr 29, 2014 at 7:28
  • \$\begingroup\$ I've updated my answer with more specific details to your updated question. \$\endgroup\$
    – kreys
    Commented Apr 29, 2014 at 7:33
0
\$\begingroup\$

I'd say yes. I have been using unity for this purpose. You will have that 20Mb lump of the unityengine to start off with, but after that your project will increase in size normally.
If your really concerned you could try Corona SDK which is a 2d sdk that builds to iOS and Android, but you may run into limitations with it though (like facebook integration for example)
The reason I use a pre-existing engine/framework/sdk rather than write my game from scratch is because I want the following benefits..

  1. Development speed
  2. Can make it once and then build to multiple devices.
  3. Less weird random "not working" or performance problems on particular hardware setups.

I think Unity3D is the best solution out at the moment to provide these, also it has a lot less limitations that other things Ive tried, a large community and lots of libraries (assets) available for it.

To save space you can compress all your game assets like images and whatnot. This is actually the default, images will be compressed and also squished to a 1024 maximum resolution. You can override and change these settings in the inspector when you select your asset.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .