Box2DFlash 2.1 Progress - Updated 20090930

I don't see any compelling reason to keep them, it's just that I might try if it's not too much work.
Other reasons I can see:
  • It's good to have vocabulary for edges. People are just tightening up convex decomposition, and it would be a valuable gain if this stuff worked nicely with the engine.
  • You could skip checking the edges of edges (i.e. corners), in the case of convex objects vs concave corners.
  • Little worried about raycast leaking - or more accurately, avoiding compensating against leaks by over extending edges.
  • Mass calculations - looped edge chains can still have a well defined interior mass (and other properties like TestPoint working). Try it with the buoyancy controller.
BorisTheBrave wrote:
You could skip checking the edges of edges (i.e. corners), in the case of convex objects vs concave corners.


I've seen this fail. Think of a box pressed into a corner slightly. There will not be sufficient contact points to support the box under gravity.

BorisTheBrave wrote:
Little worried about raycast leaking - or more accurately, avoiding compensating against leaks by over extending edges.


If this comes up, I can modify the polygon ray caster to automagically extend edges a tiny amount. I've seen this work well in practice.
How far are you in porting the code? and more importantly; is the source control public?

I would like to see the implementations and what changes you make compared to the original source code.
I will not release any code until I have something compilable, as I am going file by file rather than revision by revision. It'll be posted to sourceforge then, under the same zlib license as before, and I'll then start working on actual flash specific changes discussed, which will be relatively quick, and resuming by-revision porting.

I've made some progress, but it is slow work. I'm going on holiday for a week now, too. I wouldn't particularly wait for it, I've only started so that the release date isn't unreasonably far after Box2D 2.1 is released by Erin. Still not convinced it's worth it at all given Mayobutter's Alchemy port is already working pretty great.
Ok, the first version is available now. Phew.

Lots of stuff doesn't work, but the reduced testbed ought to compile and run.

Notes:
The old SAP broadphase works, as well as Dynamic Tree.
It's 3-4x slower than the old version! It's because I replaced some of the old optimizations with newer more naive code. It'll improve over time as we re-inline stuff and so on.

What should you do now:
  • Still nothing. It'll still be some time for the port to catch up with C++, and get cleaned up. And there's the performance issue. I wouldn't recommend moving unless you have an essential reason, or have a project that you are keeping continuously up to date.
  • I'll be accepting patches now to lighten the work load, if anyone at all is keen. Post them here, preferably declaring your intentions in advance. All patches must be under submitted under the same zlib license. They must be actual patch (diff) files. Updating the testbed examples would be a good excercise for someone keen to try out the new API.
Your work is underappreciated Boris!

Kudos++
Hi guys,

I just saw Boris post about the progress and checked mayobutters alchemy version. I stripped his demo of most of the graphics and the dynamic frame rate. I think it's really really fast! You can check it here http://dl.getdropbox.com/u/2236912/flash/wck_achemy_demo.zip.

Box2D is awesome! WCK is awesome!

cheers,
mark

Original thread: https://box2d.org/forum/viewtopic.php?t=3633