Google Engineers Recreate Quake II In HTML5 - InformationWeek

InformationWeek is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

IoT
IoT
Software // Operating Systems
News
4/2/2010
02:14 PM
Connect Directly
LinkedIn
Twitter
RSS
E-Mail
50%
50%

Google Engineers Recreate Quake II In HTML5

The project demonstrates progress being made to support high-performance graphics in Web applications.

While Apple's decision to exclude Flash technology from its iPad may have content creators fretting about the lack of designer-friendly HTML5 authoring tools, the company's ally-turned-rival, Google, has proven at least that HTML5 Web apps are capable of delivering computationally demanding graphics.

In a blog post on Thursday -- one of the few that day from Google that wasn't an April Fool's joke -- developer programs engineer Chris Ramsdale revealed the existence of an HTML5 port of id Software's Quake II engine. It's the product of Google's 20% time policy, which allows Google engineers to spend 1/5 of their work hours on projects outside the scope of their formal job descriptions.

The code -- which must be built and installed before it will run -- re-creates Quake II in a Web browser, either Google Chrome or Apple Safari. This may seem redundant, given that one can already play Quake Live, which relies on the id Tech 3 engine derived from Quake III, in a Web browser.

But Quake Live requires a graphics rendering plug-in. Requiring users to install a plug-in is widely regarded as undesirable because it can limit product adoption. Flash, having become ubiquitous over the years, represents an exception to this rule, or at least it did until Apple intervened.

Google's Quake II port does not require a plug-in. It utilizes WebGL, the Canvas API, HTML 5 <audio> elements, the local storage API, and WebSockets -- all part of the evolving HTML5 specification -- to run in unmodified versions of Chrome or 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," Ramsdale writes. "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)!"

Project contributor Ray Cromwell, CTO and co-founder of Timefire, says that the project demonstrates that Web browsers are capable of running sophisticated graphics.

"For years, people have assumed the browser was a poor platform for this kind of thing, and that you'd need something like Flash, Silverlight, JavaFX, or native code," he said in a blog post. "While it is true that you should not expect the browser to rival triple-A titles like Far Cry or Call of Duty in the browser, there is no reason why lots of casual games that used to be implemented in Flash, or are now implemented in Objective-C on the iPhone/iPad can't be done using similar techniques we've used."

Cromwell reported getting frame rates of 20-25fps using Google Chrome on a MacBook and about 45fps on a Mac Pro desktop. Another project contributor reported seeing frame rates of up to 60fps on his Linux notebook, he said.

Further improvements can be expected as WebGL gains hardware acceleration capabilities, as part of an effort backed by the Khronos Group.

Cromwell said he will be presenting a postmortem of the project at one of his Google IO sessions in May.

We welcome your comments on this topic on our social media channels, or [contact us directly] with questions about the site.
Comment  | 
Print  | 
More Insights
InformationWeek Is Getting an Upgrade!

Find out more about our plans to improve the look, functionality, and performance of the InformationWeek site in the coming months.

Commentary
New Storage Trends Promise to Help Enterprises Handle a Data Avalanche
John Edwards, Technology Journalist & Author,  4/1/2021
Slideshows
11 Things IT Professionals Wish They Knew Earlier in Their Careers
Lisa Morgan, Freelance Writer,  4/6/2021
Commentary
How to Submit a Column to InformationWeek
InformationWeek Staff 4/9/2021
White Papers
Register for InformationWeek Newsletters
Video
Current Issue
Successful Strategies for Digital Transformation
Download this report to learn about the latest technologies and best practices or ensuring a successful transition from outdated business transformation tactics.
Slideshows
Flash Poll