The Yes, This Big Header Banner
Stickies
No stickies found.
Random Comment
Comment #1087
I am impressed at their thin product. But then again thin is the work. This is all they can come up with in a year? A sub par notebook that is thin and higher priced then anyone else? God I really hope he retires and hands his company
 

Quake 2 ported to html5

at 14:20 - 2nd, April 2010
interesting, html 5 allows code for building java based applications. this particular one is made using the same toolkit for gmail. actually i'll just let osnews explain it.

“GWTQuake” took Jake2, and run it through Google’s Web Toolkit (a framework and compiler for writing web apps in Java) to convert it to a collection of HTML5 Canvas / Audio / Video and JavaScript. Jake2 however relies upon various Java interfaces that are not present directly in GWT or the browser, for example the networking, keyboard and file IO. Joel had to implement new mappings to get the Java code to correspond to browser technologies. For example Java uses asynchronous IO, but JavaScript is event driven (onkeyup, onkeydown etc.). “Stefan Haustein contributed new JRE classes to implement Java NIO Buffers around WebGL's new typed javascript arrays, as well as a GL renderer based around WebGL.”

WebGL is an experimental technology to bring 3D to browsers using OpenGL ES, a cut-down version of OpenGL designed for embedded uses (The iPhone uses OpenGL ES 2.0 for its 3D API for example). Both Firefox and WebKit/Chrome nightlies currently support WebGL, but it may be some time before this technology reaches a release-ready state (the specification is still in flux, a draft was issued in December 2009).

WebGL revolves around the HTML5 Canvas element, which provides a rendering context that can be drawn into using JavaScript so that web pages may render images on a per-pixel basis. Canvas was originally invented by Apple for use in the widgets in the Dashboard feature as part of Mac OS X Tiger. The Canvas element has since been adopted and standardised by the HTML5 working group. Firefox, Safari, Chrome and Opera all support the Canvas element. It is not yet known if IE9 will support Canvas, despite committing to support for other HTML5 technologies like Video and Audio.

Another interesting HTML5 technology used is WebSockets. This gives the browser the ability to open a two-way TCP connection to a server for a communication channel. This is an improvement over AJAX, which is a synchronous request-response technology that has high latency, and much more robust than ‘Comet’, a hack to make AJAX behave more asynchronously. By using WebSockets, the web browser has the ability to channel data back and forth at high speeds and act more like a native application. In this case, GWTQuake uses WebSockets to provide networking between client and server so that GWTQuake can even be played multi-player! WebSockets, like WebGL are currently only supported on nightly versions of Safari/Chrome and Firefox.

Loading and saving of games in GWTQuake is done using HTML5’s Local Storage, it’s a key:value store for web apps to hold more data than what can be fitted into cookies. Google use this in their Mobile GMail web app for caching and offline access to data. Unlike cookies, the data is not sent to the server on each request and it persists after cookies are cleared. Therefore you don’t have to download or upload files to load and save your games in GWTQuake, you just open the URL and choose load from the menu!


curious how it looks? here's a video!



pretty snazzy stuff. whats next? sim tower? sim city 2000? abuse?
a lot of these older games would be great this way.

• Alex


 

Similar posts

How HTML 5 won
Interesting read on why HTML 5 won't kill flash even though it's more efficient and doesn'...
Gmail Motion
(media inside)

 
Make calls in Gmail
Gmail just came out with an option to make calls from pc to phone in Canada and the US for...

 
andrew andrew
News comment 1 | User comment 1363 | 10:04 - 6th, Apr 2010


how do we play?

Alex Alex
News comment 2 | User comment 4968 | 12:48 - 7th, Apr 2010



Join the conversation
Login.

U:
 
P:
Don't have a username? Register Now
Can't remeber your login? Find Password