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?
Maybe some of this can help you: Unity - Manual: Reducing the file size of your build
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.
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.