X Gems of AS3 Language Design

Ok, so AS3 has its fair share of problems. It is slow, it has next to no support for templates/generics and somewhat sparse standard library. And yet still I love using it.

Why? It has managed to pull together some of the rarer features that I think every language should have. Language designers, take note of the following.

Continue reading

Release of Box2DFlash 2.1a

I’m releasing an alpha version of Box2D Flash 2.1. It’s got a shiny new website, too. It has may features that were lacking before, but you’ll have to discover most of them for yourself.

This move is prompted mainly by the announcement of Erin that Box2D 2.1 itself is going to be delayed for more features. Also, the wiki got wiped out, so documentation is at an all time low (frankly, I’m glad the wiki’s gone. I sunk much work into it, but it was still a useless reference source).

Code is still alpha quality, which means a) bugs, b) no guarantees for changes in syntax. The big stuff is out of the way though. If you find a bug, or have a complaint, please post it to the forum as a new thread starting, or the sourceforge issue tracker. Do not post it as a comment here. A comment amongst other comments is too easily lost.Bear in mind that I will almost certainly ask for a testbed demonstrating the bug.

BTW, I’m going away for a couple of days for TIGJam:UK, so don’t expect issues to be treated immediately.

Announcement on forums

Box2DAS3 back up to date

Yeah, so I finally caught up with Erin’s changes to the C++ version. It’s still not quite usable though – a few bugs remain to be found, not to mention the fact patches of functionality are missing or broken. I’ll be putting up a preview version soonish, though.

I also spent 10 minutes cutting out one of the more flagrant ways the engine creates too many objects (instead of re-using objects internally).

I measure the average benchmark time (using the newly created benchmark program) has decreased from 1537ms to 1378ms. That’s 10% faster (as a rough estimate). Not too shabby for just one quick change. I’ve attached the benchmark reports.

Performance of the engine doesn’t really excite me though (this is FLASH we’re talking about). But it seems the done thing in dev blogs, which this is rapidly turning into.

Attachments

before

after

More Box2DAS3 v2.1a Progress

Ok, the first revision (r52) of Box2DAS3 for the next version is available now on SVN. Phew, that was a lot of work.

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 (the casual Box2D user) 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 on the forum, 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.

Please comment on the forums

ASDoc Enhancements

I’ve not posted for a while, but that doesn’t mean I’ve not been doing anything. Generally less visible stuff (yes, some porting), but I have converted Box2DFlashAS3 to use ASDoc to generate beautiful documentation.
The results are available here. For lack of a better place, this will be their permanent home, and I’ll try to keep them updated to the latest revision.

I’ve put in a few customizations to the standard ASDoc template, that I’m going to share here, as they are generally useful. You will need to customize the files a bit for your own project, though.

Continue reading

Control MediaMonkey From Launchy

You ever want a Lauchy command to control MediaMonkey? Well now you got it. Just download the attached zip, and extract it somewhere Launchy can see .lnk files (like the default Utilities folder, e.g.). The same files work for Winamp, just change the names to something more appropriate.

The trick is an obscure little utility I found called CLAMP, that does all the heavy lifting for me. I also used a trick I picked up somewhere to allow .lnk (shortcut) files, with relative references, by prepending your link with “%windir%\system32\cmd.exe /c “.

By the way, I don’t actually use this myself any more. I prefer MediaMonkey’s feature that you enable mouse gestures on the systray icon, which is much more convenient for me and my wireless mouse.

Attachements

MediaMonkey Control