Physics

The choice is yours

There are plenty of excellent bespoke, high-level physics engines on the market. Rather than tread on their toes, we simply provide you with low-level yet rich geometry building blocks – and let you choose from existing high-level engines, either open source or proprietary.

Primitives of all flavors

Marmalade's geometry module gives you all the core primitives you need for physics and other types of 3D calculations. However, rather than just providing one type of each primitive – say, a 3-cpt floating point vector – we've provided every flavor you can imagine, so you'll find vectors as 2-cpt, 3-cpt and 4-cpt, in 16-bit fixed-point, 32-bit fixed-point, and floating point. You'll also find matrices, quaternions, spheres, planes and axis-aligned bounding boxes, all in multiple flavors. All primitives are C++ objects, with operator overloads guaranteeing easy access to the math.

Don't reinvent the wheel

Marmalade's great support for standard C and C++ libraries means that existing open source or proprietary physics engines will compile with little or no modifications. To get you started, we provide the latest version of the Open Dynamics Engine, all ready to drop straight into your Marmalade application. Simply include ‘ode’ as a subproject in your Marmalade project file and it will get pulled down from our website automatically.

Box2D, Bullet and Chipmunk also work fine with Marmalade – head to our Code Community for more details.