Porting a HTML5 game: 6 platforms, 1 codebase.
blog.greweb.fr
blog.greweb.fr
edit: ah, missed the internal link - it's explained in more detail: http://blog.greweb.fr/2011/06/automating-web-app-development...
[1] http://www.phoboslab.org/log/2011/04/ios-and-javascript-for-...
I have heard so many times friends/colleagues dreaming of apps which you write once and deploy it on everything. Can we please put a stop to these stories and take the time to build quality games, rather that get rich quick fart apps?
Funny that you should mention physics engines and sprites...have you ever played the Chrome version of Angry Birds? Sure, maybe it's a simple game, but it's hardly a get rich quick fart app.
Are you aware that though it's ultimately a Javascript app, it was built using the Forplay framework (http://code.google.com/p/forplay/), which includes a (very slightly modified) version of JBox2d (the Java port of Box2d) for physics, compiled down to JS through GWT? See http://code.google.com/p/forplay/source/browse/#svn%2Ftrunk%... - that's almost exactly the JBox2d trunk, with a few modifications because of a couple of things that GWT doesn't allow (reflection, for instance).
I assure you, we did not have GWT in mind when porting Box2d to Java, so there are no special optimizations for it or anything, we've always just targeted pure Java - GWT didn't even exist at the time, and even once it showed up, I was so convinced that it could never run fast enough for physics that I didn't even bother to try. You can see the results yourself, most of the demos (other than the stress tests, which are supposed to be slow) run quite well for me on recent versions of Chrome, Safari, and FF: http://gwtbox2d.appspot.com/
I highly respect GWT, but it's far from smooth on my mobile.
But for iPhone / iPad, that's not the case, animations work better than Canvas, I have to try a DOM solution to increase these performance :)