iOS performance issue - Can I use physics?

Software: Away3D 4.x

Francks, Newbie
Posted: 07 May 2013 12:27 PM   Total Posts: 10

In my project I had intended to use physics via AwayPhysics. Running on PC, I got 60 fps easily, but running on iOS (6.1.3, on iPod Touch 4th) the app runs at 1 fps! When disabling physics, then I got 30 fps on it. On my Android tablet the problem is like: 30 fps only (reminding that that tablet has a better processor + gpu).

Is it possible to use AwayPhysics on mobile devices? Or should I try other engine? Should I adjust the apps for their operating systems?

Thanks in advance smile

   

Avatar
Fabrice Closier, Administrator
Posted: 07 May 2013 01:13 PM   Total Posts: 1265   [ # 1 ]

Before look at Physics, I would first ensure that project runs 60/60 on the device. If it runs 1/2 speed, means you likely have some work to do memory management, geometry & material optimalisations…

   

Francks, Newbie
Posted: 07 May 2013 01:27 PM   Total Posts: 10   [ # 2 ]
Fabrice Closier - 07 May 2013 01:13 PM

Before look at Physics, I would first ensure that project runs 60/60 on the device. If it runs 1/2 speed, means you likely have some work to do memory management, geometry & material optimalisations…

I created a simple scenery with:
- 36 poly (I just added 11 meshes - all cubes - with no material);
- Memory consumption = between 9 and 16 MB (it depends of device).

Others details: The hoverController is not used (the camera position is calculated by another way) and ligths are disabled. And there are some event listeners, like on enter_frame, mouse_event and accelerometer.

   

Francks, Newbie
Posted: 07 May 2013 02:27 PM   Total Posts: 10   [ # 3 ]

Modifying the sample, adding only 10 meshes (cube), and also removed physic, light, the Starling layer and the event listeners (expect the enter_frame event listener) I got 60 fps on iPod touch 4th, but ~40 fps on Android tablet. :/

   

Avatar
Fabrice Closier, Administrator
Posted: 07 May 2013 02:45 PM   Total Posts: 1265   [ # 4 ]

Mobile dev is not much different than the good old flash 10 dev. The art is to do much with very little…

   

Oussama, Newbie
Posted: 07 May 2013 03:45 PM   Total Posts: 5   [ # 5 ]

The best solution is to create a native extension for the bullet physics engine or if you have very simple physics scene create a lightweight engine on your own.

   

Francks, Newbie
Posted: 07 May 2013 05:41 PM   Total Posts: 10   [ # 6 ]

@Fabrice Closier I’m beginning to think is it! ^^

@Oussama Well, my project it’s about an adventure game, with a bit of physics involved (jumping platforms and simple collision, without bounciness, or related). It seems really that is the way as you wrote. I’ll try, tks

   

Francks, Newbie
Posted: 09 May 2013 01:54 PM   Total Posts: 10   [ # 7 ]

Now I’m testing JigLib engine, and it seems to have a better performance than AwayPhysics. Is it true or am I mistaken?

   

Amerd, Newbie
Posted: 30 May 2013 11:29 AM   Total Posts: 2   [ # 8 ]

AwayPhysics will not give 60FPS till you publish your project as release build, also I tried Jiglib but AwayPhysics is much faster.

   

62316e, Newbie
Posted: 15 June 2013 07:00 PM   Total Posts: 25   [ # 9 ]

And how to make release build? Crashes everything for iOS.

   

dtramer2, Newbie
Posted: 28 July 2013 04:03 PM   Total Posts: 16   [ # 10 ]

I’m hoping someone will respond to 62316e.

   

OEGInc, Newbie
Posted: 19 April 2014 03:10 AM   Total Posts: 27   [ # 11 ]

I’ll respond, but since this thread is a year old now - I hope you found your answer long ago..

In Flash-Builder simply go under the project menu and select Export Release Build.  It will then create the *.apk file (for android) and/or the IPA file (for iOS) which you can then in turn install on your device (or simulator).

Good luck!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X