Re:Angry Birds' Cross-compiled Java Versus Native JavaScript
by mcdaid on Wednesday May 25, 2011 @04:39AM
(#2583347)
I was blown away by the google IO session. The idea of writing a game in Java and then having it converted to multiple formats, javascript/canvas/webgl, flash, android.
Quite amazing!
If they could add conversion to run on apple devices then this could well be a glimpse of the future.
Re:Angry Birds' Cross-compiled Java Versus Native JavaScript
by ZoFreX on Wednesday May 25, 2011 @04:13AM
(#2583305)
If you read the article it wasn't compiled with GWT, but with "ForPlay" which can cross-compile the game written in Java to desktop Java, webapp (via GWT), Android or Flash.
Re:Angry Birds' Cross-compiled Java Versus Native JavaScript
by nl on Wednesday May 25, 2011 @11:19AM
(#2584253)
Actually, I think forplay would be best characterized as a specialized library, dependent on GWT, with other backend compilers that also depend on GWT.
Re:Angry Birds' Cross-compiled Java Versus Native JavaScript
by DanielRibeiro on Wednesday May 25, 2011 @11:03AM
(#2584185)
If only GWT compiled any JVM bytecode code, and we would be able to use other languages like Scala, Mirah, Groovy, and so on (would be fun to run languages with thick runtimes as well, like Clojure and JRuby, but then the LLVM in Javascript seems more promising).
Quite amazing!
If they could add conversion to run on apple devices then this could well be a glimpse of the future.
Target Flex, Android, iOS, maemo... in a visual "block" environment.
I haven't tried it myself, but could be useful for you. It's available in the ubuntu software centre as well.
GWT compiles to "native JavaScript". There is no "versus" to be found - using GWT is just one development tool/style.
It would be better to tell people to explore the Google IO session videos. All the information is there, in a form that is actually informative.
See, for example the instructions: http://code.google.com/p/forplay/wiki/GettingStarted (note how it's the GWT toolchain)
Issues like https://code.google.com/p/forplay/issues/detail?id=12 show how the GWT is used to build the Flash version
Still not convinced?
flash.gwt package: https://code.google.com/p/forplay/source/browse/#svn%2Ftrunk...
or
https://code.google.com/p/forplay/source/browse/trunk/core/s... uses om.google.gwt.core.client.JavaScriptObject
same class: private native String get(JavaScriptObject data, String key) /-{ // TODO Auto-generated method stub return data[key]; }-/;
(Note the GWT convention for "native" code to be used by the Javascript/Actionscript runtime)
Edit: also Joel Webber & Ray Cromwell are both on the GWT team at Google so it makes sense they'd use that toolchain.