views:

184

answers:

2

I'm writing a game for Android. I'd like to target as many devices as possible. I'm aware that Droid owners buy about 50% of the apps and the rest are a mixture of G1 and HTC devices.

So far, I've been testing my app in the emulator set to model the Droid phone (where I get about 40 fps) as well as on an actual Droid phone (where I get about 60 fps).

I'd like to know how fast my app runs on slower devices such as the G1. Is there any way I can do this besides getting a G1 myself or asking people with G1s to test it for me?

For example, is there any way I can use the emulator to get a rough idea how well it will run on the G1?

+1  A: 

Is there any way I can do this besides getting a G1 myself or asking people with G1s to test it for me?

Not today.

There are too many variables for simple "it's 50% slower" answers. The DROID has floating-point hardware (FPU), and the G1 does not, for example. If you're doing lots of floating-point calculations, the disparity between the DROID and the G1 will be greater than the relative CPU speeds would indicate.

Similarly, access speeds for on-board flash, graphics hardware acceleration, and the like may all differ in ways that aren't tied to CPU speed. And, different apps will use those capabilities differently -- your app might run all from RAM while others are constantly loading from on-board flash (or, worse, from the SD card, which speeds vary even more widely).

The emulator bears little resemblance to real hardware from a performance standpoint. For example, there is no graphics hardware acceleration at all. Using the emulator to test whether your game works is one thing; using it to benchmark performance seems pointless to me. Heck, I can't get the emulator to play back video reliably on a quad-core PC.

Now, given a tool that can measure how much your app uses certain capabilities (e.g., certain OpenGL operations), and a database of how different devices perform when doing those things, you might be able to cook up a reasonably accurate answer. Alas, none of that exists, AFAIK. Perhaps someday it will exist, courtesy of a crowdsourced database or something.

In the interim, you are going to wind up having to do what game developers do on other platforms where the hardware varies (e.g., Windows) -- test on a couple of actual configurations and draw up some "minimum" and "recommended" hardware levels.

CommonsWare
Also, don't forget that there are services like DeviceAnywhere and Perfecto Mobile that are designed to give you remote access to hardware. There are free-access deals for this from time to time -- for example, SonyEricsson is offering seven hours free access to Perfect Mobile via http://bit.ly/coUR5D
CommonsWare
Thanks for the info! I'm not doing anything complex. I'm just drawing 60-odd small sprites a frame (without OpenGL) and each sprite is controlled using a few floating point calculations (e.g. dot products, distance calcs, collision detection). I'm generally hearing the emulator is slower than running on even the G1. I'm trying to gauge how many the 60+ fps I'm getting on the Droid can be put into graphical effects (aiming for about 30fps during gameplay) but I want it to work on the G1 too. Any rough advice for what the G1 can cope with compared to the emulator/Droid here?
DrEmulator
"I'm generally hearing the emulator is slower than running on even the G1" -- that'll depend on what you're running the emulator on, but, yes, the emulator is slow. It has to convert ARM opcodes into Intel ones and such. "Any rough advice for what the G1 can cope with compared to the emulator/Droid here?" Again, it's tough to say. DROID has 2x the effective CPU speed, but I don't know how graphics acceleration will impact matters, let alone possible improvements to the Dalvik runtime between Android OS releases.
CommonsWare
I hope I'm not going around in circles but: I'm getting 40fps on the emulator and 60+fps on the Droid. I'm not doing anything that taxing floating point and graphics wise so I'm predicting I'm going to get between 40 and 50 fps on the G1 as the G1 should have better performance than the emulator. Does that seem about right as a rule of thumb? I'm not asking for guarantees, just a rough guide until I do my final tests with more devices. It would have been nice if there was a "emulate a G1" mode with some way to get rough timings from it.
DrEmulator
A: 

Have you looked at Device Anywhere?

Plumenator