AS3 Box2d on mobile

Hi,
I have been reading this forum since many days and liked it so much. Its really an awesome community.
AS3 needs Flash Player 3" - AS3 requires Flash Player 9. FLash Player 3 is over 10 years old and the equivalent to FlashLite 1 (ish) . ActionScript 3 can only be processed by Flash Player 9+ or compatible runtimes such as the AIR runtime. The Current distributions of Flash Lite are not yet compatible with Flash Player 9+ features. However there are some Mobile devices that should, in thoery, be compatible with Flash Player 9+. There is for example a Linux distribution of the Flash Player 9+, so a Linux based mobile devices should be able to run the player and as long as the device has the processing horse power and sufficient memory to run the Player, and also the content you 'might' be able to deploy to this type of screen.
it’s really working. I have tried it, it’s quite easy to build UI and also to link it with the services. If you like developing applications for mobile platforms you should definitely try Elips 3.0, you’ll deploy your application for different platforms in a minute, and the most important thing is that it will run in native, so you’ll get more money because you can sell it on Android Market, Apple AppStore, etc. When I used it, it didn’t covered many classes from Flex, but with what they provided you could have built nice apps.
Just made a test on my Android phone, Huawei U8800, its CPU is 800MHz, it has a GPU. It is Android 2.2 system, with a 800x480 screen.
Here is the test: https://market.android.com/details?id=a ... r.AtSlot65

In the test, 6 hinge joints, 3 spring joints, 1 slider joint, 25 movable objects, 20 static objects.
The test uses Adobe AIR GPU render mode.
For the normal speed mode, each frame will call b2World.step twice.
For the slow speed mode, each frame will call b2World.step once.
For the fast speed mode, each frame will call b2World.step 4 times.
For each fame, whatever speed mode, there is only one rendering.

The version of Adobe AIR for Android is 3.1.0.556.

The fact (at the beginning of the test):
- under the slow speed mode, the FPS is 20, so tRendering + tStep = 0.05
- under the normal speed mode, the FPS is 17, so tRendering + tStep * 2 = 0.06
- under the fast speed mode, the FPS is 13, so tRendering + tStep * 4 = 0.08

The results:
- the time for each b2World.step, tStep, is 0.01 second.
- the time for rendering the scene, tRendering, varies from 0.02 to 0.04 second.

In fact, tStep also including the time for AI, so the time for b2World.step would be less smaller.

So the bottleneck is the graphics rendering, not the physics.
Conclusion: the Adobe AIR for Android is still not very optimized on graphics rendering.
[update for the Android app test]:
1. it seems using bitmaps instead of vector shapes will get a better FPS.
2. when there is a large island connected by joints in the physics world, the world.step will spend much more time so that the FPS will decrease to a low value.
3. many small particles will also make the FPS will decrease to a low value.

Tapir wrote:
Just made a test on my Android phone, Huawei U8800, its CPU is 800MHz, it has a GPU. It is Android 2.2 system, with a 800x480 screen.
Here is the test: https://market.android.com/details?id=a ... r.AtSlot65

In the test, 6 hinge joints, 3 spring joints, 1 slider joint, 25 movable objects, 20 static objects.
The test uses Adobe AIR GPU render mode.
For the normal speed mode, each frame will call b2World.step twice.
For the slow speed mode, each frame will call b2World.step once.
For the fast speed mode, each frame will call b2World.step 4 times.
For each fame, whatever speed mode, there is only one rendering.

The version of Adobe AIR for Android is 3.1.0.556.

The fact (at the beginning of the test):
- under the slow speed mode, the FPS is 20, so tRendering + tStep = 0.05
- under the normal speed mode, the FPS is 17, so tRendering + tStep * 2 = 0.06
- under the fast speed mode, the FPS is 13, so tRendering + tStep * 4 = 0.08

The results:
- the time for each b2World.step, tStep, is 0.01 second.
- the time for rendering the scene, tRendering, varies from 0.02 to 0.04 second.

In fact, tStep also including the time for AI, so the time for b2World.step would be less smaller.

So the bottleneck is the graphics rendering, not the physics.
Conclusion: the Adobe AIR for Android is still not very optimized on graphics rendering.

Original thread: https://box2d.org/forum/viewtopic.php?t=6890