Mobile games are going through the roof to surpass $100B across all mobile app stores in 2020. The launch of console games like Call of Duty: Mobile and Mario Kart Tour on mobile in 2019 further adds to the growing evidence that game makers and publishers are increasingly going mobile to capitalize on the larger market. With more than 2 billion Android users worldwide, Android game development brings a great opportunity for game makers to reach out to masses and generate high revenue. But, does every Android game stand up to the mark and get successful? Well, the answer is NO, and that’s largely because of increased Android game app size. The rising expectations of gamers lead developers to integrate more and more things into Android game apps and end up making them storage hoggers. Such gaming apps also cause performance issues that hamper user experience, like operating slow sometimes or hanging in between. Yes, today’s smartphones come with large storage spaces ranging from 16GB to 256GB, but it’s still beyond reality to think that all the apps a user wants can be housed in just one smartphone. This makes game optimizing service equally important as game development.
According to Google, the install conversion rate drop by 1% for every 6 MB expansion in an APK’s size. This results from users considering the size of the game app before installing it, how long it will take to download, and Internet connectivity issues still existing in many parts of the world. It’s no secret that an Android app without considerable downloads is as good as non-existent, which makes it paramount to hire Android game developers who also offer game optimizing services to reduce the app size and improve performance on various Android devices.
Android Game Development: How to Reduce Game App Size
Unity game developers can use AssetBundle to use platform-specific non-code Assets such as Models, Textures, Prefabs, Audio clips, and even entire Scenes. Unity can load those non-code assets at runtime. Unity packages the game in the engine and most of the game's assets are put into a single binary file. Android App Bundle is another great solution offered by Google to reduce the game app size. App Bundle allows Android game developers to build and optimize APKs for each device configuration, which results in a smaller app without the unused code and resources needed for other devices. For Android game apps more than 150 MB in size, Play Asset Delivery (PAD) is the best bet as it allows to replace APK Expansion Files, also known as OBBs, by publishing a single artefact on Play Store containing all the resources the game needs. Using PAD, developers can host and serve all asset packs on Google Play without requiring a third-party content delivery network (CDN) to get game resources to players. PAD asset packs consist of assets such as textures, shaders, and sounds, but no executable code. PAD also allows to customize how and when asset packs are installed based on three delivery modes: install-time, fast-follow, and on-demand.
Also read Why is Storyline in Android Video Game Development so Important?
Gameloft integrated PAD into Asphalt 8, Asphalt Xtreme, and Minion Rush. Both Asphalt 8 and Minion Rush leveraged fast-follow and on-demand delivery by replacing their custom CDN calls with calls to the PAD API. This helped not just reduce CDN costs, but also drastically increased the secondary downloads to start playing the game. As a result, the user-retention rate significantly improved, with 10% more new players than with their previous asset delivery system. A puzzle kids app from a US developer also saw a 21% reduction in crashes & Application Not Responding (ANR) errors after using Play Asset Delivery’s on-demand mode, which significantly helped improve the user experience.
However, Android App Bundle or Play Asset Delivery is not the only way to reduce an Android game app size, which brings me to discuss more ways to further reduce the game app size.
Different Optimizations to Reduce Android Game Size
Reduce the Size of APK’s Assets
Identify APK’s assets (images, audios and videos) that can be further resized or compressed and use high compression ratios, which is quite acceptable for games. You can reduce the image size by diluting the resolution and converting .jpg and .png images to .webp without compromising on the quality of the original images. If you’re using a texture much larger than the number of pixels that ultimately render on the screen, you’re simply not making the optimum use of space and GPU resources. You can use Android GPU Inspector (AGI) to change the texture and see the appearance on a frame without having to rebuild the game. Guetzli and Packjpg are some other tools available for .jpg compression, whereas Zopflipng and more such tools for png conversion. Reduce the size of your assets, use compression on images, reduce the bitrate of any audio, and convert sound files to .ogg format to reduce the final app size.
Apart from this, designers should implement vector graphics in order to develop simple resolution-independent images. 9 Slice Scaling is a good technique which Android game developers can use for 2D image resizing and proportionally scaling an image by splitting it in a grid of nine parts. This technique significantly helps in preventing image scaling distortion by protecting the pixels defined in 4 parts of the image and scaling or repeating them in the other 5 parts. Also, ensure that 3D objects have only as many vertices as are necessary to meet the visibility requirements on various screen sizes. Getting rid of unnecessary vertices significantly helps in reducing the app size. Also, change the formats of graphics’ texture. Go for texture formats that use fewer bits per channel, like RGB565, which is a 16-bit texture format, instead of a 32-bit texture format such as ARGB, wherever possible.
Remove Useless Assets, Models and Scripts
Remove any resources you don’t need. There may be scenes, sound files and pictures that are not used, so it’s a good way to reduce the app size by removing them. Also, any code which is not required for any functionality of your game will only increase the load on your app. By removing the junk, you can make your app more energized and active. Always remember that the size of the APK file is directly proportional to the load on your app, memory it occupies and power it consumes. Removing useless stuff helps reduce the size of your app and improve overall performance.
Also read 5 Best Programming Languages for Android Game Development
Reuse Resources
Another way to optimize your Android game app is to reuse your resources. If you have a rotated equivalent of another resource, then you should remove it as it will unnecessarily occupy space otherwise. For example, you may have resources to characterize varieties in an image related to tints, shades and direction. You can use the same resources to characterize varieties in other images too. So, reusing resources reduces the final size of your Android game app and is simpler than removal later on.
Avoid Enumerations
Enumerations are known to quickly grow for complex systems and shared libraries. A single enum can add about 1.0 to 1.4 KB size to the classes.dex file of your Android game app. So, you should avoid them. Consider using ProGuard to convert the enums into integers in order to reduce the app size. You can also use @IntDef annotation and code shrinking for the purpose of converting enums into integers, and the end result will be a reduced app size.
Don’t Make Extensive Use of External libraries
It’s common among developers to use external libraries to improve the user experience. For example, Android Support Library for older devices and Google Play Services for auto-translation of app content. A library for a server or desktop can consist of a lot of objects and methods that are not not useful for your game app. So, you should edit the library's files to include only the parts that your app needs. You can also go for a mobile friendly library to add specific functionality to your app without making your app heavy.
Don’t support all Screen Densities
Developers generally want to run the game app on all the Android devices, which is why they go for all screen densities. Android supports all screen densities, including ldpi, mdpi, tvdpi, hdpi, xhdpi, etc, but you don’t need them all. Find a way to know the percentage of users having devices with specific densities. This will help you understand whether or not you need to bundle those densities into your app. If you remove resources for a specific screen density, Android will itself do automated scaling of the available resources which were originally designed for other screen densities. If scaled images are all your app needs, you can include a single variant of an image in drawable-nodpi, which will further reduce the size of your app.
Shrink native Binaries and Remove Debug Symbols
If you are using native code and the Android NDK for your app, you should optimize the code to reduce the build size. You can remove debug symbols and avoid extracting native libraries to optimize the code and reduce the size of the release.
Use APK Size Analyzer
You can use the Android Size Analyzer to know all about the size of the APK. You will see the Raw File Size on the top of the screen, which will show you the APK on-disk size. The Download size will show you the estimated data your app will consume to download after taking in account the compression applied by Play Store. The analysis report will show you the things occupying most space in your app. Also, the Comparison feature allows you to see the difference in the sizes of old and new builds.
Provide Multiple APKs Support
Some APKs have content which is not useful for every user. But, users have no way to download only a useful part of an APK, which results in increased app size. One cool way to deal with this is to upload the game app over Google Play store via Android App Bundle and get the ability to optimize APKs as per-device configuration. By doing this, you can actually divide one app into Multiple APKs and let users download only those APKs which are beneficial for them as per their device configuration.
Remove the Parts of Game Engine You aren’t Using
Including all the parts of your game engine despite not using them all will unnecessarily increase the game app size. For example, Physics, x86 Architecture and .NET 4.x in Unity. The two .NET API compatibility levels Unity supports are NET 4.x and .NET Standard 2.0. Using .NET Standard 2.0 , you can restrict your app to a smaller subset of the .NET API, which helps in keeping the app’s size down. You should change the build to ARM as you don’t need x86 and also check out the stripping level.
Above I discussed some optimization techniques to reduce the size of an Android game app in order to increase installation rates and enhance user experience. Are you looking for a game app developer to convert your Android game idea into a reality and also provide game optimizing services to make your game app feel home on various Android devices? Logic Simplified can help!
Why Choose Us for Android Game Development and Optimizing Services?
Logic Simplified offers Android game development services to clients of different cultures world over. Hire game designers and developers who uses cutting-edge tools like Unity, Godot, GameMaker Studio 2, Unreal Engine, Maya, Blender, 3ds Max and many more to build Android games that live up the expectations of today’s modern gamers. We don’t just build games, but optimize them as well to ensure reduced file size and improved overall user experience. From conceptualization to designing, development, testing, different optimizations and deployment, we take care of all and allow you to significantly cut development time and cost at the same time. From our experience sprawling over 9 years in the gaming industry, we are in a very good position to tell you what exactly will work for your Android game and what won’t, which can turn out to be a big differentiator between the success and failure of your game. We are backed by team members who are passionate about gaming and committed to help game visionaries create games that rock the charts. If you’re also the one looking forward to building a new Android game mania, you can get in touch with our game development company to hire Android game developers and begin an exciting ride.