0
\$\begingroup\$

Can you recommend a good physics engine which is easily portable between WebGL and other OpenGL ES implementations like in Android and iPhone?

I don't want a game engine. Only the physics part.

\$\endgroup\$
  • 2
    \$\begingroup\$ You're not going to find a portable solution between WebGL and Android/iOS. \$\endgroup\$ – notlesh Apr 28 '12 at 17:51
  • \$\begingroup\$ So which one did you chose? \$\endgroup\$ – Coyote Oct 13 '12 at 11:43
2
\$\begingroup\$

For handheld devices the best option is to use a C/C++ physics API as processing power is quite limited.

Bullet physics is a very good 3D physics engine. It works on Android, iOS, PS3, Windows, Mac... it's portable. You can use it in 2D mode as well. It has been ported to javascript (compiled using emscripten).

Box 2D works very well for 2D physics. It's used in many games. Angry birds being the prime example. For javascript the most up to date version is box2dWeb.

There are other option. But these are the most popular and work well on mobile devices.

| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

This probably has an answer somewhere, but if you want a good 2D portable physics engine Box2D is sort of the standard: http://box2d.org/

I have got it to work on Android (using the NDK as it is a C library) and it works fine on IOS. For webGL, everything runs in JavaScript, so you would need a port of Box2D, like: http://box2d-js.sourceforge.net/

For 3D, there is probably a huge list somewhere, bullet being fairly popular: http://bulletphysics.org/wordpress/

| improve this answer | |
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.