Ore Miner is an addictive clicking game where you mine ores to craft new picks and equipment to increase your ore income!

Post tutorial Report RSS Reducing mobile app download size (part 1)

What you can do to make your game’s download size smaller in Unity3D.

Posted by on - Intermediate Other

For the last few days I’ve been hard at work reducing the download size of Ore Miner, the most recent game we developed for Studio Techtrics. In this blog post I share my findings – what you can do to make your game’s download size smaller in Unity. Many of these are as simple as toggling a setting, while others require a little more effort.

Game development stage

Previously there was no thought given into asset management and size minimization. It has been our experience from the past that it is very time consuming to do asset management during development itself – so we didn’t. We kept multiple versions of files in very high quality. This is why our initial compressed application size on Android (APK file) was 41 megabytes. To test this further, we compared APK sizes to estimate how much file size is affected by various methods. We used APK files (as opposed to iPhone’s IPA files) simply because creating an APK is much faster than creating IPA files.

Removing duplicate files

During the game development stage, it makes it much easier to create duplicate files for different contexts (within reason, obviously). For example: we used multiple copies of the same artefact icon:


In the upper image, the “artefact” image is used 6 times in six different contexts: Rewards, resource display, crafting, the ore generator, stone specialisation and achievements. This is however only the case today, when the game is done and has been shipped. The use of this icon has changed a lot during development, it has been used in all sorts of places and then replaced with alternatives or removed.

The first place where the icon was used (albeit an earlier version of it) was in the resource display field, in the top right of the main game window, where your current number of artefacts is shown. At first, the exact same picture icon as the others was used (without the circular yellow button). Later, during testing, we realised that the lack of the background meant users didn’t know the area was even clickable, so the icon was changed. Were the rest of the locations using the same icon, it could have caused trouble if the developer, who was making the change, wasn’t aware that the icon is in fact used in more places than just the one display. Instead, we prepared for this by making all the icons use different icon files. So for each of the 6 locations where the artefact icon is used, a separate icon file was used – they don’t reuse the same one.


This does lead into a problem though: While it makes development easier, it increases the size of the app. While it is the case that the artefact icon above is tiny in size, and it being used six times doesn’t make a big overall difference (only a few kilobytes), the same was true of many other icons, which were used in different contexts and used separate icon files. The optimization process thus began by hunting down all duplicate files and only keeping a single version of them. This was, as you can expect, very time consuming and tedious. It’s however much less tedious than keeping on top of this throughout months of development, even if all the tedium is concentrated into one single burst. In the end, this saved us a few megabytes in APK size.

In the next part I'll talk about sound compression.

Matevž Baloh, programmer

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: