Sunday, July 23, 2017

Blobby Volley is out on Google Play!

Blobby Volley, the game that I've been working on since March, has finally been published. You can find it on Google Play. Give it a shot and play it if you haven't done it yet.

The whole project took me 142.5h to complete but I didn't just rewrite the AndEngine version of the game. I added analytics, Unity Ads, better AI, a menu system, more options and other stuff. I'm planning to work on the multiplayer now. I already started reading the manuals.

I'm curious to see if people will like the new version of Blobby Volley and whether the new video ads will bring any revenue. I'll keep you posted on the stats.

If you have any feedback, make sure to post it in the comments or email me directly. I'll also be grateful for any honest ratings and comments on Google Play.

Happy playing!

Have you been able to see this screen yet?

Monday, July 10, 2017

How to reduce a Unity Android game size by 10MB

I'd been working on my Blobby Volley game remake for a while and I'd been wondering why the output apk file was so large. The game used to have a size of around 3MB when it was written using AndEngine. So how did it grow to more than 25MB in Unity? I might have added some additional code but the graphic assets and sounds were all the same. I decided to investigate it a bit further.

I took the generated apk file and I put it in the apk analyzer tool that's built into Android Studio. You can find it in "Build/Analyze APK...". The results were quite interesting and led me to some further steps. BTW, if you don't know how to handle Android Studio, you can just change the apk file's extension to zip, unzip the file and analyze its contents manually. It won't be as efficient but it'll do.


What I soon found out was that what took the most space in the apk file were not my graphic assets nor my code but the native libraries in the lib folder. They were split into two subfolders: x86 and armeabi-v7a each of roughly 10MB.


I started thinking if I could get rid of some of them and it turned out that I could. The answer was to build the project for each architecture (arm and x86) separately and then publish them both on Google Play. This way each version would be around 15MB in size and it would be distributed to appropriate, compatible devices automatically. Here's how I did it.

I went to the Build Settings (File/Build Settings...) and I found Other Settings/Configuration/Device Filter. It was set to FAT (ARMv7 + x86). I switched it to ARMv7, built it and then did the same for x86, saving it in a different file and incrementing the version name and version code beforehand (Other Settings/Identification/Version and Other Settings/Identification/BundleVersionCode).


Then I followed the official Multiple APK Support guideline to publish both apk files on Google Play. It was quite simple. I just published the first file the normal way. With the second file, I removed the first version form APKs to deactivate, so it moved to the APKs to retain section.


This way, I have two active apk files now, both with a different version name and version code and both targeted at different device architectures. When someone installs my game from Google Play, they get only the version compatible with their device, which is now 10MB lighter. Yes, it costs me a bit more work to create two separate apk files and then publish them on Google Play but I think it's worth the effort. I created a script that builds the two versions from the command line but it's a subject for a different post perhaps.


I hope my investigation will help you make your Unity Android game leaner too. If something is not clear for you, make sure to post your questions in the comments and I'll do my best to answer them.


Sunday, July 2, 2017

Blobby Volley 2.0.9-2.0.13

I've released a couple of new versions of Blobby Volley since the last blog post, mostly with minor upgrades. I decreased the difficulty and I made "very easy" the default one. I fixed the icon resolution. I decreased the walking speed so the game is more about strategy and less about quick movement. I also fixed some bugs.

I had major problems with project building and extra permissions that were added to the apk file. I managed to find a solution to everything eventually, but it consumed a huge amount of time (>10h).

In the last two weeks I was able to work for 17.5h, which makes a total of 122h.

As the basic version of the game is coming to a close, I started reading about implementing multiplayer. It's not going to be an easy task and it's going to take a lot of time, but it should be fun.

As a closing note, I want to thank my beta testers, in particular Tyna, Tomek and Szczepan. Had they not helped me, I wouldn't have been able to find some nasty bugs, and adjusting the game's parameters would have been much more difficult. Keep up the great work, guys!