Android performance

We are developign some iOS Unity games, but are just thinkign about getting started with Android, and figuring out a lowest hardware spec to aim for…

How well does Unity run on Android,
and is there such a thing as a reccommended lowest spec for 3D Unity games on Android.

for example, something that would run well on 3GS i-Phone… what would be the equivalent Android device ?

any pitholes to look out for on Android ?

thanks

I would say the screen resolution on android is something to look out for and in android, i think you need to think of what version of android you are going to develop on. There are just too many types of android device out there. So be careful.

Unity’s performance in Android is surprisingly good, but you have to bear in mind that Unity on Android simply doesn’t work on a huge number of devices, so you’re kind of forced to have a reasonably performant device to begin with. I hate generalizations in programming because they rarely hold true over a wide enough spectrum to be useful to anyone. That said, for performance on a par with a 3GS you’re probably looking for something in the mid-range A7’s. So something like an HTC Desire, Motorola Droid or Samsung Galaxy S is probably in the right ballpark.

As Zine says, the resolution is definitely something to look out for on Android, as it is in iOS, for that matter. These devices tend to have pretty decent processing power these days. It’s not like the old days of making Java games for mobile phones where you had to optimize every little thing. However, the flip side of that is that the devices do struggle with graphics performance and fill-rate in particular. Of course, the main issue with fillrate is that the problem gets worse as the resolution gets higher. So anything which has alpha transparency, blending, particles, etc. could get you into trouble if the resolution of the device is high.

Other than that, you really have the same considerations you have on iOS. Skinned characters can be a problem, and need to be well optimized. Keep your draw calls as low as possible. Avoid high res textures where possible; just because you =can= use a texture resolution doesn’t necessarily mean you should. Just the typical mobile considerations really.

thanks muchly

I’ll agree with that.

I own the HTC Desire and I wouldn’t consider it en par with 3GS generally or better I would if the Desires resolution was not 800x480 but instead 480x320 - at 800x480 the GPU suffers similar problems the SGX535 does in the iPad1 / iTouch4 / iPhone4, its trying to not die a painfull fillrate death. Aside of that it sits on 134mb internal, be happy if you install more than 4 games before you get the “no space to install” warning (app binary must always go into the internal even if the app supports SD usage for the data and mails / sms are also always on the internal)

I would definitely recommend to go with the Galaxy S / Nexus S

Is your Desire tied to a particular provider or sim-free? Do you have any of the provider-bundled rubbish pre-installed? Mine came sim-free, so I’m wondering whether phones bundled with a provider’s own software might explain the difference in performance. My Desire runs considerably better than my first-gen iPad, albeit that they’re running at different resolutions, of course.

My desire is unbranded, on the most current official version and has no provider rubbish (I’m a dev, not an idiot that goes into provider shops ;))

The performance is definitely in disfavor of the Desire here as far as I’ve seen so far, with Unity games that fly on iOS (be it itouch 3GS, itouch4 or ipad1) stuttering like hell on my HTC Desire.

Sure your desire is a desire, not a Desire HD which has snapdragon 2 + adreno 205 and is about 50-100% faster than the original desire thanks to the twice+ as fast Adreno 205 vs Adrone 200 in the original Snapdragons (QSD 82xx)?
Even the Desire Z with its physical keyboard is significantly faster, its an 800mhz Snapdragon 2 + adreno 205

I have a problem with HTC Desire. I can’t improve it’s performance anymore (15-20 fps) and I’m interested should I release the game with such performance anyway and get bad feedback or it’s better to exclude this and similar devices from the production?
What devices from ‘Unity Tested Android Devices’ have same performance as Desire?
How much market I will lose if I remove these devices from production?

I would be very careful with the Motorola Droid. We are using the Droid X (which is much better than the Droid) and having problems. What we determined is the Droid X GPU, the SGX530, is inferior to the SGX535 (which is in the iPhone 3GS). Specifically, it is has one less texturing unit - The GPU Performance Showdown: Snapdragon vs. OMAP 3630 - Motorola Droid X: Thoroughly Reviewed. To boot, it has a much larger resolution than the iPhone 3GS. So you are basically asking a gpu weaker than the 3GS to do a fill-rate comparable to the iPhone 4 (yes I know it 854x480 != 960 x 640 but the argument remains the same). If you have tested the fill rate on the iPhone 4, you know it struggles. We had fixed this fill rate for the iPad 1. But it is apparently not enough for the Droid X. So be careful. As always YMMV.

Well, you can try to release it so and see if people give negative ratings (i.e. low fps). With the new android market you can see the game version and their OS/Device used, so you can start excluding this devices.

On the other side, what have you tried so far to reduce the performance? What’s the batch calls, quality settings, “2D” or 3D game, what do the scenes look like? Do you use much physics (rigidbodies/colliders)? Pixellighting, what shaders etc?

There is tons of things which can be used to optimize performance on mobile devices, some require you to redo half of your assets :stuck_out_tongue:

We’re expecting to test on Motorola Droid ASAP. I think it could be the problematic device also. We tested on HTC Desire S and it works great (50-60fps). Also we don’t have problems with iOS.
The game is 2D, about 100 sprites on the scene, ~20 draw calls, all images gathered in 8 atlases, 90% of sprites have colliders, used simplest mobile alpha blended shader (build in).
The only optimization I see is to reduce amount of sprites and colliders. So we’ve used such approach for HTC Desire and going to release it.

Now I would like to know, somebody knows which devices from the ‘Supported list’ are definitely so slow as HTC Desire?

We’ve tested Samsung Galaxy S and Motorola Defy and them have same bad performance as HTC Desire.
So we remove some objects from the scene for this devices.
Also we’ve noticed that CreateVBO issue kills performance a lot on these devices (but again, iOS devices work great).

Well, all devices with PowerVR SGX530 (Defy) and Adreno 200 (HTC Desire) will fall in this category.

Samsung Galaxy S is quite strange as it uses an SGX540 which sould be decent enough. Maybe you have other issues? To big atlasses (i.e 4096x4096 is going to kill most devices, even compressed that’s… even an 2048x2048 atlas is ~25 MB in size with mipmapping enabled, in RGBA 32 bit (everything else isn’t good anyways for 2D/Sprites games and 4096x4096 must be something around 80 MB).

I think you shouldn’t make the atlasses to big. 2048x2048 should be the upper limit. And try to organize your sprites in a way that you can display a scene in 1-2 sprite atlasses, instead of having 8 different.

You can also simplify the shader which is used, i.e the standard shader in “2d toolkits” has

SetTexture [_MainTex] { combine texture * primary }

When you don’t need colors, you can simpify it to something liek

SetTexture [_MainTex] { combine texture }

It will bring a few fps, don’t expect too much

Tseng, thanks for advice.
We’re using 2048x2048 atlases and trying to use as few as possible per scene.
Unfortunately we can’t use simplier shader as we use vertex color for a few effects.

I haven’t checked Samsung Galaxy S by myself, just asked friend, so I will recheck it’s issue again.

Anyway removing of critical (scaled) objects from the scene and removing of some effects gave us accaptable performance for these devices.