Google Gets Quake II Running In HTML5
Dr Herbert West writes "A trio of Google engineers have ported id Software's gib-filled first-person shooter Quake II to browsers — you know, for kicks — as a way to show just what HTML5-compatible web browsers are capable of. According to the developers, '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.' More details are available on one developer's blog, and installation instructions have been posted as well."
This is really cool and awesome, but why would I wan't to run this on my browser?
If this is so cool as described, why do I need installation instructions? Shouldn't it just run in Chrome or Safari?
Now it's time to go RTFA.
we were honestly a bit surprised when we saw it pushing over 30 frames per second on our laptops
Holy shit! Quake II hasn't seem frame rates like that since the 486! No matter how fast computers get programmers will always find a way to slow down their programs.
Capable of further dragging us down as we fall into ever more inefficient programming paradigms.
Lovely.
From the project FAQ:
We are as yet unable to provide a public demo link. The Quake II code is GPL licensed, but the demo resources (textures, models, sounds, et al) are not, so we cannot simply upload them to a server. We are pursuing legitimate avenues to do so, though -- stay tuned.
Is this a demonstration of how far browser tech is now, or how far browser games are behind on native application?
The most recent Jake2 release was comparable and faster in some situations than the native C version.
I wonder how the javascript version stacks up to the Java and C versions.
Mod me down, my New Earth Global Warmingist friends!
Try http://www.bytonic.de/html/jake2_webstart.html
Or an applet version: http://download.java.net/javadesktop/plugin2/jake2/
Mod me down, my New Earth Global Warmingist friends!
The purpose of something like this is to push the boundaries of what can be done in web development as a means of determining where it falls short, and what needs to be done to allow efficient practical applications in the future.
Since I can already play QuakeLive in a browser, I probably won't get too excited about Q2.
This is what Quake Live should have been!
It doesn't count if it can't play Doom
Does it run Crysis?
'We are trying to prove ourselves wrong as quickly as possible, because only in that way can we find progress.' RPF
No you can't. QuakeLive requires a "browser plugin" which defeats the whole point of playing in a browser. You don't get any of the advantages, like sandboxing, cross-platform, or no installation required.
This article is about running Quake in a browser, which is pretty dang cool, if not really practical. Also, it's not really about Quake or FPS so much as HTML5.
Urban Terror was a good suggestion. They probably could have gotten permission to distribute it if they asked. I would have suggested OpenQuartz, which is GPL. It's only half a level, but that's plenty for a demo.
The thing that is killing my old iBook G4 are the bloody Flash games that my wife wants to run on it. The thing is still perfectly capable of doing most stuff but Flash is such a resource hog and the OS X version of Flash so poorly optimised, especially since they released Flash 10 for Mac which made the PPC performance much worse. I'm tempted to get an iPad but the lack of Flash would upset her indoors but I think lack of Flash is a bonus. Anyway, if all these Flash game writers started porting over to HTML5 once it is finalised then the lack of Flash will not be an issue. Oh, and Steve Jobs will have done us all a great service in releasing the iPad without Flash and ending it's tyrannical reign.
"I have the attention span of a strobe lit goldfish, please get to the point quickly!"
Yes, considerably: http://en.wikipedia.org/wiki/Java_version_history
Mod me down, my New Earth Global Warmingist friends!
I wonder if a browser game like this would work if you saved the page for offline access.
It may be hard to understand the significance of this if you are not immersed in the hell that is web front-end engineering. Javascript in isolation is not as bad a language as people make it out to be, but supporting common browsers and fixing all bugs as you're writing it is terrible. It is an incredibly hostile development environment.
The dream, from a developer's perspective, is this: In 3-5 years (this is the dream part given how fast the web changes), Javascript is an assembly language. You don't write it unless you really need to dig down to the "bare metal" of the browser itself. You compile to it from your language of choice. Your compiler spits out Javascript and any HTML/CSS containers required to skin your app and allow it to render in the browser. Your application can be linked to and run directly in the browser with no Flash, no Unity3d, no JavaFX, no plugins or installation required.
That no plugins are required is incredibly significant from the perspective of a company trying to distribute a product to as many people as they can, as cheaply as they can. Losing 20% of potential users because you required an installation of them is unacceptable--this increases your marketing costs by at least 25% and dampens the spread of your application via word of mouth, email, Facebook sharing, or whatever viral channels you happen to be using. This is why new 3D browser plugins are not succeeding. Unless it's Flash, no one has the plugin you need and you can't get them to install it reliably enough.
As someone who is frequently made miserable by having to support stupid browser oddities, I would kill to be able to write an application in Python, C#, or Java and know that I can compile to a package supported by >90% of people on the web. Yes, running complex stuff in Javascript is slow. But as seen in Chrome and Firefox, it's getting faster. Much like writing in assembly versus higher-level languages, writing Javascript directly will always be faster than compiling from another language. But at what cost to your time and sanity?
In 2010, my real options for rich content on the web are (1) Javascript/Browser Support Hell and (2) write a Flash application instead. That #1 is so miserable is one of many reasons for Flash's continuing success. The dream shown by this demo and others is that we will get a real Option 3.
There's GOT to be some good levels, characters, weapons available under Creative Commons. How about stealing some from OpenArena?
I hold very few opinions. I hold information based on observation and fact. If you wish to disagree, please use facts.
...and Sergey asked of them: "What is that you have so much of on your hands?" and in unison and with a great shout they cried out "TIME!". And Sergey said to them: "You shall take the shootem, not from the land of ego, but from the land of id, and you shall polish it till it shines on the chrome, and you shall take it on safari, and you shall make it follow the law of web compliance. And they went to the land of id which was the place of doom, and took it with them and fit it to the chrome, and took it on safari and they even had the firey fox following after them, for even the fox sought compliance under the web law. But there was no exploder in their midst, for they were not seekers of the web law but kept to their own and wouldn't listen to any other. And they showed it the the netizens present at the dotted slash, and they said behold, look what the Googlers have done with the doom from the land of id, and they marveled at it and karma was burned and even from Soviet Russia they were proclaimed as new overlords.
Javascript != Java. That link if for the Java version, not the HTML5 version which is the current topic.
The iPad doesn't support Flash, but it does support HTML5 , so we can totally Quake II on the iPad... because you know we can... and have lots of money and free time.
I am rich
I deserv it
I am good,
healthy &
successful
Can anyone confirm that this would work on the iPad? I mean, any HTML5 compliant browser should be able to run this shouldn't it? The iPhone/ITouch? (Granted a slide show) .. Just curious.
the age old question of how does it apply in practice: "COOL! But how do I game on it?"
yeah but the Java version is basically the same thing according TFA and it works now in 95%+ of peoples browsers AND its an order of magnitude faster.
Mod me down, my New Earth Global Warmingist friends!
Yes, the original blog post was, in fact, posted on April 1.
Check out my sci-fi/humor trilogy at PatriotsBooks.
The vast majority of the items apply just as much today.
Mono does this for one.
Not really. A nice chunk of the .NET platform isn't implemented yet in Mono (unimplemented exceptions) and a sizeable part of that will never be implemented due to manpower and patent reasons. In addition, Microsoft's .NET platform is not open source and Mono is not the same thing (see last sentence).
I think Mono is a good thing but it's not even close to supporting the type of WORA support that Java enjoys today. Write Once, Debug Everywhere used to be the joke about Java but today WORA has really come true there. Hopefully, one day Mono with get there but I doubt it will because it's not in Microsoft interest.
Sun and Oracle actually work with the open source community, Microsoft attempts to subvert it wherever it can.
Mod me down, my New Earth Global Warmingist friends!
(Primarily a .NET developer myself)
No nullable primitive types.
They have them for primitive types, actually, and had for ages - java.lang.Integer for int etc.
Since Java, unlike .NET, doesn't have user-defined value types, they didn't need to come up with an extensible scheme to derive a nullable type from any random value type. And for a fixed set of primitive types, it's easier to just hardcode the reference type wrappers.
Not sure if you can use a string for a switch statement
You can't. There are some plans for Java 7, apparently.
Do you have attributes? Instead of the ugly getters and setters?
If you mean "properties", then no, they don't have them.
If you mean "attributes" in the .NET meaning of the word, then they have them in form of @Annotations.
What about nice nestable master pages?
It's a library issue, not a language issue. And it's not even the core library.
Besides, have you seen how many web frameworks there are out there for Java?
Reason #2: Standard Library Source Code Availability - Java source code for the core libraries are available in every J2SDK distribution, .NET sources can only be seen by resorting to illegal means
Actually, .NET sources have been available for close to 2 years now, for debugging and exploration purposes. You can't redistribute, or even modify & recompile them locally, though.
A trio of Google engineers have ported id Software's gib-filled first-person shooter Quake II to browsers
Google tells me it's a castrated tomcat or crystal meth. Are these things really in Quake II?
Uh, those are the instructions for running the server. You don't need any plugin for the web browser.
I guess they don't want to handle the bandwidth required for letting thousands play Quake 2 over their link (legal questions aside).
Unfortunately, now that Oracle has acquired Sun, I'm pretty sure Java will be perverted and tied into Oracle's database products. Oh well, it's about time to learn LISP anyway...
Well, it would if developers stopped using look and feel changer to emulate the host system. At least the GTK version is hopelessly buggy, and more often than not crashes.
Forget magic. Any technology distinguishable from divine power is insufficiently advanced.
I don't know why some knee-jerks tagged this article as "Java". It's not running on Java. It uses JavaScript. It doesn't use Flash either. It's pure browser code.
Also read this part of the developers' blog post:
What this means for the Web
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. 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.
In other words, goodbye Flash and Java applets. And die already.
And this, my friends, is why something like the iPad is going to take off ... big time.
Google is really pushing this "browser as a platform" concept to the limit. Now imagine a "GooglePad" or a "ChomePad" or something which does nothing but browse the web. You click on a link and within seconds you're gaming at 60fps. Control-scheme aside, I think this concept will be succesful.
MMORPG in a browser, anyone?
Y
I hate how people who should know better assume that everybody runs the same Linux distro that they do and fail to write HOWTO instructions intended for a wide audience in a generic manner.
At http://maximumhoyt.blogspot.com/2010/04/quake2-in-browser-in-mandriva-2010.html there are Mandriva-ized abbreviated instructions which are useful if you use Mandriva (or a Mandriva derivative) and want to try this out as well.
But I do have an error and Quake2 won't display (I get an Aw, Snap! in Chrome), so any feedback will be appreciated.
"I believe in Karma. That means I can do bad things to people all day long and I assume they deserve it." : Dogbert
Has anyone invoked this meme yet? I don't see it. It's relevant in this case because we really are seeing stuff that used to be native code done in the browser. If there's not a C->Javascript translator already then soon there will be. Google's native client can run compiled code. It's starting to look like we can expect a Linux kernel running in a web browser in the next few years. Not obviously that useful but would be cool and you can bet that people will find things to use it for ...
I like a good fps as much as the next guy. I really do, I'm an Urban Terror junkie. It's quake 3 tech, but very similar gameplay. However, it seems like we could have better uses for this technology:
http://slashdot.org/comments.pl?sid=1588910&cid=31546834&art_pos=5&art_pos=5
I hold very few opinions. I hold information based on observation and fact. If you wish to disagree, please use facts.
Er, it's for chromium. Learn to read, please.
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
Yeah hopefully Oracle maintains the status quo but Ellison definitely has the Blofeld vibe to him.
I prefer SWT myself. I don't like Swing much in any of it's forms.
Mod me down, my New Earth Global Warmingist friends!
Flash 10 noticeably improved the performance on my old G4 DP 1.25. What you're saying honestly reads more like FUD, as it doesn't add up. Prior to my Intel MacBook Pros, I had Titanium 1Ghz Powerbooks and they ran Flash content -- like games - well enough for the most part.
Here, try a few HTML 5 examples, they runs MUCH slower on a Mac than the same type of demos done in Flash;
http://www.themaninblue.com/writing/perspective/2010/03/22/
My G4 Gets about 27 fps on all "Flash" examples, including 500 particles with shadows. With HTML 5, it averages about 12 fps 'without' shadows and about 4fps with shadows. The Flash examples are about 2 - 7x faster on average with my "PPC" running Flash Player 10. My UniBody 17" averages about 100 fps faster on all examples for reference.
With "heavy" HTML 5 content -- the link below -- on my MBpro unibody 17" in Safari and Firefox, the browser becomes almost unresponsive and the animation is very choppy. With the same type of content in Flash, my browser responds without hesitation and the animation is smooth;
Flash: http://mrdoob.com/46/Depth_of_Field_Test_07
HTML 5: http://mrdoob.com/97/Depth_of_Field_HTML5
I won't attempt this HTML 5 example on my G4 as it gives newer Mac a heavy work out.
What you're saying is more inline with what Jobs wants the world to believe instead of what's actually a reality. Please, stop regurgitating his talking points. He's not spreading FUD about Flash because it's the right thing for us as consumers, but because it stands to benefit his closed off platforms if consumers are OK with using iTunes/Quicktime as a gateway to all entertainment instead of a popular alternative like Flash, or any plug-in for that matter.
yeah because they wouldn't have wanted to show off their GWT stuff...
Although, this was more of a, this sounds like a neat hack, let's do it, than anything else.
If ORACLE tries to tie Java to their database as you suggest it would kill Java. Java is one of their more valuable properties, it was probably THE reason to buy Sun. ORACLE is not stupid they won't do that.
To much of the Java ecosystem is on IBM iron and talking to DB2. ORACLE would much rather have thriving Java community then pick up a tiny number of database sales.
Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
No, that's not the same thing. Integer (and Long, etc) are objects, not primitives. The GP's point was that in Java you can't say e.g.
int i = null;
I've not tried that (and don't have a JDK installed on this machine) but I would expect a compile-time error. (I've not tried it in C# either for that matter)
It's official. Most of you are morons.
So now, we can use Quake to benchmark browsers, instead of Acid2 or some Javascript libraries. Yay !
Looking at their web page, you can't run it in a browser from the web, or by downloading it. You have to download it and build it, and people are reporting all kinds of problems getting it to work.
What's actually going on behind the curtain?
I'm still waiting to run Duke Nukem Forever in my browser, you insensitive clod!
Catalin Braescu
Ofaly.com
That is the same thing in terms of semantics. In C#, you cannot say "int x = null", either. You can say "int? x = null", which is syntactic sugar for "System.Nullable = null", and Nullable is a wrapper which adds null to the domain of values of any value type. It has to be done that way in C# because the set of value types is open, whereas in Java it's restricted to primitives, so you can provide a separate wrapper for each.
There is a difference in that Nullable itself is a value type - basically T itself plus a boolean flag to indicate nullness. However, this is for the most part just implementation detail - from programmer's perspective, end result is the same.
You can't do:
...in C# either. You can do:
...though. I was sceptical at first, but it is a genuinely useful way of indicating the absence of a value when dealing with, for example, stuff that has come out of a database.
int i = null;
int? i = null;
This is just syntactic sugar in .NET actually. If you look at the IL it compiles to, for short switch blocks, it's a set of if statements; for longer ones, it creates a Dictionary and then does TryGetValue.
There are rumours of Nexuiz in Google Chrome OS, but Nexuiz is not Quake2, is a very high intensive opengl app, so It will need a rather good graphic card to run.
-Woof woof woof!
If flash games are made on the Flash studio, then I don't think flash will go away easyly. Theres a lot of expertise already on flash. But if people is using platforms like Flex, maybe, and only maybe, is easy for these people to move to different stuff that is not that different. Since Flash run in actionscript and actionscript is Javascript, then maybe, and only maybe, these people would see as "easy" to switch, or test the other platform.
Who knows?
Anyway I doubt WebGL is part of any standard that will be widely available, more widelly availbale than the unstandard that is flash.
-Woof woof woof!
I see the word "wireframe" ... and my memory lurches back to the two different versions ("wireframe" and "solid") of the old "Elite" for PCs. Now there's a piece of gaming history to aim for!
Mining lasers fore and aft, fuel scoops at the ready, and here come the Fer-de-Lances!
Birds are not dinosaur descendants;birds are dinosaurs, for all useful meanings of "birds", "are" and "dinosaurs"
Did you, by chance, click my link and see that you're completely wrong?
Mod me down, my New Earth Global Warmingist friends!
Isn't this Duke Nukem Forever's new engine? /s
No mod point. Pyjamas is wonderful.
.Net really cross platform no matter what people say about Mono and it's been developed by a convicted monopolist to further tie people to their shitty operating system.
.Net mess.
I'd much rather work in Java and no I can happily take my code anywhere if I tire of my current OS. Hell, I'd rather re-write C / C++ code for another operating system than drink MS' kool-aid and buy into the
I hope someone is working on a Javascript port of the Linux kernel. I would love to know that Linux can run in my browser.
Then we go recursive: Linux runs in a browser, which runs in Linux, which runs in a browser, which runs in Linux ... and it would be Linux and browsers all the way down.
I am anarch of all I survey.
Still better than flash! BTW, PMS?
Like it better than the one I found.
Firefox already does this, just open in your address bar: chrome://browser/content/browser.xul