2D game build size optimization

Hello All,

I write this post to seek your help for an issue we are currently stuck with. We are developing a graphics intensive 2d game.

Issue: We already have Android app size with normal build is 328 MB. We started same app development in Unity (to build cross platform app) but ended up with App size of 442MB (database approach) and 550MB (Base 64 approach).

Database approach: We are using database to store the images. But the issue with database is that it initially lags the game as database is copied to the iPhone’s app document.

With database approach we are neither able to achieve size of 328MB nor a lag free performance.

Base 64 Approach: We tried encrypting images to base 64 format which results in 550MB build size. However performance is way better as compared to the Database approach.

Please suggest me a way out on how to: 1. Improve performance in the database approach (Lag free) - Target size - 330 MB 2. Reduce size in base64 - Target size - 330 MB 3. Suggest a new approach that helps us to keep the size within 330MB.

Please do help us out of this issue. We will really appreciate your support.

Sincerely, Tek Chand

Base64 would be huge, there would be no benefit to doing that. I would suggest however that you consider not using a DB and instead just using a standard spritesheet/texture packer. You could always compress the images in your IPA and decompress on first load…

Also, I’d ensure your graphical properties are set correctly on the images you are importing, if you don’t need a 4096*4096 because 2048 would do, change the values in the import section rather than scale to save size.

There are a number of optimisations you MIGHT be able to make, without knowing considerably more it would be too hard to help you in any meaningful way.

1 Like

Hi, Thank you so much for your response. We really appreciate your support.
We initially started off project with sprite sheet but found that the texture bloat the game size on decompressing when installed on device. The game size with the above approach is 1.6 GB.
After introspection, we decided to shift to Base64 method which helped us achieve 550 MB which is much more than target size (330MB). We also tried databse approach to achieve 442 MB but we are still off by 112MB.

If you may provide me the reason why not to use database approach it will be helpful for me to research deeper.

Looking forward to your support.