GWT / ForPlay

I just saw this video http://www.youtube.com/watch?v=F_sbusEUz5w
Some folks at google developed a new game library that can be used to write java games/javascript games or flash games - all in Java.
It looks very promising.
Look e.g. at “angry birds”
http://chrome.angrybirds.com/

It was written in Java with GWT and the ForPlay game library. But it was compiled to javascript so it doesn’t need a java plugin to run.
So i was wondering if you think this is a good alternative to Java applets?
ForPlay is still alpha but it seems to work well, judging from that game.

It isn’t really comparable to the power of real Java and OpenGL. It may be useful for relatively simple games, and plenty of those can be great fun (see NES, SNES).

IMO, writing Java that compiles to JavaScript isn’t a good idea in general. Good for them for getting something to work, but I personally don’t want so much “magic” under the covers.

I watched the entire youtube vid (all 45 minutes :o), and I must say ForPlay looks like an interesting project.
The most compelling part (to me) is the Java-to-ActionScript compiler. If they nail the performance issue, then this may be a viable way for a Java developer to deploy casual games to Flash sites like Kongregate or Newgrounds, with almost no extra work.

There are a lot of real, working examples that demonstrate that using GWT is a good idea. You’re certainly entitled to your own personal preferences but saying that it’s a bad idea, because you don’t like it, isn’t very compelling.

Disclaimer: I’m a member of the GWT team, and these are my own personal views - not Google’s.

[quote=“rreyelts,post:4,topic:36762”]
Good thing I don’t feel the need to compel anyone. Use whatever you want, just don’t force it on me. :slight_smile:

I understand your reaction but I agree with Nate, I have my own reasons… GWT compiles Java to JavaScript in a way that can cause small annoying differences in the way of handling double and float numbers, some other differences may be problematic. It is possible to use GWT with WebGL to access OpenGL in JavaScript and by writing Java source code but WebGL won’t be supported by MSIE. JavaScript performances have been improved for years but the nature of this language drives impossible some optimizations possible in Java (JavaScript is dynamically typed unlike Java); it means that in performance-critical projects, using Java is a better idea.

To conclude, in my humble opinion, using GWT in games not requiring hardware acceleration is a viable solution whereas using GWT & WebGL in games is a noticeably less cross-platform (no MSIE support), slower (JavaScript performances) and less reliable (WebGL has some security flaws) solution than using Java with any Java binding to OpenGL. JOGL 2.0 RC3 will support Android and already supports Linux (Maemo, Meego, etc…) smartphones, using it allows to support a large set of platforms with excellent performances.

It looks really cool. I think that ForPlay will fit in well for many Java devs.

My AllBinary Platform support J2ME, Android, J2SE, and I think adding HTML5 and ActionScript using ForPlay or another tool I am looking at would be great.