Blog‎ > ‎

Kick-Ass Game programming with Google Web Toolkit

posted Apr 4, 2012, 3:48 PM by Unknown user   [ updated Apr 4, 2012, 3:53 PM ]

Google I/O 2011: Kick-Ass Game Programming with Google Web Toolkit summary

By Basilio German

Kick-Ass game programming

Ray Cromwell and Philip Rogers present themselves as members of the Google Web Toolkit Team. Kick-ass games are different to the common hobby curiosities like html5 toys, they are real games that will be fun to play and people will be willing to pay for them. Just by programming with GWT (Google Web Toolkit) your productivity and speed will be boosted and that is already kick-ass. There was a port of Quake 2 to GWT but people wanted to see recent games on the GWT, so they presented Angry Birds. This game has an intense physics engine which means that there are many calculations to make in real-time which can be limited in a browser game, but thanks to GWT the browser can take advantage of all the hardware on your computer so that the game runs really smooth.

Why should we use GWT?

GWT will boost your capabilities because it has leverage familiar to the java tool chain, (debugger, IDE, Libraries, etc.), you can share code between client, server, and other platforms, and it will produce small and fast JavaScript and HTML5. As an example of leverage, they state that Box2D, which is a physics engine in 2 dimensions, was ported from C++ to java and the guys at Google managed to use it effectively with GWT, and it was really fast.

The GWT compiler optimizes code for size, it can remove unused code, evaluates code at compile time when available, it inlines functions, it heavily obfuscates the result. As a result, smaller code loads faster and is easier to transfer from the server to the clients.

GWT uses the best technology based on the browser you are using; it can use WebGL, CSS3, Flash, and many other ways of using your computer’s hardware at its best.

They then talk about ForPlay, which is one of the best parts of the GWT, which is the core of how the games are built, Forplay is now PlayN, and the official site can be found here.

They later present a demo game which can be played here, go ahead and try it out, the source can be found here too. Right now the flash part is not running well because they are in need of people to manage that part. Remember everything is in a early stage so things might change a little in the future.

The game "Peas" in action

The demo game "Peas" using PlayN

Whats even more amazing, is that you can use your game in an android platform or upload your game to the chrome store almost immediately in very few steps. Right now I am trying out PlayN and configuring it. As soon as I get my hands on the programming I will surely take advantage of this great Tool, and you should too!!!