By first look, it is a soft body engine
It is possible to customize the render, I mean applying the shape morphing to MC or images?
And will it be possible someday it will be intergrated into main box2d engine?
Anything, thanks for puting it open source
Soft bodies are just one of the many conveniences. However, it's still mainly a rigid-body engine.
You can override qb2SoftPoly::draw() and do whatever kind of rendering you want. For example, you can take the vertices of the poly every frame and use them to texture-map a bitmap.
QuickB2 sits on top of Box2D. It's meant to simplify certain tasks and provide a more friendly API for Flash Developers, so no I don't imagine anything will be integrated downwards.
Thanks for looking.
For the soft body stuff, are you just changing the polygon vertices of a living in-world b2PolygonShape? And then on top of that have a spring system set up between the vertices?
That's actually a very clever solution! I like it. It kind of bothers me how the triangles can stab out the other side of the polygon, but it seems to not be a problem in the demos.
Heh yea, I think the smooth-edge rendering tricks the eye a little. Also, situations where the triangles are poking out the other side generally mean that high enough forces/velocities are involved that you don't notice the discrepancy amongst the relative chaos.
If it were a problem though, I think you can stitch the inner corners of a few of the triangles together with linear springs for more reinforcement.
I am going to evaluate the code this coming week to see if I can put it to use in any new projects.
Oh, there is one issue with that demo swf. It never loads on my Droid 2. I think this is because it's a raw swf and not embedded in an html page... but I can't know for sure. (Maybe it is something else)
Ha, well the demo's not exactly targeted for mobile devices, but I just loaded it up on my Nexus One and it worked fine. Surprised it ran as fast as it did actually. Had problems using the GUI though...buttons weren't very responsive.
The fact that you're using the Alchemy version of the engine gives hope that it might be useful in mobile AIR applications, so it's definitely something I'd suggest you think about...
I haven't used the alchemy version of b2, but in looking at the sample page for the WCK I know that even it has performance issues on my phone. The main problem with it is that I *know* there are certain things that I always have to do to box2d to get the performance up in Flash (object pooling, giving the option to be discriminating about even *reporting* collisions to a listener, etc) and I'm concerned that I wouldn't be able to make those modifications to the alchemy version.