Android Fragmentation and Unity

If you take a look at some of the stats on Android fragmentation, it can look quite scary as a developer. Graphs here: Don’t be put off by this; Unity does most of the work for you. There will always be some weird device/OS combination that will have issues, but don't worry about them, focus on the other 98%. This is easy to do if your game is free, as you don’t have to give refunds to people who have major issues. Also, don’t even try to support non-standard versions of Android.

android phones4.jpg

Obviously you’ll want to test on at least a minimum specification Android device regularly. If your game runs fine on an iPhone 3GS, it should work on a 512MB RAM device like the Sony Xperia Go. Testing regularly on a Samsung device like a Galaxy S2 is also a good idea as Samsung has almost half of the market.

The main decision to be made is texture format. We used PVRTC 4 bit for transparent textures and ETC 4 bit for most other things. Sometimes uncompressed 16 or 32 bit textures were used to improve the quality when compressed didn’t look good enough. You should test on at least one device with each of the four main GPU types (Adreno, Mali, PowerVR, NVIDIA) to make sure your game looks great on them all.

In terms of 2D content like the UI, make it high enough resolution for the current best devices and move it around based on the aspect ratio of the screen. Use screen space, not pixels for positioning/scaling.

The best way to avoid any nasty surprises is to get everyone you know with an Android device to test your game. Email them the APK and track stats with Flurry or Game Analytics. Even better if you can see it running yourself and make sure it's all good. Don’t rely on end customers to tell you something looks funky on their device. There is a good chance they haven’t seen your game running on anything else, plus they probably won’t go to the trouble of emailing you about it.

To sum up, Unity handles most of the hard work, you just need to test on a few more devices and make some smart decisions regarding texture compression and UI placement.

 - Paul (@pbaker05)

Stunt Star: The Hollywood Years is available on iPod, iPhone, iPad and Android.