Testing Unity Games on Android


We're porting our Unity 3D iPhone game Hit Tennis 3 to Android, so I've been learning about the wonderful world of Android fragmentation. I bought six different Android devices for testing, aiming to hit the main dimensions of variations in the Android world. Here's what I've learned, but don't forget that I'm an Android beginner. (Do yourself a favor and listen to Android expert Adam Berger on Walled Garden Weekly 15.)

Dimensions of Android

Android Version: Google publishes the Android Dashboard which explains how many people are using which version. Right now its 2.3.3+ Gingerbread at 40%, 4.0.3 Ice Cream Sandwich 30% and 4.2 Jelly Bean 23%. We'll be supporting 2.3 and up.

CPU: There a bunch of different SOCs (system-on-a-chip) used, but they all have ARM cpu cores. There are different speeds, and there are single, dual and a few quad cores, but every one supports either an armv6 or armv7 instruction set. Unity 4 for Android only supports armv7 (which is totally fine with us). Anything with an ARM11 cpu is armv6, 'Cortex-A' means armv7, and 'Snapdragon' is armv7.  Armv6 is only being sold in cheap low end phones. Its a deployment and customer support issue because you don't want people with armv6 phones downloading your Unity game and being disappointed it doesn't run.

GPU: This is a big deal to figure out, especially coming from iOS. iOS devices all use PowerVR GPUs, (Imagination Tech) but androids can sport PowerVR, Adreno (Imageon / Qualcomm), GeForce (Nvidia), or Mali (ARM). These differ in texture formats and how alpha is handled, and of course they all have different drivers and shader compilers. So far we've found that using ETC texture compression, which is supported by all Android devices, is working well for Hit Tennis.

Screen: Screens vary in resolution and size, so they also differ in pixel density. Android deals with this by defining screen density generalized size: mdpi hdpi, etc. Unity does a great job of helping code for resolution independence, but we still need to test different screen sizes for usability, and different resolutions for visual quality of both game graphics and supporting media like icons, splash screen, etc. Google mentioned at GDC that they care a lot about high end xhdpi devices like the Nexus line having great user experiences, so its important to have an xhdpi device to test on.

Our Test Devices

I figured out what devices we could buy cheaply, and be able to test the main variations on all the dimensions. My goal isn't to test every combination, but to cover all of the main dimensions of variations. Helpful sites for checking device specs are GSM Arena and Phone Arena.

Screen Shot 2013-04-10 at 9.51.24 AM
Screen Shot 2013-04-10 at 9.51.24 AM

The Huawei Fusion 2 is a really cheap phone, I grabbed one new at Target for $80 as a prepaid / no contract AT&T Go phone. I know it makes me sound old, but it blows my mind that $80 buys a armv7 CPU pocket computer with Android 2.3. The Fusion 2 runs Hit Tennis 3 at 60fps just great. I actually started off with the LG Optimus before realizing its an armv6 device and hence won't run Unity. On the high end I got a Google Nexus 4, which is actually an LG device. (Funny that Google's phone isn't a Motorola.) Its just $299 contract free for an xhdpi device with the latest Android 4.2 Jelly Bean. Wow. Makes iPhone 5 seem pretty expensive. To fill in the middle range and cover the other graphics chips I found some devices from ebay. This includes the Samsung Galaxy II, which is a good test case just because its one of the most popular Android phones around. For the same reason, I should probably get a Galaxy III too. We took our first baby steps on Android by publishing with Amazon to the Kindle, so we have a couple of Kindles, and we're making some changes to get the game working right on the Kindle 1. We had a shader problem there, not sure why, specific graphics driver issue is my guess, easily fixed by using a slightly different shader.

Let me close by reminding you that I'm an Android beginner, so I welcome any comments from readers with advice about which devices to get for more testing. Looking forward to releasing Hit Tennis 3 on Google Play in a few weeks. Thanks.