QuickB2 now released open-source!

I meant the demo wasn't something targeted for mobile devices. The library itself should be as usable for mobile devices as anything else in Flash...which is to say not very at this point, in my opinion. The next generation of mobile processors, combined with Adobe getting the player optimized should change all that. All said, I like to think that QuickB2 adds a very thin layer (performance-wise) to the Alchemy port.

The demo on the WCK page makes heavy use of vector graphics (as does mine). I think this is probably more of a reason for the slow performance than the engine itself.

The Alchemy port actually addresses both points you made about increasing engine performance. b2Fixture has flags, off by default, that set whether a contact is passed to your listener class in the first place. Also, it has a pool of reusable defs so you only instantiate one of each at start-up. As for other objects (b2Body's, etc.), most of their memory is handled in C++ land, not by the GC, so again you should see a reasonable boost in performance there.

QuickB2 incorporates all the Alchemy optimizations that I know of.

As a side note, I actually did make a simple android app with QuickB2. This was an early version of the library, and I didn't do any kind of optimization in the demo code, nor with the bitmaps (and sound is delayed), but here it is:

http://dougkoellmer.com/HelloAndroid.apk
Quote:
They're triangles connected with springy revolute joints.


Do you mean springy distance joints? I didn't think you could have springy revolute joints?!
b2RevoluteJoint doesn't have any spring parameters, but qb2RevoluteJoint does. QuickB2 is a complete wrapper of Box2D, so in this case qb2RevoluteJoint wraps b2RevoluteJoint and adds optional springiness plus a few other conveniences. Similarly, qb2PistonJoint wraps both b2LineJoint and b2Prismatic joint into one joint, and has options for linear springs.
dougk16 wrote:
The library itself should be as usable for mobile devices as anything else in Flash...which is to say not very at this point, in my opinion. The next generation of mobile processors, combined with Adobe getting the player optimized should change all that.

With the new AIR 2.5 for Android it has a new cacheAsBitmapMatrix AS3 command to use the phones GPU. Theres some vids on youtube of it, it can greatly increase performance. I think it would be possible to now have a pretty complex Flash game with physics and have it run at around 30FPS on current hardware.

http://www.youtube.com/watch?v=rvFjLtnx2F4
http://www.youtube.com/watch?v=mnyynpq-TXo

It would be great if you could try this out yourself. It might actually be possible to get your demos running at full framerate. I'd love to try it myself but you need Android 2.2 for AIR 2.5. And i have 2.1.
Considering rendering is the main bottleneck, that's definitely a step in the right direction. The molehill API (http://labs.adobe.com/technologies/flash/molehill/) will definitely make Flash more of a contender in the mobile world too.

I'm kinda waiting for FlashDevelop to have better Android/AIR integration before I invest more time in getting stuff working on my Nexus One. I managed to do the HelloAndroid app I posted further back, but too many hacks were involved. Hopefully they tackle that soon.

Thanks for letting me know about the cacheAsBitmapMatrix thing!
Two things:
1. I know that a zip is available on google code, but could you put the code in the SVN repository as well. Easier to browse the code this way.

2. FlashDevelop isn't available on the Mac (or at least not in a convenient form), so I cannot generate the API docs. Can you provide the API docs pre-generated in future builds?
1. Definitely a priority...I will get everything committed within the next week.

2. I didn't include them for that build because there were almost no doc tags written, though I'm realizing now they could have been useful anyway for seeing class relationships and whatnot. For next build I'll put 'em in there (also within the next week).

Thanks for your feedback.

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