4 ms·
Angry Birds' Cross-compiled Java Versus Native JavaScript
- mcdaid 15y agoI 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.
- freakwit 15y agoIllumination Software Creator: http://radicalbreeze.com/ http://radicalbreeze.com/ 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.
- nl 15y agoThis is a stupid article title as it makes it sound like it is Java vs JavaScript. 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.
- ZoFreX 15y agoIf 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.
- nl 15y agoActually, I think forplay would be best characterized as a specialized library, dependent on GWT, with other backend compilers that also depend on GWT. See, for example the instructions: http://code.google.com/p/forplay/wiki/GettingStarted 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 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%2Fcore%2Fsrc%2Fflash%2Fgwt https://code.google.com/p/forplay/source/browse/#svn%2Ftrunk... or https://code.google.com/p/forplay/source/browse/trunk/core/src/forplay/flash/FlashStorage.java 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.
- DanielRibeiro 15y agoIf 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).
- sjs 15y agoQuick, someone run it through the Java -> JavaScript transpiler. We can go deeper.