Announcing DartBox2D

Wednesday, January 11, 2012 | 10:00 AM

Labels: , , , ,


Today, we’d like to announce the release of DartBox2D, a port of the wildly successful Box2D physics engine to Dart, Google’s new language for the web.


Box2D has been ported to other languages, including JavaScript, but this release opens the door to Dart becoming a language for games on the web, which, as we all know, is what the web is really for (that and pictures of cats, of course). The work was started by two interns at Google, Greg Bigelow and Ahmed Hussein, continued by Joel Webber, and finished up by Dominic Hamon.


DartBox2D is a straight port from the Java version and isn’t yet using all of the great features the Dart developers have built into Dart, but moving forward it will become a template for how to write great Dart code. The ease with which this port was developed speaks to the great job the Dart team have done with the language.

As developers, we’re always wary of premature optimization even when working on a codebase like this one where performance is a key feature. Fortunately, it is already performing well with almost all of the included demos hitting a solid 60 FPS, though optimization efforts are a large part of the ongoing work on the project. You can see for yourself by viewing the demos and more in-depth benchmark results.

All feedback is more than welcome, and you can discuss the project either by joining the dartbox2d-discuss Google Group or the #dartbox2d IRC channel on FreeNode.

By Dominic Hamon, Google, Make the Web Faster team

7 comments:

Dzenan Ridjanovic said...

Great job!

Sam Croset said...

Neat! Any future plans for this library? The community around the JS version is already rather small.

Or is there any plans from the Dart Team to release a (native) physics library?

Could be the selling point of Dart.

Finally, question to the authors: Any particular difficulties to port the Java one in Dart?

Sam Croset said...

This comment has been removed by the author.

Andrey Mironov said...

DominoTower demo shows 3-8 fps.

RCabanier said...

Any reason you're using canvas and not SVG?
It will speed up drawing of many elements since you won't constantly have to rerender using script.

Fabio Krauss Stabel said...

Cool! This one runs on linux, right? Its annoying having to switch to windows to play games hehe... Cant wait to try it!
Thanks

"Luke" D. said...

they all got around 60fps, but the DominoTower got between 1 and 6 fps. I guess that is to be expected given the amount of domino.