- Home /
How to keep apk size low when using large 2d animations?
I'm making a 2d android game which will consist of a series of fights against single enemies that take up most of the screen. So far i've animated and implemented one enemy, but the size of the apk increased dramatically due to the images used for the animations. I intend to have many more enemies and if it continues at this rate then the apk size will be ridiculously large.
The enemy animations are made of several individual 2048x2048 images compressed to 1024 at the moment.
The enemy needs to appear clear on the screen and any compression lower than 1024 makes it appear pixelated.
So basically i'm not sure how to have a large (almost filling up the whole screen) 2d animation that looks good and doesn't increase the apk size by too much. Can anyone point out what i'm doing wrong?
Answer by DiegoSLTS · Aug 12, 2016 at 03:58 AM
Maybe some of this can help you: https://docs.unity3d.com/Manual/ReducingFilesize.html
Anyway, having a lot of really big images will generate a big APK, that's hard to avoid. Maybe you should consider using Bone-Based animations like it's done for 3D models. A quick google search pointed me to this tutorial (might be outdated).
EDIT: Note that if you create an empty Unity project with an empty scene, the APK generated is bigger than 10MB, so no matter how much you can compress your images, the minimium size of a game is usually higher than 20MB. If size is a priority maybe Unity it's not the best engine for your game, I tested Defold once and building an empty project created a ~3MB APK.
Answer by liortal · Aug 12, 2016 at 09:20 AM
If your only issue is APK size, you should separate this content from your game (using Asset bundles for example).
If the content isn't available right away when loading the game, you should be able to start the game and load it in the background, so it will be available once it's needed.
There could be other potential issues with huge animations, such as large memory usage, but you did not specify whether that is an issue right now.
Your answer
Follow this Question
Related Questions
android apk size not getting much smaller 1 Answer
Android APK size way too large 2 Answers
Size of texture after building too big 2 Answers
launching unity app from android 0 Answers
How to reduce size of android apk 5 Answers