Google sets out to prove HTML5 can be used as a gaming platform as well

Apr 2, 2010 08:54 GMT  ·  By

HTLM5 is heralded by many as the savior of the open Internet and the destroyer of the evils of Adobe and its Flash platform. Perhaps some people are taking things to the extreme, but one thing's for sure, the proposed HTML5 standard is shaping up quite well. In the video department, one of Flash's major markets, the open standard is looking solid even if some implementations aren't on par yet. But what about games, another strong point of the Flash platform? Google has set out to prove that HTML5 can not only match Flash, but it can leave it in the dust in some cases.

"The new crop of HTML5 web browsers are capable of some pretty amazing things, and several of our engineers decided to take some 20% time to see how far we could push them. The result? An HTML5 port of Id's Quake II game engine!," Google's Chris Ramsdale proudly announced the achievement on the Google Web Toolkit blog.

And you have to admit that the results are quite impressive, Quake 2 running in a browser, at 30 fps no less, using just HTML5. The code to Id's Quake 2 graphics engine was released as open source a few years back, Id is one of the few gaming companies that regularly do this, and it has given birth to countless projects since.

The Google engineers started out with one of these existing projects, namely the Jake 2 Java port, as it was the easiest to convert for their needs. They then worked some magic with their very own Google Web Toolkit and, voilà, Quake 2 running in Safari.

"We started with the existing Jake2 Java port of the Quake II engine, then used the Google Web Toolkit (along with WebGL, WebSockets, and a lot of refactoring) to cross-compile it into Javascript. You can see the results in the video above -- we were honestly a bit surprised when we saw it pushing over 30 frames per second on our laptops (your mileage may vary)!," the Google engineer added.

The real unsung hero here is WebGL, a proposed 3D graphics standard for the web that is currently in very active development. The technology, though far from mature, is already very promising. Most modern browsers support it in one way or another, Webkit browsers (Google Chrome and Apple Safari) do and so does Mozilla in Firefox.