In association with heise online

02 April 2010, 11:22

Quake II ported to use HTML5 technologies

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit


Zoom GWTQuake running locally at The H
Google developers have released GWTQuake, a version of the game Quake II ported to use HTML5 technologies such as WebGL, Audio, Canvas, WebSockets and Local Storage, created during the developers' "20% time". The H got a preview of GWTQuake at OSJam at Google's London Headquarters and took a look at the open source technology behind the browser-stretching creation.

The majority of the graphics are provided by WebGL rendering on a HTML5 canvas. WebGL allows 3D rendering with hardware acceleration to be driven from JavaScript code. The JavaScript code comes from Jake2, a Java-based version of the Quake code, after translation. The translation is handled by Google's GWT (Google Web Toolkit) software which, by design, converts Java code into JavaScript but is typically used to allow enterprise application developers to write web applications solely in Java.

GWTQuake is installed by downloading the source code and building the dedicated Java-based server. This server delivers the code to a browser when a user navigates to a page on it. The H built the code on the beta of Ubuntu 10.04 and found that it did indeed work, though there are a number of caveats. Most importantly, GWTQuake only supports two browsers: Chromium, the open source variant of Chrome, and Apple's WebKit.app, the development version of the Safari browser. This is because WebGL is a recent innovation only introduced last August.

According to the developers, WebKit has the performance edge for rendering the game as currently Chrome's sandboxing technology gets in the way, despite requiring "--no-sandbox" on the command line to disable a large part of it. In our testing with Chromium The H saw frame rates ranging anywhere from 30fps to 90fps being reported on an Intel i5 based system running Nvidia's proprietary drivers.

Unfortunately, we were unable to get the audio element of the port working, but the release is impressive for how relatively easy it is to build, even taking care of locating and downloading the needed graphic resources. One interesting problem for the developers to solve is the lack of an ability to trap the mouse cursor within the window. When the cursor moves out of the browser window, GWTQuake stops seeing mouse events and the user loses control until they move the pointer back into the window.

GWTQuake is likely to be an informal benchmark on how well future WebGL versions perform and how developers are handling the challenges of getting traditionally full screen applications working in the browser. Instructions on how to install the GPL2 licensed port are available at the project's page on Google Code and a video of GWTQuake running is also available.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-969764
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit