Slashdot Mirror


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."

30 of 258 comments (clear)

  1. Re:OMGLOLWTF by qoncept · · Score: 5, Funny

    wan't

    I think that's the popular contraction of "wang" and "not." Am I correct? If so, your sentence doesn't make sense.

    --
    Whale
  2. Re:OMGLOLWTF by endikos · · Score: 4, Insightful

    Because you can.

  3. Art is not redistributable. by pavon · · Score: 4, Informative

    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.

  4. Re:Interesting by binarylarry · · Score: 2, Informative
    --
    Mod me down, my New Earth Global Warmingist friends!
  5. Re:the linky in the video not working by DevConcepts · · Score: 2, Informative
  6. Re:Installation Instructions? by TheRaven64 · · Score: 5, Interesting

    I saw this running a couple of months ago when I visited Google London. The guy who wrote it said it ran in Chrome with no plugins, so I'd imagine that you'd just go to the page and view it, although you'd need to grab the resources from a real Q2 install or demo. It's a nice tech demo, but on his modern multi-core machine it ran about as fast as Quake 2 ran on my old P166. It's one of those hacks that is cool because it's deeply wrong, not something that is in any way sensible.

    --
    I am TheRaven on Soylent News
  7. Re:Demostration of what? by BuR4N · · Score: 2, Insightful

    Both I believe

    --
    http://www.intellipool.se/ - Intellipool Network Monitor
  8. Re:OMGLOLWTF by idontgno · · Score: 2, Informative

    In other words, DO NOT WANT

    --
    Welcome to the Panopticon. Used to be a prison, now it's your home.
  9. Proof of Concept by pavon · · Score: 4, Insightful

    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.

    1. Re:Proof of Concept by TaoPhoenix · · Score: 4, Insightful

      So does this mean the folks whining about "flash is needed for cheap space invader games" can go away now?

      --
      My first Journal Entry ever, in 8 years! http://slashdot.org/journal/365947/aphelion-scifi-fantasy-horror-poetry-webzine
    2. Re:Proof of Concept by NatasRevol · · Score: 5, Funny

      For the love of God, I hope so.

      --
      There are two types of people in the world: Those who crave closure
  10. Re:Demostration of what? by binarylarry · · Score: 4, Informative

    The Java version of Jake2 runs at around the same speed as the native C version (sometimes a little slower, sometimes a little faster):

    http://download.java.net/javadesktop/plugin2/jake2/

    --
    Mod me down, my New Earth Global Warmingist friends!
  11. Re:Installation Instructions? by cduffy · · Score: 4, Informative

    Also, it presently needs a dev version of chrome started with a command line parameter that disables some sandboxing features.

  12. How about Urban Terror? by CranberryKing · · Score: 2, Informative

    Since I can already play QuakeLive in a browser, I probably won't get too excited about Q2.

  13. Re:Innovation by FreonTrip · · Score: 5, Interesting

    Um, dude? I know this certifies me as Gamer Grandpa, but you were unlikely to see a solid 30 fps in Quake II with the software renderer on less than a Pentium 166. Behold the miracles of the (many, many) layers of browser abstraction in action. Or perhaps inaction...

  14. It doesn't count if it can't play Doom by Anonymous Coward · · Score: 2, Funny

    It doesn't count if it can't play Doom

  15. How about OpenQuartz? by iYk6 · · Score: 3, Insightful

    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.

    1. Re:How about OpenQuartz? by SanityInAnarchy · · Score: 4, Informative

      WebGL and other libraries

      WebGL isn't a library, it's a binding. It does bind to native OpenGL (if the browser supports that), and while it may not be strictly HTML5, it is in line with the HTML5 goals -- to make the browser itself the platform, without relying on plugins.

      If this was an HTML5 demonstration, it would be using PNGs, SVG, and CSS to create the game

      Fair enough, though that would be much slower.

      Wow, almost as impressive as using activex rendering DirectX content that we first saw in the freaking 1990s.

      Yes, because ActiveX is a nice, cross-platform standard with multiple open source implementations... Oh wait.

      Read that again until it sinks in, by the way.

      Cross-platform -- WebGL runs on Windows, Linux, and OS X, at the very least, and likely on the iPhone. Your attempt to pretend this is a Google-vs-the-world thing falls flat.

      Standard -- WebGL is managed by Khronos, who maintains OpenGL itself -- the working group includes Apple, Google, Mozilla, and Opera.

      Multiple open-source implementations -- Firefox and Chromium both support it in some dev build or other. That also means Gecko and Webkit, which means dozens of other browsers.

      WebGL embedded in a browser or used as a plug-in is NOT the browser's rendering engine doing the work.

      So what?

      And for what it's worth, it is useful that it ends up on a Canvas. Unless I'm mistaken, that means it is composited with the rest of the document, meaning you could (for example) draw your HUD using standard HTML and only use the GL for the 3D. Please explain why this is a bad thing.

      --
      Don't thank God, thank a doctor!
  16. Re:Innovation by stevenvi · · Score: 2, Informative

    I played the original Quake on a 486/66 DX2. It ran at about 2 fps. I went back to playing Duke Nukem 3D and never looked back.

  17. Javascript is becoming an assembly language by mrspecialhead · · Score: 5, Interesting

    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.

    1. Re:Javascript is becoming an assembly language by icebraining · · Score: 2, Interesting

      Tried Pyjamas?

    2. Re:Javascript is becoming an assembly language by TwinkieStix · · Score: 2, Interesting

      I agree that Javascript is quickly becoming an assembly language. GWT (the tooling Google used to get Quake running in Javascript) is exactly that. Java code is compiled to "native" Javascript.

      Although, what you say about browser oddities is largely irrelevant with the usage of toolkits like jQuery, Prototype, Dojo, etc. Instead of targeting the Javascript DOM API, you target your toolkit's API. The DOM API is the part that differs between browsers, except for a few very rare cases. Targeting a toolkit's API is a thinner way to abstract the differences between browsers instead of inheriting the overhead of compiling one language to another before running against a machine. For instance, managing C++ pointers in a language with built in garbage collection is probably not the most performant process.

      Additionally, there is a subset of the actual language that some consider the "good part" from which you can also target at the language level. This is a great book about how to do that:
      http://oreilly.com/catalog/9780596517748

  18. Re:Die Flash games! by Firehawke · · Score: 2, Insightful

    Simply isn't going to happen until someone writes a development environment on par with Flash's, which doesn't seem to be happening any time soon. Chicken and egg problem. There's no interest in moving off Flash until the tools are there and nobody wants to write tools until there's interest in them.

  19. Re:Installation Instructions? by TheRaven64 · · Score: 4, Interesting

    I don't see how WebGL is a Flash replacement, given that Flash is a 2D platform. JavaScript + Canvas or SVG gives you the 2D stuff, without WebGL. WebGL is aimed squarely at things that Flash can't do.

    --
    I am TheRaven on Soylent News
  20. Re:Quake Live by shutdown+-p+now · · Score: 2, Funny

    This is what Quake Live should have been!

    It should have been turn-based? ~

  21. Re:Why do I have to install something for a browse by am+2k · · Score: 2, Interesting

    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).

  22. Re:No Flash and no Java by RAMMS+EIN · · Score: 2, Interesting

    ``In other words, goodbye Flash and Java applets. And die already.''

    Personally, I'd much rather have had a good, efficient, open-source plugin for interactive multimedia, based on open standards.

    Yes, it's nice that we can emulate that with existing web standards, but, really, why has nobody actually built a good platform specifically tailored for the things we're now using JavaScript, HTML, and HTTP for? Java was close, but too bulky. Flash was great, but proprietary. AJAX is open, but horrible from a technical point of view. Silverlight, I don't know about the technology, but it's basically Microsoft's also-ran. What else have we got, and why is it that no project seems to have gotten it right _and_ taken off, whereas so many things that have taken off haven't gotten it right?

    --
    Please correct me if I got my facts wrong.
  23. Re:OMGLOLWTF by arielCo · · Score: 2, Funny

    That's not a typo - that's a Freudian slip

    --
    This post contains no rudeness or derision of any kind. All arguments are friendly. Terms and exclusions may apply.
  24. Re:OMGLOLWTF by SanityInAnarchy · · Score: 2, Insightful

    Javascript is, as the name implies, a scripting language.

    At the time, that distinction was relevant. It isn't anymore.

    it's easy to hack something together, but as the size of the project grows, that same feature makes it harder and harder to keep the whole thing from collapsing into a rats nest lined with spaghetti.

    Here we go...

    You can write COBOL in any language, and you can write good code in any language. If you don't have the discipline for Javascript, you could always write a preprocessor that forces it on you, but I think you'll find that knowledgeable programmers using it on real projects don't tend to have these problems.

    The awful fact is that most programmers are mediocre and need handholding from the language to produce good or even okay code.

    Another fact is that this same handholding slows down good programmers until you only have mediocrity everywhere. I don't think it even succeeds in making bad programmers mediocre, as TheDailyWTF will confirm.

    A good programmer in a good language can easily outperform ten bad-to-mediocre programmers in a crippled language.

    Languages like Javascript or Python allow - even encourage - sloppiness, since that facilitates writing quick and dirty scripts,

    or Ruby, I would guess. Yet the Ruby community seems to enforce readable, well-architected code, along with readable unit tests (specs) for every change. Say what you will about the effectiveness of testing, it sure as hell isn't sloppy, or a "quick and dirty" solution.

    Do I use languages like that when I need a quick hack? Sure! That's because they're good languages, so a quick hack is going to be easier to develop in Python or Ruby than it is in C. But you can write quick hacks in C, Java, or anything else, and you can also write solid code in Python, Ruby, and even Javascript.

    It doesn't exactly help that scripting languages tend to catch most errors at runtime rather than compile time,

    It doesn't hurt as much as you might imagine when you have full test coverage. In fact, given full test coverage, runtime errors are compile-time errors, meaning fewer runtime errors slipping by than you'd have with a program written in a stricter language but with fewer tests.

    mostly because they like to pretend that variables are untyped

    That's not pretending. In languages like Javascript, the variables are. It's the objects that are typed.

    yet fail if you try to do something the object doesn't support.

    Duh. What did you expect?

    Here's a hint: Even in Java, there are many cases where something will fail at runtime when you try to do something the object doesn't support, faster than you can say NullPointerException. Or take the standard libraries -- fail-fast iterators, plenty of stuff not designed to work well with concurrent access from multiple threads...

    You seem to be assuming that we all write crazy code where no one knows what type of object we're dealing with. In practice, it's not that far off from anonymous subclasses in Java, and it's significantly faster to write, read, and reason about when we don't have to write LongClassName<OtherLongClassName<OtherReallyLongClassName>> foo = new LongClassName<OtherLongClassName<OtherReallyLongClassName>>();

    Ever tried to wrap your head around Java Generics, or C++ templates, or .NET... I'm guessing generics? It starts out innocently enough, but it eventually leads to serious issues, some even cropping up at runtime, plenty leaving you scratching your head trying to figure out how to describe exactly what kind of type makes sense here, what kind of inheritance relationship, etc...

    That whole nightmare goes away when you can simply declare a variable with 'var' and let the system figure it out.

    --
    Don't thank God, thank a doctor!
  25. Re:Innovation by Hurricane78 · · Score: 2, Funny

    I hear you. But wait until someone ported Chrome to Chrome! They may ask Xzibit on how to do it. ^^

    Sup dawg, I herd u liek innr platformz, so we put a browser in yo browser, so yo can waste resources, while wasting resources!

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.