Dart Does Physics - Just To Prove It Can!
Thursday, 12 January 2012

Google has ported the Box2D physics engine to its new language, Dart.

Is it really proof of life for Dart?

One of the difficulties in getting a new computer language accepted by a wider audience is that there is doubt that it is real. Is it a toy language that just proves a concept or can it do real work?

 

googledart

 

In the case of Dart, which is Google's replacement for JavaScript, the development is speeding ahead at a rate that is impressive but worrying. To prove that Dart is already a language that can be used, we now have a port of the well known 2D physics engine Box2D to Dart.

This is a little odd because there is already a port of Box2D to JavaScript and this runs fast enough to be used for real applications. Dart if you recall compiles to JavaScript so we essentially have another JavaScript Box2D to compare.

 

box2dcage

 

The "Make the Web Faster" team has ported Box2D from the Java version. The original was written in C++ but it has been ported to Java, C#, Python, JavaScript and Flash and now to Dart. The suggestion is that, as well as being a proof that Dart is a real language, it opens the way to Dart becoming a real force in games programming on the web. After all Box2D is behind many a popular game, including Angry Birds so it is indeed a first step.

The current version can manage a creditable 60fps in most of the demos.There are some benchmarks, but none that compare its speed to a native JavaScript port on the same browser/machine.

Interestingly, the demos only work out of the box on Chrome - I failed to get any of them working under the latest Firefox or IE9. Let us know if you succeed.

At the moment the code is a first port and there are lots of features of the Dart language it doesn't make use of. The team hopes to improve it in the coming months and make it more Dart-like.

 

More Information

Online demos

Blog Post

Code

Further Reading

JavaScript Is Slow 

Google starts to detail Dart

Google spawns yet another language - Dart

 

blog comments powered by Disqus

 

To be informed about new articles on I Programmer, subscribe to the RSS feed, follow us on Google+, Twitter, Linkedin or Facebook or sign up for our weekly newsletter.

 

Banner


Mozilla Labs Closed And Nobody Noticed
17/09/2014

A blog post by Ian Bickling conveyed the news that mozilla Labs has closed. A big and disturbing event for web development. But this happened months ago and this is the first we had heard about it.



Twitter Mobile Developer Conference
15/09/2014

Twitter as scheduled its first annual mobile developer conference. Called Twitter Flight, the event takes place in San Francisco and the cost per delegate is just $140.


More News

Last Updated ( Thursday, 12 January 2012 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.