The 2D physics engine is now available to Dart developers

Jan 11, 2012 23:21 GMT  ·  By

Google isn't talking that often about its new "language for the web" Dart, but it's working on it just the same. It's facing quite a challenge trying to upheave JavaScript as the default scripting/programming language for the web.

As such, it's trying to demonstrate what Dart brings new in a way developers will understand, actual code.

It is now showcasing a port of the Box2D physics engine to Dart, done by several Google engineers.

"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," Dominic Hamon, from Google's Make the Web Faster team, wrote.

"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," he said.

"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," he continued.

The port has been completed and it is fully working, though there is still plenty of optimization to be done. Still, Google says that the performance is on par already.

What's more, the port doesn't rely on any specific Dart feature or enhancement since the work so far has focused on making it run with Dart.

Google has put up some demos to showcase what the port can do and even some benchmark results. If you're interested in the project you can join the conversation over at Google Groups.