How can I optimize the size of my .apk?

| | August 8, 2015

I noticed that the Flappy Bird .apk is only around 900 KB. I’d like to know how I can achieve a similar optimization in .apk file size for my own games, which use Unity. A small single-scene game developed with Unity will have an .apk size of nearly 10 MB, in comparison.

2 Responses to “How can I optimize the size of my .apk?”

  1. Unity is a very powerful and very complex game engine. Most games only use a small fraction of its features. But no matter how much of it is actually used, a game which uses the Unity engine must include the whole engine which is a hefty 10MB chunk of additional filesize.

    For a very simplistic game like Flappy Bird, using such a huge engine is usually overkill. They can usually be made using just the native Android API which allows to create much more compact applications.

  2. It’s possible to use an Android “APK Expansion File” so that additional content is downloaded at runtime the first time you launch it.

    Next, if you have very few graphics that always repeat (if I remember well Flappy Bird has very few graphics assets) they can be compressed in the .apk and expanded in-memory during execution. Graphics and art assets are the files that have more impact on final .apk sizes than most other assets.

    Unity loads a lot of stuff, but if you program the game directly in OpenGL you are able to cut your code and libraries to the essential and achieve very small packages.

    I remember the time when adventure games (like Maniac Mansion) were all in one floppy disk.

Leave a Reply