Chipmunk AS3 Port vs Box2D Flash

177 views
Skip to first unread message

Brainclog

unread,
Feb 16, 2008, 3:18:55 PM2/16/08
to glaze Engine
It is great to see any kind of open source physics for Flash, but I am
just wondering why there are so many different ones. I know you have
been on the Box2D forum a bit in the past, and are aware of the
existing Box2D Flash port. I'm just wondering what the reasons for the
decision to go with Chipmunk are vs improving the already established
Box2D Flash?

Especially once the new features in Box2D 2.0 are ported over to
Flash, it will have many more features than Chipmunk. So while the
careful attention to optimization for Flash is great, and I would love
to have that kind of speed, it is disappointing that I have to choose
between features (numerous joints, CCD, etc...) and speed. Unless I am
missing something, it seems like you could have saved a lot of work by
just doing a little optimizing of Box2D Flash for the AVM2.

In any case, different projects may require different things, so Glaze
could still be a very valuable project for many people. The #5 demo is
very impressive with over 500 bodies falling down the screen, and runs
completely smooth, even in the browser!

rje...@gmail.com

unread,
Feb 17, 2008, 5:51:59 AM2/17/08
to glaze Engine
Good questions. First I'd have to say everything in life is some kind
of compromise and this is one of them. I spend some time looking at
the original Box2D, the Flash version, also APE and FOAM. Each has
its plus and minus points. I like the simple, understandable design
of FOAM and APE, but really wanted stable stacking was put off but the
amount of code that I really didn't understand in Box2D. I'm not sure
if I could have got Box2D to be as fast as Glaze, if you want more
performance maybe you should look at Motor2. The thing with Glaze is
the shortness of the code path. At end of the day I wanted tot build
a physics engine from the ground up how I wanted it and this was the
result.

As for other features:
- Joints are being implemented. I already have a 2 working, there are
4 in total
- I'm working on 3 types of spring (damped spring already works)
- CCD, well my brain isnt really big enough for that one. Having said
that another forum member working on a 2D physics engine in D has
implemented GJK/EPA which could be back ported to the AS version.

Other features coming are raycasting and small fast moving objects
modeled on rays (e.g a bullet could be a small circle that acts as 2
parallel rays).

Any way thanks for the comment - if you have any other suggestions
then let me know here.
Reply all
Reply to author
Forward
0 new messages