Friday, January 11, 2008

Actionscript 2D Physics Engines : Motor 2

This post is part of a series reviewing the available Actionscript 2D Physics Engines. Each engine was tested through the development of three simple simulations; Hello World, Rope Bridge and Stunt Bike. You can find out more about the testing methodology and access the other reviews from the introduction post.

Motor 2 screenshot

Motor 2 is the newest of the Actionscript 2D Physics Engines. Like Box2DFlashAS3 it is a port of Erin Catto's C++ physics library Box2D. Though it is probably more accurate to call it a series of variations on Box2D's themes as Michael Baczynski has exchanged some of Catto's libraries for his own.

I want to start by saying this isn't a review in the same sense as my posts on the other engines. The current Motor 2 release is just a preview. Major features like joints/constraints still need to be implemented. From my perspective that means I couldn't build 2 out of 3 of the test simulations (both Rope Bridge and Stunt Bike require joints). Consequently I haven't built anything with Motor 2. What I offer here is some observations based on looking at the demos and staring at the available code long enough to know where to start building a simulation. I offer this post from the perspective of someone who has spent quite a few hours with the other available engines and is therefore able to make some comparative observations. But really it is a placholder awaiting a more complete release.

So what can I say about Motor 2?

On the up side the demos suggest that the engine will be reasonable fast and accurate. The demo code suggests that Motor 2 is much cleaner than Box2DFlashAS3 and consequently will be easier to pick up (I suspect it will have a similar learning curve to FOAM). Another plus is that the source code is commented. The commenting isn't as comprehensive as APE or FOAM but it's still a vast improvement over Box2DFlashAS3.

On the down side we have no documentation outside the code. The demos are too simple to give us an idea of the engines potential and there is no roadmap to indicate what a full feature set will include.

In summary, I'd say that Motor 2 shows a lot of promise but that it's too early to make a call. I look forward to a more complete release so I can run a few tests and review these observations.


Paul Gibler said...

Motor2 has come a long way since you posted this blog entry. I think people should really give it a look as it gives you Box2D's feature set without all of the odd quirks of Box2DAS3.

geekglue said...

Thanks for the comment Paul. I totally agree. The research I based this post on is now well over a year old and the key Flash physics engines have moved on since then.