New Actionsctipt 3 Physics / Game Dynamics Engine - Port of Chipmunk
Tuesday, 15 January 2008 | Labels: Actionscript, Physics | |After trying to a number of ideas for my tile engine, I decided I really wanted rigid body dynamics - my existing glaze engine is really only a particle dynamics engine. The trick with rigid body dynamics is to get it stable (aka no jitter). Fortunately there is a solution for this (SI) as shown in the Box2D physics engine (also ported to Actionscript 3) and the Motor2 engine. There is also a rather elegant implementation in C called Chipmunk.
After a few marathon coding sessions I ported the bulk of the code to Actionscript 3, and once working rewrote large chunks so that it was more optimized for the AVM.
The initial result can be seen here: Chipmunk Port - pEngine Alpha
I've still got a long way to go - I'm working a very simple API at the moment that allows you to describe a scene using tiles. I'll be updating this blog more frequently as I progress.