Slashdot Mirror


Initial WebGL Support Lands In WebKit

appleprophet writes "WebGL is an upcoming standard from the Khronos Group, the same standards body behind OpenCL and OpenGL ES. It defines the use of OpenGL in websites using the standard canvas element. In other words, websites will be able to render hardware accelerated, 3D graphics natively inside of a web page. In the last week, WebKit, the rendering engine behind Safari and Google Chrome, has added initial support for WebGL, which means it probably won't be too long before Macs and iPhones everywhere get OpenGL web apps. This could have big implications for gaming. HTML5 has steadily been encroaching on desktop applications' territory, but I don't think many people expected browser-based, hardware-accelerated graphics this soon."

181 comments

  1. Ads by bcmm · · Score: 5, Insightful

    While I'm sure there are some great uses for this, it also sounds like a way to serve even more resource-hungry adverts than they can with Flash. Furthermore, if this became widespread in situations not really requiring it, a decent graphics card could essentially become a requirement for web surfing.

    --
    # cat /dev/mem | strings | grep -i llama
    Damn, my RAM is full of llamas.
    1. Re:Ads by Anonymous Coward · · Score: 0

      Actually, hardware accelerated advertisements would improve the user experience, compared to regular advertisements.

      But requiring a GPU for web surfing isn't so great. Especially for all those suckers who bought Intel's underpowered GMA chipsets, thinking they would be fine for browsing, email, etc.

    2. Re:Ads by Yvan256 · · Score: 2, Insightful

      All you have to do is tell people in marketing that a lot of people do use the GMA chipsets (all early entry-level intel Macs), netbooks, cheap laptops, cheap desktops, etc.

      The iPhone and iPod touch is also getting stronger every day, though I wouldn't be surprised if the 3D chipset in those isn't more powerful than an intel GMA, relative to the screen size of the iPhone/iPod touch.

    3. Re:Ads by dkf · · Score: 2, Insightful

      Actually, hardware accelerated advertisements would improve the user experience, compared to regular advertisements.

      I find that closing my eyes improves the user experience compared with most regular ads on the web. (And on the TV too for that matter.) It's the obnoxiousness that I object to, and the added indignity of ads too often being such horrendous messes that they impact browsing of unrelated sites with common browsers, though NoScript is rather a good response to that (and good for other things too).

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    4. Re:Ads by Anonymous Coward · · Score: 0

      All you have to do is tell people in marketing that a lot of people do use the GMA chipsets

      HA! Even if they somehow managed to understand what this means, do you think they'll care?

    5. Re:Ads by tulcod · · Score: 1

      It is simply naive to suggest that performance issues should be fixed by disabling interesting technologies which are simply supposed to /increase/ performance. Instead, QoS is what you're looking for, and implementing this for graphics is going to be an interesting challenge.

    6. Re:Ads by mdwh2 · · Score: 1

      Even low end chipsets have reasonable hardware acceleration - so unless they're managing to fit stuff comparable to Crysis in their adverts, I'm not convinced you'll need a "decent graphics card". Vista already made having a certain minimum of 3D functionality a requirement, so I don't see that this will change anything.

      If the worst happens and you're using an old computer, you could always disable it - are you going to complain at not being able to see resource-hungry adverts? This won't make it a requirement.

    7. Re:Ads by mdwh2 · · Score: 2, Interesting

      An "underpowered GMA chipsets" can still run stuff like Morrowind fine. Are you suggesting that advertisers are going to be writing complex 3D engines of a level comparable to say, Crysis?

      And if it sucks, all they have to do is disable the OpenGL web plugin. Yeah, I'm sure they're real "suckers" for not being able to see adverts! The only suckers are people who think they have to buy a high end jet-powered graphics card just in order to do web browsing.

    8. Re:Ads by node+3 · · Score: 5, Insightful

      While I'm sure there are some great uses for this, it also sounds like a way to serve even more resource-hungry adverts than they can with Flash. Furthermore, if this became widespread in situations not really requiring it, a decent graphics card could essentially become a requirement for web surfing.

      I don't see how this is any different than the current situation with Flash.

      Flash is resource hungry, and plays annoying ads in both 2d and 3d, with sound. So the situation is presently worse. Even if WebGL includes audio (or perhaps in the future there will be WebAL, etc.), the situation is presently worse given how problematic Flash is.

      Having seen some of the things Apple (and others, but it's really Apple that's pushing it at this point) is doing with HTML5, everything that can be done to replace Flash is a good thing. Even if it means the same annoying types of ads as now, at least they'll have less of a performance hit, and they won't be tied to a single program that is constantly plagued with security issues, has performance issues, crashes so often that Apple and Google sequester plug-ins/windows/tabs because of it, and whose updater is annoying and tries to push additional toolbars which no one wants.

      Just as Flash served to kill off pretty much all the various and annoying plug-ins you had to download to make full use of the web, and replaced them all with a single plug-in to rule them all, HTML5, with things like canvas, the video tag, and WebGL, is looking to do the same to Flash--replace it with something better.

    9. Re:Ads by Anonymous Coward · · Score: 0

      "The only suckers are people who think they have to buy a high end jet-powered graphics card just in order to do web browsing."

      Or in other words, anyone who has to ask a sales person at Best Buy which computer will help them with "school and work".

    10. Re:Ads by Yvan256 · · Score: 1

      Tech guys to marketing guys: "most people don't have the latest hardware. If your ads require too much power then they will look like crap and people won't buy your stuff."

      Simple enough.

    11. Re:Ads by paul248 · · Score: 1

      Marketing guys: "You mean our ads will be targeted to the people who like to buy new hardware? Let's do it!"

    12. Re:Ads by Hurricane78 · · Score: 1

      No problem. If someone hates ads, and still does not use an ad-blocker, he's a retard anyway, and deserves it for being so lazy. ^^
      I guess those people then will become the Fritos and secretaries of state of tomorrow.

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    13. Re:Ads by Ihmhi · · Score: 1

      Really? Wouldn't it just popularize something like GL Block or something?

    14. Re:Ads by netdur · · Score: 1

      standards is always better than Flash,

      --
      "Steve Jobs invented the world" -- Bill W. GATES
    15. Re:Ads by fatp · · Score: 1

      In the name of backward compatibility with old browser (noting that many people still using IE6), and the "investment" of web designers on Flash, it will not be replaced anytime soon.

      So even the browser provide the same functions as the plugins, you still need tons of plugins if you want to see all web pages.

    16. Re:Ads by Jared555 · · Score: 1

      Tech guys: "But the people who like to buy new hardware already know cheaper places to buy from than us"

    17. Re:Ads by postmortem · · Score: 1

      Just use elinks

    18. Re:Ads by Korin43 · · Score: 1

      You don't even have to disable the plugin, just install Adblock Plus. I'm sure as soon as WebGL is supported in Firefox, it will also be supported in Adblock.

    19. Re:Ads by PBoyUK · · Score: 1

      I get the feeling this conversation is turning into another User-Friendly strip.

    20. Re:Ads by jonadab · · Score: 1

      > I don't see how this is any different than the current situation with Flash.

      You can just not bother to install Flash, or use FlashBlock if you prefer, and your web browsing experience is not harmed in any way. If the pointless gratuitously annoying stuff is built right into the browser, it'll be harder to avoid.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    21. Re:Ads by PitaBred · · Score: 1

      The GMA will play Quake 3 fine. Are you really expecting online ads and such to be more complex than that? If you're going to have an online game, sure, you'll have system requirements just like any other game. But a GMA, while crappy, is more than fast enough for basic 3D.

    22. Re:Ads by node+3 · · Score: 1

      You can just not bother to install Flash, or use FlashBlock

      I'm sure there will be a Firefox extension to disable this, if not an actual browser preference.

    23. Re:Ads by Sarten-X · · Score: 2, Funny

      User Friendly is not a comic strip. It's a reality TV series encoded in static serialized graphical form.

      --
      You do not have a moral or legal right to do absolutely anything you want.
  2. Someone in the know... by SanityInAnarchy · · Score: 1

    ...please explain the difference between this and Google's O3D.

    --
    Don't thank God, thank a doctor!
    1. Re:Someone in the know... by Anonymous Coward · · Score: 0

      Or how this is different than what quake live uses?

    2. Re:Someone in the know... by erko · · Score: 3, Informative

      Quake live (and similar apps) require you to download a plugin.

      Ideally, webGL will eventually be included in browsers so any webpage could use accelerated GL without requiring you to download a plugin first. (I'm not an expert, this is just what I've gathered so far, corrections are welcome).

    3. Re:Someone in the know... by SanityInAnarchy · · Score: 2, Informative

      Quake Live requires you to download a plugin -- and it's a specific plugin, for a specific game (Quake Live).

      WebGL, or O3D -- maybe they're the same thing? Anyway, both are planned to be either a plugin, or actually included in the browser. And they're just a 3D API -- it means that once you have this plugin, any game will work.

      So, kind of like Flash is for crappy 2D games, only actually an open standard, and with decent cross-platform support.

      My question was, WebGL and O3D seem to have identical goals. Is there a difference?

      --
      Don't thank God, thank a doctor!
    4. Re:Someone in the know... by salarelv · · Score: 1

      O3D still uses a plug-in. 03D is easier do develop. Its similar to 3DMLW. I haven't seen a specification for WebGL yet (Khronos Group hasn't published any). I know so much that there aren't any readers for 3D models which makes the development of games very hard. Also there isn't any logic built into it. You have to program everything. No shaders, no phyiscs etc.

    5. Re:Someone in the know... by SanityInAnarchy · · Score: 1

      O3D still uses a plug-in.

      Yes... key word there: a plug-in. The Quake Live model is one plugin per game. The O3D plugin is one plugin for anything you might ever want to do with 3D.

      I know so much that there aren't any readers for 3D models which makes the development of games very hard.

      Somehow, I doubt it. The difference is that O3D seems to be putting that inside the plugin, whereas WebGL would require it on the server or in Javascript.

      You have to program everything. No shaders, no phyiscs etc.

      Yes, you have to program shaders -- just like you do with OpenGL outside the browser.

      So basically what you're telling me is that O3D is easier, because it's got a bunch of stuff built-in that you'd have to add with WebGL. On the other hand, WebGL is going to be a lot easier to get into browsers, since about all they have to do is wrap OpenGL -- everything else, they're relying on the web developers to handle.

      --
      Don't thank God, thank a doctor!
    6. Re:Someone in the know... by salarelv · · Score: 1

      Yes. Exactly 03D is easier. I see problems with 3D models - You can only read txt based files with JS - and I am not sure if this works on all browsers. When You run everything (file reading, rendering, back face sculling, front face sculling etc) from JS then it will be slow. 03D and 3DMLW to it in the plugin. Which is faster.

    7. Re:Someone in the know... by SanityInAnarchy · · Score: 1

      I am not sure if this works on all browsers.

      What, reading text files? Of course it does.

      When You run everything (file reading, rendering, back face sculling, front face sculling etc) from JS then it will be slow.

      The word you're looking for is "culling". And in a well designed engine, that's really not where you're going to be spending most of your time, is it?

      --
      Don't thank God, thank a doctor!
    8. Re:Someone in the know... by salarelv · · Score: 1

      Thank You for finding the right word. Yes, but WebGL isn't a well designed engine. You have make one which will be running on JS which isn't comparable in speed to binary or ASM programs. Google Docs is slower than MS Office or even Open Office. I can't imagine that a full JS application could replace some binary application.

    9. Re:Someone in the know... by SanityInAnarchy · · Score: 1

      will be running on JS which isn't comparable in speed to binary or ASM programs.

      But it is comparable to Python, and people have written interesting GL games in Python.

      It doesn't have to be as fast, it just has to be fast enough.

      Google Docs is slower than MS Office or even Open Office.

      On which browser?

      And keep in mind, Google Docs is actually trying to use the HTML DOM. This wouldn't have to.

      I can't imagine that a full JS application could replace some binary application.

      I don't know about you, but even if Google Docs is slow, it's still fast enough that I don't really care. (My bigger beef with Docs is that I already have OpenOffice, and I want to store my files locally.) But there you go -- that's a JS application replacing a "binary" application.

      And people can and do write games in .NET -- I think it's called XNA.

      Keep in mind, no application is written in binary. They're written in languages that compile to machine code (binary), but the language itself isn't. Recent implementations of JavaScript use a JIT compiler (Just In Time, kind of like Java or .NET) to actually compile JavaScript down to machine code where it can.

      It's still not as fast as C, but it's pretty fast.

      --
      Don't thank God, thank a doctor!
  3. Why? by Darkness404 · · Score: 4, Insightful

    Why is this necessary? There are some positive uses for it (such as getting us out of dependence on proprietary technologies like Flash) but a lot more negative issues. For one, this will add even more vulnerabilities to browsers which seem to already have loads of them. And for another the web should be accessible for -everyone- from the low-end netbook to a Core i7, and even older systems should be able to browse web. Already many sites are unusable without a recent version of Flash, we don't need extra hardware as requirements to view sites. Yeah, we all know that they should do it in HTML and that will still stick around, but how many of us have encountered sites built entirely in Flash? Or have a requirement of Flash for simple things like navigation? While some things obviously need Flash (such as Homestar Runner because they are Flash cartoons) others use Flash for no real reason. Currently most platforms have Flash or will be getting it. But adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.

    --
    Taxation is legalized theft, no more, no less.
    1. Re:Why? by Anonymous Coward · · Score: 0

      Actually I think WebGL will have lower requirements than Flash, if only because WebGL is hardware-accelerated and not completely dependent on the CPU. Think iPod touch, iPhone, etc. I bet even the Sony PSP and Nintendo DSi will be able to take advantage of this.

    2. Re:Why? by moon3 · · Score: 5, Insightful

      Because when this takes off (a few years from now), it might even invalidate Flash as WebGL also mean accelerated 2D and would be more performant in general then 2D Flash, and it could possibly free us from closed-source and proprietary Flash in the long run.

    3. Re:Why? by SanityInAnarchy · · Score: 5, Insightful

      There are some positive uses for it (such as getting us out of dependence on proprietary technologies like Flash)

      There are already a lot of ways we could get rid of Flash, if people would stop using it. After all, Flash is mostly used for vector graphics (we've got SVG), interactivity (we've got AJAX/DHTML), and audio/video (we've got the audio and video tags).

      For one, this will add even more vulnerabilities to browsers which seem to already have loads of them.

      So does every useful feature. I'll bet money that the first serious vulnerability is in a driver, not a browser.

      And for another the web should be accessible for -everyone- from the low-end netbook to a Core i7, and even older systems should be able to browse web.

      OpenGL can be implemented in software.

      And you lost that argument already with Flash. When there are one or more video ads on many pages I visit, I doubt low-end netbooks are doing well.

      Yeah, we all know that they should do it in HTML and that will still stick around, but how many of us have encountered sites built entirely in Flash?

      The fact that technology can be misused is not a reason to avoid developing said technology.

      For example: It's possible to build an entire site surrounded by an iframe, so that navigation is completely broken. That doesn't mean that iframes have no legitimate uses.

      It's also possible to build an entire site as a single AJAX app. This can be done well, but it takes more work -- for example, with Gmail, notice that everywhere you go, it adjusts the hash in the URL, so that you can use browser navigation properly -- the back button works, so does bookmarking, open in a new window/tab, etc etc. Sites that don't do that could have really poor usability.

      It's also theoretically possible to render images using massive HTML tables, with each cell representing a single pixel. Does that mean HTML tables should be made less flexible, just so no one can do that?

      I could go on...

      The fact is, there are ways to abuse any technology -- there's always the possibility that someone will print out a website, make the changes they want, scan it back in, and upload it as an image. The fact that people can abuse technology should never prevent us from creating new, interesting bits of technology that have real, practical applications.

      While some things obviously need Flash (such as Homestar Runner because they are Flash cartoons)

      Nope. They need Flash because they were authored in Flash. They could have been done with SVG, Javascript, and the audio tag, it's just that the authoring tools for these aren't anywhere near Flash itself, from what I understand.

      adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.

      See, now you're being ridiculous.

      Consider that ten or fifteen years ago, using excessively large images would be considered bad taste -- you'd be asking for way too much RAM "just to browse the web", and you'd be wasting a ton of bandwidth. That's why we came up with the idea of thumbnail galleries -- which are still useful, but a better model is really a slideshow.

      It's not a "high end video card" now, either. Just about any video card is going to have some 3D capability on it -- and we're moving in the direction of compositing window managers, which will actually lead to cards supporting just 3D (and having to emulate 2D) being cheaper than cards supporting just 2D (and having to emulate 3D).

      So, 10 or 15 years from now, when people want to add a little effect to their website -- or build an interesting "flash game" that's capable of actually using 3D hardware -- would you prefer it use Flash? Or maybe you'd prefer Quake Live -- a plugin for each game -- may as well just download an exe?

      Or would

      --
      Don't thank God, thank a doctor!
    4. Re:Why? by celle · · Score: 1

      You forgot that not everyone has the bandwidth for this graphical crap. The cities mostly yes, out here in the sticks no. Please just give me html so I can actually get some work done and not wait 2 minutes per page transition.

    5. Re:Why? by Darkness404 · · Score: 0

      There are already a lot of ways we could get rid of Flash, if people would stop using it. After all, Flash is mostly used for vector graphics (we've got SVG), interactivity (we've got AJAX/DHTML), and audio/video (we've got the audio and video tags).

      As far as I know, SVG is -still- not supported on IE.

      So does every useful feature. I'll bet money that the first serious vulnerability is in a driver, not a browser.

      Either way, it introduces more security vulnerabilities to the average user.

      OpenGL can be implemented in software. And you lost that argument already with Flash. When there are one or more video ads on many pages I visit, I doubt low-end netbooks are doing well.

      Owning a "low-end netbook" (EEE 701 running Xubuntu 7.10 with EEE specific customizations) Flash in general works decently enough and the only major problems I've noticed are really due to scaling, not the hardware itself. Then again, my router is set up to block a few adservers.

      The fact is, there are ways to abuse any technology -- there's always the possibility that someone will print out a website, make the changes they want, scan it back in, and upload it as an image. The fact that people can abuse technology should never prevent us from creating new, interesting bits of technology that have real, practical applications.

      The fact is, Flash is nearly always used for the wrong reasons. WebGL will become the next Flash, and be just as annoying if not more so. So why make a slightly better duplicate of technology that is always misused?

      Nope. They need Flash because they were authored in Flash. They could have been done with SVG, Javascript, and the audio tag, it's just that the authoring tools for these aren't anywhere near Flash itself, from what I understand.

      And the fact that many browsers can't do them. IE can do Flash, IE can't do SVG. If I can't reach 60% of web users by default, why bother?

      It's not a "high end video card" now, either. Just about any video card is going to have some 3D capability on it -- and we're moving in the direction of compositing window managers, which will actually lead to cards supporting just 3D (and having to emulate 2D) being cheaper than cards supporting just 2D (and having to emulate 3D).

      Eventually. However have you seen the state of technology for non-geeks? I still know people who use Windows 98 as their default operating system, old Dell towers with low-end Pentium 4s are very common, and for most notebooks integrated graphics is the best they have. Just because we have Core 2 Duos and a decent graphics card doesn't mean that the masses do

      So, 10 or 15 years from now, when people want to add a little effect to their website -- or build an interesting "flash game" that's capable of actually using 3D hardware -- would you prefer it use Flash? Or maybe you'd prefer Quake Live -- a plugin for each game -- may as well just download an exe?

      When people want to add things to their website they can do it with things such as... HTML and CSS (or whatever their replacements are in 10-15 years). I would prefer it to be in either server-side language with a small client interpreter (similar to how /. is coded) or make it be a desktop application. The risks are too great when you have code running like crazy on the client side, that is when security vulnerabilities come out.

      Or would you prefer a world where someone could develop and deploy a visually-impressive MMO that is just a webpage -- where you don't need an account or a download to enter something like Second Life, you can just click a link and you're in the world?

      Would you also want ads to run the same way? Or what about malware? Security issues are a major concern as things get more complex. We have

      --
      Taxation is legalized theft, no more, no less.
    6. Re:Why? by Anonymous Coward · · Score: 0

      But adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.

      Hmmm, last time I checked, most onboard graphics cards from the P3 onward were quite capable of rendering OpenGL content...

    7. Re:Why? by Anonymous Coward · · Score: 0

      And no one needs more than 640k.

      Now get off my lawn, you damn kids...

    8. Re:Why? by mdwh2 · · Score: 1

      Indeed - my steam powered Voodoo Banshee from a decade ago that I have lying around happily runs OpenGL.

      The 3D revolution happened over 10 years ago. Strange that on a geek place like Slashdot, this seems to have passed so many people by...

    9. Re:Why? by node+3 · · Score: 5, Insightful

      For one, this will add even more vulnerabilities to browsers which seem to already have loads of them.

      While replacing one of the biggest ones: Flash.

      WebGL won't be a plugin, it will b part of the browser. That means Firefox won't be vulnerable because of an Adobe bug, but because of a Mozilla bug, and Mozilla can fix the bug themselves.

      Also, with more diversity, bugs will be less likely to be exploited, and when they are they will have a smaller path of destruction.

      And for another the web should be accessible for -everyone- from the low-end netbook to a Core i7, and even older systems should be able to browse web.

      This is no different than Flash is now, except that WebGL has the potential to be significantly more efficient. WebGL isn't going to replace HTML, it's going to augment it, similar to how Flash does today. Sites that want to be accessible to more users will avoid reliance on resource demanding WebGL elements, or avoid it altogether, just like sites avoid resource demanding Flash objects.

      On the other hand, those sites that want to take advantage of it, and for those users with more modern machines (really, WebGL isn't going to require advanced GPUs and high-end Core2Duos unless you start putting game level 3D and AI into it, simple 3D rendering will work just fine on older hardware--better, in fact, that 3D Flash does now), we'll be able to have a more rich web experience.

      I absolutely detest the notion that the web should not embrace new technologies just because some people have crap computers. I agree that most web sites should be designed to be accessible across a broad range of computers (either by limiting advanced features, or providing alternate pages), but if a site wants to specialize with features that tax even modern systems (like YouTube did not too long ago), then as long as they are not essential sites (like banks, utilities, government, news media, etc), then they should be encouraged.

      Already many sites are unusable without a recent version of Flash, we don't need extra hardware as requirements to view sites.

      There you go. So how is this worse?

      how many of us have encountered sites built entirely in Flash? Or have a requirement of Flash for simple things like navigation? While some things obviously need Flash (such as Homestar Runner because they are Flash cartoons) others use Flash for no real reason.

      Which has what to do with WebGL?

      But adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.

      Not as ridiculous as assuming WebGL will mean that you have to have a high-end GPU and CPU just to view the web.

    10. Re:Why? by Anonymous Coward · · Score: 0

      As far as I know, SVG is -still- not supported on IE.

      Not if Google has a say...

      http://tech.slashdot.org/story/09/08/22/1246248/Google-Brings-SVG-Support-To-IE?from=rss

    11. Re:Why? by Anonymous Coward · · Score: 0

      Why wont Javascript just die already.

    12. Re:Why? by SanityInAnarchy · · Score: 1

      Because it's actually a good language, that you likely don't understand.

      --
      Don't thank God, thank a doctor!
    13. Re:Why? by SanityInAnarchy · · Score: 1

      Either way, it introduces more security vulnerabilities to the average user.

      Granted. But the obvious question is: How many features are you willing to remove or prevent to keep the user secure? Having a web browser at all introduces more security vulnerabilities to the average user than just not surfing the Internet.

      The fact is, Flash is nearly always used for the wrong reasons. WebGL will become the next Flash, and be just as annoying if not more so.

      Except that it'll at least be open. Flash is frustrating not only because it's abused (as any technology can be), but because there really aren't that many applications where Flash makes sense. In fact, the vast majority of places Flash is used now, there are and were existing technologies that make much more sense.

      Let me put it another way: Do you like the video tag? It likely introduces more vulnerabilities, and it could be abused, and could make some sites slower. But it's a hell of an improvement over Flash.

      That's the idea here.

      And the fact that many browsers can't do them. IE can do Flash, IE can't do SVG.

      IE can't do Flash without a plugin. IE can't do SVG without a plugin. What's the difference?

      And I have to point out, I don't think you really mean "many browsers". I think you mean "IE".

      However have you seen the state of technology for non-geeks? I still know people who use Windows 98 as their default operating system, old Dell towers with low-end Pentium 4s are very common, and for most notebooks integrated graphics is the best they have.

      And again, these are systems on which Flash won't perform well.

      And yes, I have seen non-geeks. They tend to like things like netbooks. In fact, my experience shows an opposite trend kind of balancing them out -- when a non-geek notices their computer going slower and slower (spyware, most likely), they have no idea how to fix it. Generally, they either pay someone else to fix it, or they buy a new computer.

      A geek, on the other hand, can install Linux and make an old system useful again.

      When people want to add things to their website they can do it with things such as... HTML and CSS (or whatever their replacements are in 10-15 years).

      Replacements like... oh... WebGL?

      I would prefer it to be in either server-side language with a small client interpreter (similar to how /. is coded) or make it be a desktop application. The risks are too great when you have code running like crazy on the client side, that is when security vulnerabilities come out.

      This is the part I really can't agree with.

      I agree that code "running like crazy" on the client side is a bad thing. But I would much rather have my apps sandboxed by default, not to mention auto-updated, Internet aware, cross-platform, and not needing installation, than having to download an EXE and pray it didn't come with malware.

      Would you also want ads to run the same way?

      Would adblock suddenly stop working? How about noscript?

      Again, like so many other things in your response, this is already an issue with Flash. Someone can already display a video in an ad, with sound, and make it take over as much of the browser window as they can manage. All they can't do, yet, is make it go fullscreen without me clicking something -- and I expect WebGL would be the same way.

      Or what about malware?

      If it's properly sandboxed, there's not a lot it can do.

      Security issues are a major concern as things get more complex. We have a hard enough time just with JavaScript issues which is a simple language.

      *facepalm*

      I think we've had a grand total of... maybe... one or two actual Javascript vulnerabilities.

      The rest are vulnerabilities in the API exposed to J

      --
      Don't thank God, thank a doctor!
    14. Re:Why? by Rysc · · Score: 1

      Javascript is a fine language given a bad name because
        - serious programmers don't program for the web
        - amateurs do what serious programmers won't and do it *really badly*

      The result is a lot of shitty javascript programs and JS getting a bad name for being shitty. It's not the language, it's the programmers!

      This situation has vastly improved over the last 5-7 years. Serious programmers started using JS, or in some cases amateurs figured out how to be real programmers.

      Javascript is /scheme with a C syntax/. Really. It's also more popular than scheme ever was (or is ever likely to be). It's a fine, fine language and is not going to go away in the foreseeable future--certainly not for at least 10 years.

      --
      I want my Cowboyneal
    15. Re:Why? by tepples · · Score: 1

      every now and then, we see a cool little student game on Slashdot's homepage. Narbacular Drop became Portal, and now there's The Power of Paint, etc... These aren't exactly resource-intensive games, nor are they particularly big (usually under ten megs). Imagine if, instead of having to click, download, install, then run, then uninstall when you're done, and hope it didn't have any spyware... instead, you just click from the Slashdot homepage, and you're in the game.

      This method might work for some genres, but until browsers expose an API letting a JavaScript program read from USB gamepads, it won't work for other genres. JoyToKey is a pain to set up, especially for multiple gamepads.

    16. Re:Why? by Bat+Country · · Score: 1

      WebGL is attempting to build an actual standard (unlike Flash) which people might really use (unlike VRML) to put accelerated (unlike Flash) 2d and 3d graphics on the web.

      Why? I'd imagine (other than trying to beat Microsoft to the punch with WebX or whatever they decide to put forth) that it's a move toward cloud applications. Adobe's been talking for years about putting Premiere, Flash and Photoshop into web applications. Google beat Microsoft to the punch with Google Docs. A decent accelerated 3d surface in the mainstream browsers would bring applications like Maya, 3DStudio Max, Mudbox, Blender, etc into the game.

      3d authoring would be accessible to everybody, not just well-paid techy people and people who are ok with piracy. Ignoring games entirely (and I hate to do that) for the moment, we'll talk about some other stuff.

      3d display technology is coming to consumers whether the consumers like it or not, and by and large, the consumers do like it. When you've got a 3d display to work with, communicating certain concepts to consumers becomes fairly easy. You can bet some automotive manufacturer will put up 3d models of their cars to play with (a couple of them did with VRML). How about fashion? Being able to see what the weave looks like in some designer clothing might be a selling point. Premium real estate with those horrible 3d walkthroughs would improve incrementally. Especially if they combined it with that Microsoft Labs Photosynth project.

      3d photography will no doubt become a larger subset of the hobbyist market once 3d displays become reasonably common. How about 3d Street View on Google Maps? How about a web version of Google Earth?

      With processor power increasing, JavaScript engines becoming more efficient and vaguely standardized with ECMAScript, 3d on the browser will be inconvenient only for a little while, then commonplace, then expected.

      --
      The land shall stone them with the bread of his son.
    17. Re:Why? by SanityInAnarchy · · Score: 1

      until browsers expose an API letting a JavaScript program read from USB gamepads, it won't work for other genres.

      So it'll be proved with the genres that it works with, and browsers will expose a gamepad API once it's obvious that this is something we want.

      Good point, though.

      --
      Don't thank God, thank a doctor!
  4. A trusted list of sites. by jack2000 · · Score: 1

    You know I'll practicably have this disabled for every site except 2 or 3. So, what's the point?

    1. Re:A trusted list of sites. by Bigjeff5 · · Score: 5, Insightful

      The point is that nobody really cares all that much about what you do, as the web industry does not revolve around you.

      --
      Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
    2. Re:A trusted list of sites. by Kuroji · · Score: 1

      The point is that there will be millions who don't, and thereby it's ideal for embedding content and adverts.

    3. Re:A trusted list of sites. by mdwh2 · · Score: 3, Insightful

      You're right - I bet people were thinking making an online game with this, but now they've discovered that you alone will have this disabled, there's obviously no point doing it. It's a good thing you posted to let them know, and save them the trouble!

    4. Re:A trusted list of sites. by jack2000 · · Score: 1

      Har har. I'm submitting myself as an example of an apathetic user group. You could look further then your nose and realize that yourself...

    5. Re:A trusted list of sites. by mdwh2 · · Score: 1

      Well I'm sure that game companies will be distressed to hear that the apathetic segment of the market is not interested.

      And wait - the apathetic user group will be bothering to go through their settings and have this disabled, except for sites where they need it?

    6. Re:A trusted list of sites. by bonch · · Score: 1

      If WebGL becomes as obnoxiously abused as Flash, everyone will want to disable it. The web revolves around its users.

  5. That's a Bit Optimistic Don't You Think? by eldavojohn · · Score: 3, Interesting

    but I don't think many people expected browser-based, hardware-accelerated graphics this soon

    This is great for WebKit and I'm very interested to see where this goes. But you're kidding yourself with that above statement. Firefox is using Gecko and we all know IE will drag their feet on this. So you're proposing a company invest time into a "browser-based hardware-accelerated" graphics game or program by using WebGL ... when it's only supported on the two smallest browser shares out there? Unless there's a way to auto-port existing OpenGL code to WebGL (and the press release didn't seem to imply that), I wouldn't hold my breath. Even if tomorrow Firefox is ready to go with WebGL in Gecko, you've got a long adoption and incubation time on these projects and you'd still be targeting the minority of browsers.

    Basically I don't see a good business case or success story coming out of using WebGL over OpenGL or even just dumbing down the graphics and making it something that's widely supported already like Flash. Nothing would make me happier than to see this take off and be the de facto route for putting your game on everything with a browser ... it just isn't at that point or even guaranteed to happen yet.

    --
    My work here is dung.
    1. Re:That's a Bit Optimistic Don't You Think? by Anonymous Coward · · Score: 0

      ... when it's only supported on the two smallest browser shares out there?

      I'm reading this in uzbl you insensitive clod!

    2. Re:That's a Bit Optimistic Don't You Think? by beelsebob · · Score: 3, Interesting

      How about the browser with the biggest share of the mobile phone market - a market where you've notably got no competition from flash games?

    3. Re:That's a Bit Optimistic Don't You Think? by SanityInAnarchy · · Score: 1

      So you're proposing a company invest time into a "browser-based hardware-accelerated" graphics game or program by using WebGL ... when it's only supported on the two smallest browser shares out there?

      I would, if only because it's a lot easier to convince people to try a different browser (or just provide a downloadable version that embeds Webkit) than it is to convince them to download something every time they want to do 3D.

      Or if it isn't, it should be.

      Even if tomorrow Firefox is ready to go with WebGL in Gecko, you've got a long adoption and incubation time on these projects and you'd still be targeting the minority of browsers.

      Where "minority" means "Everyone except IE, at least until someone hacks it into IE with a plugin."

      Consider the following user experience: You try to view the webpage. It says "You need a browser that supports WebGL. Here, try one of these." You download a new browser. From this point on, it's no harder for you to try out a new 3D game than it would be a new Flash game.

      --
      Don't thank God, thank a doctor!
    4. Re:That's a Bit Optimistic Don't You Think? by Anonymous Coward · · Score: 2, Interesting

      How about the browser with the biggest share of the mobile phone market - a market where you've notably got no competition from flash games?

      If you're targeting just one phone, fine. But you might as well just use the iPhone SDK so you don't have code all the touch interaction crap from scratch. If you coded it in WebGL what is the bonus that you got from doing that? That everyone who uses Opera on their desktops can play a game designed with the iPhone screen and multi-touch in mind? Again, you'd be pretty darn ignorant to go with WebGL over iPhone SDK.

    5. Re:That's a Bit Optimistic Don't You Think? by ceoyoyo · · Score: 1

      Khronos also maintains OpenGL ES and OpenGL. OpenGL ES is basically a subset of OpenGL. It would be very surprising if WebGL weren't very closely related to OpenGL as well. That should make writing a plugin for those other browsers not particularly difficult.

    6. Re:That's a Bit Optimistic Don't You Think? by Firehed · · Score: 3, Insightful

      As other smartphones adopt the new standards (many already use Webkit-based browsers), you instantly gain compatibility on those devices. No need to maintain three separate codebases for the iPhone, BlackBerry and Android if your app works great in the browser of all three platforms.

      I also prefer sites/apps where I don't have to perform any installation to get at the content, but that's more a matter of personal preferences. Right now that's only practical for a small subset of apps, but WebGL may change that.

      --
      How are sites slashdotted when nobody reads TFAs?
    7. Re:That's a Bit Optimistic Don't You Think? by Anonymous Coward · · Score: 0

      Consider the following user experience: You try to view the webpage. It says "You need a browser that supports WebGL. Here, try one of these." You download a new browser. From this point on, it's no harder for you to try out a new 3D game than it would be a new Flash game.

      My god, how did we overlook this strategy?! Of course it will work because you said so!

    8. Re:That's a Bit Optimistic Don't You Think? by beelsebob · · Score: 2, Informative

      Just one phone? Web Kit is used on almost all Nokia phones, android phones, and iPhones, and probably a bunch more after that.

    9. Re:That's a Bit Optimistic Don't You Think? by farnsworth · · Score: 3, Interesting

      If you're targeting just one phone, fine. But you might as well just use the iPhone SDK so you don't have code all the touch interaction crap from scratch. [snip] you'd be pretty darn ignorant to go with WebGL over iPhone SDK.

      If you look at the trac logs for this checkin, you'll see that the commiter has an apple.com email address. So it's probably safe to say that implementing this fits in with Apple's dev tools strategy.

      I don't know a lot about OpenGL or WebGL, but it does feel like it overlaps a lot with what Flash and Silverlight provide. I'm not sure what conclusion to draw from that, but it seems notable to me.

      --

      There aint no pancake so thin it doesn't have two sides.

    10. Re:That's a Bit Optimistic Don't You Think? by hkmwbz · · Score: 3, Informative

      How about the browser with the biggest share of the mobile phone market

      You mean Opera?

      --
      Clever signature text goes here.
    11. Re:That's a Bit Optimistic Don't You Think? by Synjyn · · Score: 1

      this is true, its on many other manufacturers proprietary mobile handset platforms too, because its open source and rapidly replacing some of the other browsers (e.g. access netfront etc)

    12. Re:That's a Bit Optimistic Don't You Think? by R3d+M3rcury · · Score: 3, Insightful

      True. But WebKit is used by Android and WebOS. Also, RIM just bought a company that makes a WebKit-based browser.

      So, potentially, you're running on four of the top five platforms.

    13. Re:That's a Bit Optimistic Don't You Think? by beelsebob · · Score: 3, Insightful

      Yes, wait no, given that the iPhone bar, the Nokia bar, the iTouch bar, and a lot of the "other" bar (palm pre, and android) are *all* WebKit based browsers. In the mean time, NetApplications shows the iPhone *alone* ahead of opera.

    14. Re:That's a Bit Optimistic Don't You Think? by SanityInAnarchy · · Score: 1

      Of course it will work because you said so!

      Worked for Flash.

      --
      Don't thank God, thank a doctor!
    15. Re:That's a Bit Optimistic Don't You Think? by hkmwbz · · Score: 1
      WebKit is not a browser. Nokia's browser is not the same as Safari even if it's based on WebKit. In fact, it's a fork. They may have recently merged in some recent WebKit stuff, but it has been its own forked version for a long time.

      The iPhone is not ahead of Opera. Net Applications is useless, so you shouldn't trust them. They even admitted to having completely bogus stats recently.

      --
      Clever signature text goes here.
  6. Games! P0rn! by sam0737 · · Score: 1

    When will I be able to play games with Browser? Will Starcraft 2 / Diablo 3 ships release in this "Web format"?

    And when will 3D LCD screen becomes affordable and hence animated 3D porn? Oh. I think I can skip the animated part...real actor are good enough!

  7. Browsers might be ready for GL but not Javascript by Aggrav8d · · Score: 3, Insightful

    I've written a few games using the 2D canvas element. Invariably these games use 99% of the CPU because Javascript doesn't have a real sleep() function. There's no decent way to manipulate sounds (like an FMOD for javascript). Tests on my machine show that changing the line/fill color is expensive. There's no way to switch to full screen or to capture every key stroke/mouse movement. All of which is beside the really big issue: there's no decent debugger.

    3D games sound like a nice idea but they'll be prohibitively expensive (time-wise) to develop, suffer bizarre bottlenecks not seen in native code, and have to work through the very limited browser interface. While Assembly demo coders might enjoy the challenge of working in such a limited environment, the rest of the world should wait for some real improvements.

  8. Driver exploits by Anonymous Coward · · Score: 0

    Yay, making graphics driver bugs remotely exploitable, just great. Let's hope NVidia and others keep their careless attitude about possibly exploitable bugs and we'll be in for a lot of fun.

  9. Malware by Anonymous Coward · · Score: 1, Insightful

    Oh boy, I just can't wait for the onslaught of malware-induced popups in fullscreen OpenGL to consume every last FLOP of my graphics device.

  10. To answer my own question... by SanityInAnarchy · · Score: 4, Informative

    Here's a nice summary.

    It seems O3D is higher-level, thus allowing more to be handled by the browser, whereas WebGL forces Javascript to handle just about everything.

    I'm not sure which one I like better. In theory, I like Javascript handling everything. In practice, I don't know enough about VMs to say whether Javascript could be made to perform well enough.

    --
    Don't thank God, thank a doctor!
    1. Re:To answer my own question... by derGoldstein · · Score: 3, Informative

      A common comparison that has been made is that WebGL would be used like Canvas whereas O3D would be more like SVG. (WebGL will be *part* of canvas, of course, but I mean in terms of uses and applications)

      If you want links to many discussions about the approaches and comparisons, check out this page.

      Since canvas is already known territory (comparatively), and JavaScript is being optimized like crazy by all browser developers, I'd bet that you should expect to see WebGL picked up much faster than O3D. Developers that are already comfortable using canvas for some 2D representations will have only a small step to take to reach WebGL.

      --
      Entomologically speaking, the spider is not a bug, it's a feature.
    2. Re:To answer my own question... by Hurricane78 · · Score: 1

      I can tell you, that WebGL is going to be slow as hell, as long as the compiler is not at least as optimized as the Java ones. But it has the advantage of being what you're used to, when you already know OpenGL.

      Now the good and the bad news is, that nowadays, everything that changed in optics in the last 5-10 years is shader-based. Which means it's going to be just as fast as normal software when just loading precompiled shader progams. But it also means a big security risk, because everyone could load a shader in your graphics card on any website.

      I think all in all, it's never bad to have the possibility to do 3D on the web, and have it standardized. But it should be at least opt-in by default. Also don't expect anything too fancy. It will not be able to compete with normal games. Especially without shader support.

      But one good thing to close with: It has the potential of finally blowing Flash out of the water, and freeing us from it. (Putting 3D features in Flash will mean to basically create a new product. I don't think Adobe is quick enough with that.) But what we need for this is: Authoring tools for the creative people out there.

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    3. Re:To answer my own question... by Hurricane78 · · Score: 3, Interesting

      Damn. I forgot the conclusion: That Adobe might (have to) let Flash die, and create that new product based on the new faster JavaScript engines and that 3D canvas straight away.

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    4. Re:To answer my own question... by IamTheRealMike · · Score: 1

      Since canvas is already known territory (comparatively), and JavaScript is being optimized like crazy by all browser developers, I'd bet that you should expect to see WebGL picked up much faster than O3D. Developers that are already comfortable using canvas for some 2D representations will have only a small step to take to reach WebGL.

      Well, there are a few major things in O3Ds favor (btw: full disclosure, I am a Googler but have no particular interest in 3D tech beyond enjoying its products).

      Firstly, O3D is a plugin that can be installed in Internet Explorer today. The IE team hasn't joined in the sudden frenzy of webapp work that the other browser vendors have been doing. That means things not based on plugins will have limited impact if this doesn't change.

      Secondly, O3D embeds V8. Consistent JavaScript performance is going to be an issue for any web-based 3D work. Although it's true that every browser has been getting faster, there are still big differences in what they can do. This may be resolved over time as all the different engines approach the theoretical limits of how fast you can make JavaScript, but until then, having a single known target engine with predictable performance is a win.

      Thirdly, canvas vs SVG isn't really a good comparison. 2D graphics are rarely very complex in the same way 3D graphics are. If 2D graphics had the same data throughput, hardware acceleration and tool integration issues that 3D has then an SVG type model would probably look a lot more attractive than a canvas type model. As it happens, for most 2D work a simpler API works well. I remain sceptical that the same is true for 3D.

      That said, I am by no means an expert. There is a fun 3D platformer game (Infinite Journey) based on the O3D plugin that I tried - if somebody puts together a webgl demo as compelling as that one is, I'll definitely have to rethink my position.

    5. Re:To answer my own question... by SanityInAnarchy · · Score: 1

      as long as the compiler is not at least as optimized as the Java ones.

      They're working on it. I haven't looked at benchmarks -- it may already be there. Picking a random benchmark shows v8 (Chrome's Javascript engine, which is embedded in O3D) to be 300x faster than Python, and I know Python is easily fast enough to make a decent game in.

      Now the good and the bad news is, that nowadays, everything that changed in optics in the last 5-10 years is shader-based. Which means it's going to be just as fast as normal software when just loading precompiled shader progams. But it also means a big security risk, because everyone could load a shader in your graphics card on any website.

      I guess the big question there is whether shaders are a security risk at all. Although I'm sure shader systems haven't been designed with security in mind, what, exactly, can they access? I could be entirely wrong, but it seems to me that they'd be pretty severely restricted -- the worst someone could do is DoS you by slowing down your video card a bunch.

      it should be at least opt-in by default.

      Nah, it should be opt-out by default, and people who want opt-in can use noscript.

      Otherwise... shit, Flash should be opt-in by default.

      It has the potential of finally blowing Flash out of the water, and freeing us from it. (Putting 3D features in Flash will mean to basically create a new product. I don't think Adobe is quick enough with that.)

      I wouldn't underestimate Adobe, nor people's willingness to stick with what they're comfortable with.

      I mean, yes, it has that potential, and I'm really excited, but do not underestimate them. That's why this part is so important:

      what we need for this is: Authoring tools for the creative people out there.

      These authoring tools have the potential to be very cool, but we kind of need to hurry -- assuming that it goes this way, and not O3D.

      What would be especially cool is if Adobe started building authoring tools targeting this, and other open standards like the video tag (and canvas in general). I mean, it would be horrible, too -- Adobe GoLive has created abominations, if you dare to peek at the source -- but it would also mean Flash can finally die.

      --
      Don't thank God, thank a doctor!
    6. Re:To answer my own question... by SanityInAnarchy · · Score: 1

      O3D is a plugin that can be installed in Internet Explorer today.

      Is it impossible that WebGL could ever be done that way?

      I'm starting to think that the best way to deal with IE is to create a Webkit/V8 plugin.

      O3D embeds V8. Consistent JavaScript performance is going to be an issue for any web-based 3D work.

      And V8 may not always be the best engine for that. And since the browser already does Javascript, I'd say leave it to the browser. If it's really a problem for people, the solution is to upgrade the browser, not to install a bigger plugin.

      No, what I like about O3D -- and you'll have to correct me if I'm wrong -- is that WebGL is a very low-level wrapper around OpenGL, whereas O3D is high-level-ish, right? Or, put another way: Would it be possible for O3D to wrap either Direct3D or OpenGL, depending on the platform? That would be a definite win.

      Other than that, from reading that discussion, the biggest thing I like about WebGL is that, like most of the other web standards I know and love, and like the Unix philosophy, it tries to do one thing and well.

      For example, rather than having its own format for loading assets, it's counting on the browser to provide a more generic one -- maybe the ability to have URLs that refer to some location inside a zipfile (or something else reasonably standard). It occurs to me that data URLs could go a long way here as a hack, too.

      --
      Don't thank God, thank a doctor!
    7. Re:To answer my own question... by derGoldstein · · Score: 1

      Is it impossible that WebGL could ever be done that way?

      I'm starting to think that the best way to deal with IE is to create a Webkit/V8 plugin.

      Dibs on that idea!

      And V8 may not always be the best engine for that. And since the browser already does Javascript, I'd say leave it to the browser. If it's really a problem for people, the solution is to upgrade the browser, not to install a bigger plugin.

      No, what I like about O3D -- and you'll have to correct me if I'm wrong -- is that WebGL is a very low-level wrapper around OpenGL, whereas O3D is high-level-ish, right? Or, put another way: Would it be possible for O3D to wrap either Direct3D or OpenGL, depending on the platform? That would be a definite win.

      Other than that, from reading that discussion, the biggest thing I like about WebGL is that, like most of the other web standards I know and love, and like the Unix philosophy, it tries to do one thing and well.

      For example, rather than having its own format for loading assets, it's counting on the browser to provide a more generic one -- maybe the ability to have URLs that refer to some location inside a zipfile (or something else reasonably standard). It occurs to me that data URLs could go a long way here as a hack, too.

      WebGL's biggest advantage (IMHO) is its ease of implementation -- by the browser, natively. Webkit's on board, along with Mozilla and Opera. Ever since Flash, it seems like people have learned their lesson regarding plugins. Don't get me wrong, I think that Gears is very useful, but how often is it updated?

      Getting users to install a plugin on any platform is becoming difficult, it takes the browser vendors themselves to push features. If every browser apart from IE implements canvas3D, then I think you're going to see gradual adoption by the same developers that build on canvas and/or SVG despite IE's lack of (native) support.

      --
      Entomologically speaking, the spider is not a bug, it's a feature.
    8. Re:To answer my own question... by Trouvist · · Score: 1

      Flash IS opt-in by default. You have to install the Flash plugin for it to work at all in the first place!

    9. Re:To answer my own question... by dave420 · · Score: 1

      Flash is still faster for most folks (and of more consistent performance across browsers) than these new JavaScript engines out there. I know it can be misused, but it's still fantastically useful if employed correctly.

    10. Re:To answer my own question... by BZ · · Score: 1

      > This may be resolved over time as all the different engines approach the theoretical
      > limits of how fast you can make JavaScript

      Given that JITs always involve heuristics and that the various JavaScript jits are taking very different approaches, I'm not sure this will happen. I think it more likely that we'll have testcases on which Nitro is 2-5x faster than Spidermonkey and other testcases on which Spidermonkey is 2-5x faster than Nitro (and similar for comparisons to V8) and on which all those numbers will be 2-5x faster than interpreters were 2 years ago (which is about where IE is right now).

    11. Re:To answer my own question... by SanityInAnarchy · · Score: 1

      Except in cases where it's preinstalled, which is often.

      --
      Don't thank God, thank a doctor!
    12. Re:To answer my own question... by pslam · · Score: 1

      I'm a little dismayed that O3D had to introduce a fresh new API, and a high level one at that. This is right when everyone else is moving to simpler, smaller APIs - the big example being OpenGL ES 2. A handy example, because that's basically what WebGL is. I think O3D would have been better positioned as working alongside WebGL as a toolkit for higher level features, in much the same way GLU/GLUT work. As it stands, O3D requires a plugin download and install (even if it works today I still need to download and install it today), requires a learning another API that isn't a neutral standard (even if it is Google) and targets what looks like a very small market.

      A huge advantage of WebGL is again that it's just OpenGL ES 2, but more specifically because this extends it to devices that aren't x86 desktops. Most of the latest "feature" handheld devices (including iPhone) support OpenGL ES 2 either natively or with some CPU-assist (the distinction is muddy on embedded devices anyway!) So they can support it today. Will O3D be as easy to cross-compile for ARM, bearing in mind it also bundles a V8 engine?

    13. Re:To answer my own question... by IamTheRealMike · · Score: 1

      O3D does indeed use either D3D or GL depending on platform. O3D is slightly higher level yes, but not dramatically so (you still have to code up shaders etc). I think we'll end up with both. NaCL integration is the key regardless.

    14. Re:To answer my own question... by SanityInAnarchy · · Score: 1

      O3D does indeed use either D3D or GL depending on platform. O3D is slightly higher level yes, but not dramatically so

      Yeah, I get it about shaders, but "D3D or GL depending on platform" is pretty dramatic, at least for Windows users -- WebGL is likely to be slow with AeroGlass enabled, right?

      --
      Don't thank God, thank a doctor!
  11. Alternatives to Javascript by chrysalis · · Score: 1

    And if you don't want to directly code in Javascript, some great alternative languages can actually compile Javascript code :

    - haXe : http://www.haxe.org/
    - Fan : http://www.fandev.org/

    --
    {{.sig}}
  12. Download for WebGL on Linux yet? by erko · · Score: 2, Interesting

    It there any browser to download that will let us try out WebGL on linux yet?
    Would building the changes into epiphany or midori work?
    I've also tried firefox's canvas3D, but haven''t gotten that to work yet.
    Hopefully the WebGL api will be available from the python plugin in firefox. That would still require a plugin to download, but at least there would be a nice 3D web platform to develop in. (yeah, javascript is ok, but it's not great)

    1. Re:Download for WebGL on Linux yet? by ceoyoyo · · Score: 1

      Here's the list.

      Konqueror, Chrome, Midori. You'll have to compile your choice with a bleeding edge version of webkit, of course.

      Interesting, the Palm Pre also runs webkit.

  13. How will we manage to use this? by joaommp · · Score: 1, Interesting

    How will we manage to use this? Programatically by Javascript, right? Javascript is so limited that I fail to see how it will be to make this actually usable and applicable in useful situations except, as already mentioned before, in heavier and more intrusive advertising schemes.
    I understand that many may have been craving for this, but, to make it really interesting, Javascript also needs some cleanup and some more functionality.
    And, besides, I can already imagine each browser doing it in it's own way and developers having to set up multiple ways to deal with the differences.
    And whatever happened to VRML and X3D? weren't they supposed to also provide such features as WebGL?

    1. Re:How will we manage to use this? by Anonymous Coward · · Score: 0

      Wait, what? Javascript is a limited language? Since when? What features are you lacking in Javascript that you couldn't write a game in it?

      Just because it's got prototype based inheritance instead of class based doesn't mean that you can't code in it, only that you need to learn JS properly beforehand.

    2. Re:How will we manage to use this? by farnsworth · · Score: 3, Insightful

      How will we manage to use this? Programatically by Javascript, right? Javascript is so limited that I fail to see how it will be to make this actually usable [snip] Javascript also needs some cleanup and some more functionality.

      Like what? It's a very rich language which is a pleasure to use. The historical short-coming has been it's libraries (primarily the DOM). But the language itself is really nice, as nearly anyone with enough experience will tell you.

      And, besides, I can already imagine each browser doing it in it's own way and developers having to set up multiple ways to deal with the differences.

      This is the case with all standards. If there are significant implementation errors, higher-level libraries will emerge that "fix" them for the users of this API. Ajax is different between browsers, is this a problem for anyone? No, there are multiple free libraries that are super-simple to use that make the right call in each browser. $.ajax({url: "foo.html"}); Just Works (tm).

      --

      There aint no pancake so thin it doesn't have two sides.

    3. Re:How will we manage to use this? by joaommp · · Score: 1

      oh, so you're just assuming I don't really know Javascript, because Javascript has prototype based inheritance instead of class based inheritance, which I actually can live with and didn't even mention. nice.

    4. Re:How will we manage to use this? by joaommp · · Score: 1

      ok, I'll give you that. "the language itself", has about everything most languages do. but there are some things that in other languages you can find in libraries that you can't find in javascript. Javascript DOM, although not exactly from the language, isn't exactly a library either. If you see, it is, let's say, a javascript primitive. Several features are unavailable and unimplementable because all libraries for javascript are implemented over javascript primitives, which, although a very good set but, could take, at least, some polishing.
      Yes, I know there are a lot of libraries to wrap above the browsers API's and hide the differences. But how many hours were spent and wasted creating those libraries just to support several platforms, due to the fact that the browsers sucked on the implementations, when the developers that had to create those libraries could very well be spending that time on developing the projects they were trying to in the first place, when they realized they were in for major trouble?

    5. Re:How will we manage to use this? by loufoque · · Score: 2, Informative

      Javascript is so limited that I fail to see how it will be to make this actually usable and applicable in useful situations

      Javascript is not particularly limited. It is turing-complete, of course, and provides a nice type system: dynamic duck typing on top of a prototype object oriented type design. It has garbage collections, closures, reflection...
      Probably more expressive and flexible than your average programming language.

      Maybe what you mean is that it is lacking a bigger standard library.
      Well, as it is, it is certainly much bigger than the standard C one.

    6. Re:How will we manage to use this? by joaommp · · Score: 1

      yes, I mean it's standard functions, but it doesn't matter if it bigger or smaller than any other language's standard library. What matters is if it's complete (or near enough) or not for the job it was designed to.

    7. Re:How will we manage to use this? by Anonymous Coward · · Score: 0

      Javascript is OK as a language. It has its WTFs because it was designed as a hack, but if you avoid certain practices it's quite usable. You'll have to throw in some more parens and curlies than in other scripting languages, but it works.

      Of course a scripting language is not so suitable for describing a 3D world. But once WebGL is stable and implemented, I'm sure someone will write a Javascript library for X3D, so that you can embed X3D directly in a script tag and have it rendered to WebGL. Or use COLLADA, or some new JSON3D dialect. Crash-happy, hardly scriptable 3D plugins goodbye.

    8. Re:How will we manage to use this? by joaommp · · Score: 2, Insightful

      The problem is, when will we have the chance to stop using wrappers to solve the problems caused by the divergence between different platforms, that only add additional dificulty, performance penalties, files, etc. When will developers be able to focus on creating new stuff from the start, instead of needing to first create ways to solve the problems created by others?

    9. Re:How will we manage to use this? by Anonymous Coward · · Score: 0

      oh, so you're just assuming I don't really know Javascript, because Javascript has prototype based inheritance instead of class based inheritance, which I actually can live with and didn't even mention. nice.

      well now that I know that you know about how inheritance works in JS...I have to just assume you aren't much of a software engineer.

    10. Re:How will we manage to use this? by joaommp · · Score: 1

      so, once again, you're just assuming.

      assuming I'm a bad software engineer because I know how inheritance works in JS? wtf? are you serious?

      or are you saying "you know the language, but you have the opinion that javascript's features aren't enough, so you're not a good software engineer".

      so, you complain that your car doesn't have front fog headlights, so you're not much of a driver.

      "your opinion is negative about/somehow criticizes X, so, you're not a good X user."

      again, if I haven't yet made myself clear in the other posts in this same discussion, I'm not complaining about the core language itself. That I know more than enough. I was complaining about the periferic features and primitives like the base functions.

  14. Re:Browsers might be ready for GL but not Javascri by SanityInAnarchy · · Score: 2, Interesting

    Invariably these games use 99% of the CPU because Javascript doesn't have a real sleep() function.

    setTimeout doesn't work? Or setInterval, if you're going for a specific framerate?

    There's no decent way to manipulate sounds (like an FMOD for javascript).

    You could play them with the audio tag. I guess the question is whether you can actually manipulate beyond play, pause, seek, and volume... Then again, it doesn't take much more than that to start to do 3D.

    There's no way to switch to full screen

    I agree, this should be addressed. Actually, I have some ideas of how a browser might implement this, if you're interested.

    or to capture every key stroke/mouse movement.

    No, but you can capture enough of them to make a game.

    there's no decent debugger.

    Firebug isn't "decent"?

    3D games sound like a nice idea but they'll be prohibitively expensive (time-wise) to develop, suffer bizarre bottlenecks not seen in native code, and have to work through the very limited browser interface.

    Granted. On the other hand, they'll be more accessible, they'll have access to the browser (and navigation, bookmarks, etc), and I know of no other platform where I could imagine clicking a link on a webpage and being inside a game in less than a second.

    --
    Don't thank God, thank a doctor!
  15. Re:Browsers might be ready for GL but not Javascri by wumpus188 · · Score: 1

    I feel your pain, man.. Been developing "web 2.0" (hate that word) apps for the past 4 years, I can say that lack of sleep() and any real threading support in Javascript (Prototype's defer() and its friends is not an answer) is the biggest obstacle. Won't someone think of poor web developers?

  16. I'm probably not the first person to say this... by MadnessASAP · · Score: 3, Funny

    but oh god no! I can only imagine the horrors that will be visited upon the Internet once MySpace users get a hold of this.

    --
    I may agree with what you say, but I will defend to the death your right to face the consequences of saying it.
  17. Macs and Iphones Everywhere! by mdwh2 · · Score: 0, Flamebait

    which means it probably won't be too long before Macs and iPhones everywhere get OpenGL web apps.

    I hear that it might be possible for those PC things to be able to run this too, what with OpenGL being cross-platform and all. Of course, that's probably only of interest to a few of us here on Appledot.

  18. Remember Web3D? Shockwave? Java 3D? by Animats · · Score: 4, Informative

    This is about Try #4 for 3D on the Web. Web3D was an XML representation of VRML. Unfortunately, the effect of the Web3D consortium was to kill VRML in favor of a vaporware concept.

    3D in the browser is done well in Macromedia Shockwave. Try this 3D driving game. The Shockwave player is supposedly available on 58% of PCs. Some versions of Shockwave even had the Havok physics engine, but Macromedia stopped paying Havok for the license and took that out.

    The main problem with Shockwave is that it doesn't start as fast as Flash does. Flash has a nice scheme for interleaving the timeline and the asset data, so that playing starts very quickly. At least if the content is authored properly. Also, Shockwave authoring tools are expensive.

    About Java 3D, the less said, the better.

    The problem with offering OpenGL access to Javascript is that Javascript isn't a good language for fast matrix math. Also, authoring tools will have to be developed. You can't effectively author 3D content in a text editor.

  19. Re:Browsers might be ready for GL but not Javascri by sglane81 · · Score: 2, Interesting

    ...these games use 99% of the CPU...
    You're doing it wrong (TM). I am working on a game right now, 2 months so far, which has animations and other eye candy and uses no where near 100% CPU on a 4 year old core2duo laptop. It looks like the original Legend of Zelda on the NES or FF 1-6. http://www.cindervale.com/
     
    ... and it runs on everything back to IE 6 AND BEYOND. Fully supported browsers include IE 6 (2001), IE 7, IE 8, Firefox 1.0, Firefox 2.0, Firefox 3.0, Firefox 3.5, Safari 3.1, Safari 4, Opera 9/10, Chrome / Chromium, and iPhone.

    What people don't realize is that you don't need the canvas element. If you use the canvas element, you are defeating the purpose of a web game since the web is all about accessibility. In a few years, yes, use it heavily! By using the canvas, you create an artificial barrier to entry for your players by saying "your must be on the bleeding edge to play."

    There's no decent way to manipulate sounds
    100% agreed! Hell, you can't even use MIDIs anymore!

    There's no way to switch to full screen or to capture every key stroke/mouse movement.
    I can't think of a single key on normal keyboard that can't be captured. Shift, alt, control, etc are all capturable. Mouse movement is the same.

    As far as full screen, have the user press F11. All browsers I'm aware of use this same binding. Then use a bit of JS to get the desktop resolution and the window dimensions to verify.

    It seems that what you are experiencing is game design problems. Try designing games with the limitations in mind rather than trying to design a game then making it fit with the technology.

    --
    This is the Internet. You can say "fuck" here. - AC
  20. Why shouldn't they? by mdwh2 · · Score: 2, Insightful

    But adding a high-end graphics card to a computer just to view the web? Thats just a bit ridiculous.

    Equally ridiculous is the suggestion that you need a "high-end graphics card" to run OpenGL. This isn't 1998 anymore.

    Also ridiculous is the suggestion that this will be mandatory for web pages in general. You might as well claim that Google maps shouldn't exist, because good webpages ought to be viewable in Lynx. Or that YouTube shouldn't exist, because webpages ought to be viewable on computers with small amounts of CPU power. Or that Java shouldn't be allowed, because someone could write an application that uses a lot of your CPU power.

    There's nothing wrong with having extra technologies when they're needed - such as someone doing an online game. Yes, it'll be stupid if someone requires a 3D card for what should be a simple webpage, but that's no different to them using Flash, or any other kind of CPU-hungry code. It's 2009 - 3D hardware support has been bog standard for years, and isn't any different to a website that requires a lot of CPU or RAM. Just as any computer these days has the CPU power to decode a YouTube video, they also have the GPU power to run OpenGL. Yes, someone could write an annoying webpage that sucked up your GPU power, but they could have done that to your CPU power for over a decade with Java.

  21. Re:Browsers might be ready for GL but not Javascri by appleprophet · · Score: 3, Informative

    While Assembly demo coders might enjoy the challenge of working in such a limited environment, the rest of the world should wait for some real improvements.

    Most of your complaints have been addressed in other modules of HTML5. See the media module for native sound support and web workers for threading support.

    Regarding debuggers, there are a few excellent debuggers for JavaScript capable of profiling and doing all sorts of stuff. The most notable being WebKit's native Web Inspector and the FireBug extension.

    Performance concerns with "fill color" and such are not an issue because they are offloaded to the graphics card.

    Full screen mode is controlled by the user agent, not the web page for obvious reasons. Most browsers have support for a full screen mode in some fashion.

    Now this is not to say that it's perfect. However, things are looking pretty good. :) This is definitely the future, the question is just how long will it take to get there.

  22. 3D world by Anonymous Coward · · Score: 1, Funny

    Multiplatform 3d pornz coming on the way! On every device that has a browser!

  23. OpenGL != Fullscreen by mdwh2 · · Score: 1

    You'll be waiting a long time, then.

    Fullscreen mode is not handled by OpenGL, it's handled by the Windows API (or whatever OS you're using) - ChangeDisplaySettings. With this, you'll be using whatever's provided by the browser. Since, last time I looked, you couldn't call Windows API functions or otherwise go fullscreen using a browser, I don't see how adding OpenGL support would change anything.

    Could you explain how this would be possible?

    As for consuming your GPU power, anyone could do the same to your CPU right now, using Java or whatever else. If you're that worried, you'd better keep clear of the web altogether.

  24. Re:I'm probably not the first person to say this.. by osu-neko · · Score: 1

    but oh god no! I can only imagine the horrors that will be visited upon the Internet once MySpace users get a hold of this.

    Why are you visiting MySpace so much if you don't like what they're doing there? Alternately, if you aren't visiting MySpace, why would you care what they do with this one way or the other?

    "Someone, somewhere, is doing something I don't like. They must be stopped!" :p

    --
    "Convictions are more dangerous enemies of truth than lies."
  25. Define "Fine." by RulerOf · · Score: 1

    An "underpowered GMA chipsets" can still run stuff like Morrowind fine.

    I've never played Morrowind, but I can say for sure that a brand-spanking-new q6600 dell box that shipped with a GMA chip couldn't even play DotA (Warcraft 3, for those who don't know) at a resolution higher than 800x600. With all the video options turned down.

    That engine predated the GMA chip by 7 years or more, but would lag under 20 fps in even the lightest of conditions.

    Intel's graphics chips are utter shit, and they're holding the entire computing industry as far as 3D graphics are concerned.... Where oh where is that Larrabee we keep hearing about?

    --
    Boot Windows, Linux, and ESX over the network for free.
    1. Re:Define "Fine." by promythyus · · Score: 1

      You bought a wonderful Q6600, and paired it with a Intel graphics chip??! You poor bastard.
      And what do mean Intel's chips hold the entire industry? I was under the impression nVidia and ATi/AMD were the industry leaders when it comes to Graphics?

    2. Re:Define "Fine." by mdwh2 · · Score: 1

      Oh, I agree it's annoying the way that Intel graphics have become so widespread when they're not the best by far. But that wasn't what the OP was about.

      And on the contrary, by this reasoning we should be glad if decent 3D hardware became a requirement for the web (even though I don't think it will), because that'll either force Intel to improve, or they'll lose market share to NVIDIA and AMD/ATI, either way it will be good for 3D graphics.

    3. Re:Define "Fine." by RulerOf · · Score: 1

      The system shipped that way stock from Dell. A video card was added later, but nonetheless, I wanted to use the system in the meantime.

      Also, whilst ATI and nVidia are the leaders in performance graphics hardware, Intel is by far the market leader in actual units shipped. Last statistic I actually saw--which, I'll admit, was years ago--Intel graphics chips ship in about 75% of all machines.

      Very few machines get aftermarket cards.

      --
      Boot Windows, Linux, and ESX over the network for free.
  26. Re:Browsers might be ready for GL but not Javascri by am+2k · · Score: 1

    As far as full screen, have the user press F11. All browsers I'm aware of use this same binding.

    Uh, I guess you've never tested this on a Mac.

  27. Re:I'm probably not the first person to say this.. by Anonymous Coward · · Score: 0

    And just in time for 3D TVs to hit the mainstream, too!

  28. Re:Browsers might be ready for GL but not Javascri by Hurricane78 · · Score: 1

    Uuum... what are setTimout() and setInterval(), if not sleep() functions? Or are they "implemented" as tight loops? ^^ I don't think so.

    But I agree on sounds and general slowness.

    I think JavaScript will go trough quite a lot of change, which has already started. And it will come out as a pretty well performing JIT-compiled scripting/programming language.
    But what I really would wish, is for other languages being implemented in the browser. With a generic (FAST) VM around it.
    Then (pre-compiled?) even C++ or Haskell should be doable in the browser.

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  29. Re:I'm probably not the first person to say this.. by Hurricane78 · · Score: 1

    Why do you go to MySpace then? Especially with all that stuff turned on? Maybe you are a masochist and haven't realized it? ^^

    It's OK. We can... uuum... accept... you... anyway... *cough*. ;)

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  30. Re:Remember Web3D? Shockwave? Java 3D? by Hurricane78 · · Score: 1

    You can't effectively author 3D content in a text editor.

    PovRAY and me would like to disagree with that. ^^
    I found that I have this ugly feeling of everything not being at the *exact* correct position, with the *exact* correct curves, when using software like Maya or 3DStudio Max. And I can't stand working like that. It feels like dirty "spaghetti-designing".
    That's why I like PovRAY so much.
    But now that Maya has adopted Python as its scripting language, I must say that I'm pretty happy with that too. ^^

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  31. It is time to split... by FlyingGuy · · Score: 2, Interesting

    the web into two very distinct flavors:

    • The Application Model:
      • This is the model wherein the browser becomes an application execution environment. The box model is created as a function, menus are a function all the primitives for applications, grids, drop downs, pick lists become a function that is executed natively with the UI tools of the native GUI that exists in windows, linux, osx etc. There is no trying to flow things around with style sheets, div within div within div surrounded by yet another div. All GUI's have addressable screens and the objects created thereis stay where you put them now matter what happens to the application window that the as set up by the browser does. This is the same as the MDI model, it works, it just needs to be replicated.
    • The HTML Model:
      • This is the web as it currently exists, with all the strangeness and wonder that it is, HTML, style sheets and the like to allow text to flow smoothly, images to be included, but even this still needs work. the float:center tag needs to be implemented so text can flow evenly around a fixed image. Things likes snaking columns need to be realized in a simple for so that a tag like < column type="snake" width="30 pct" > [content] </column>. HTML has a long way to go before it truly meetd the needs of on-line publishing.
    --
    Hey KID! Yeah you, get the fuck off my lawn!
    1. Re:It is time to split... by BZ · · Score: 1

      The problem is that people want a mix. Your typical news site wants text flow with a navigation+multimedia application around it. gmail wants text flow with a mail client around it. Google docs wants text/flow with a word processor around it. A wiki often enough wants text flow with an HTML editor around it (though some wikis are of course still using textareas for editing).

    2. Re:It is time to split... by bonch · · Score: 1

      This is the model wherein the browser becomes an application execution environment.

      My problem with this is that I already have a fast, efficient application execution environment complete with standardized APIs--the operating system. Why would want to run an application to run applications?

    3. Re:It is time to split... by FlyingGuy · · Score: 1

      LOL! Good question...

      Well it is this whole web paradigm. We keep trying to make an application environment out of a presentation markup language with kludges like Ajax and the like and it does not really work well, at least in my opinion.

      I like the idea of the split because it allows me to put an application shell, that does not change any more then say, browser versions to do what is very very poorly done now with a web browser.

      Take for instance the current HTML & CSS box model. It requires a div with all sorts of markup for things like floating, width, height and some content within the div. Bu because html is a presentation language that is supposed flow into and around other elements present itself cleanly even while the browser window resizes and the like, you then have to start working with absolute or relative positioning and then all the craziness if you change the border / margin / padding and then everything starts scrolling all over the place.

      I would much rather create applications in a specific environment that would do something like:

      MyBox = box.new([a set of basic parameters]) and those parameters would be the basic size and location and colors and such. Now you can use the object model and then something like RecEmail = MyBox.checkBox.add([set of parameters]) and so forth and so on.

      Those calls would then be simple calls to the OS to make the same components in the native GUI. The nice part about this is that the application shell can be hard sandboxed and hard rooted to a specific section of the local machine. The other part would have to have a scripting language all its own for things like RecEMail.OnClick = MyBox.Background = "red" ; or something like that.

      --
      Hey KID! Yeah you, get the fuck off my lawn!
  32. Re:Remember Web3D? Shockwave? Java 3D? by mdwh2 · · Score: 2, Informative

    Javascript isn't a good language for fast matrix math.

    The matrix calculations required for rendering are done by OpenGL, not the caller programming language (the advantage of doing this way is that it can be hardware accelerated).

    Also, authoring tools will have to be developed. You can't effectively author 3D content in a text editor.

    I'm unclear what sort of tools you refer to? Presumably people would use the same 3D modelling software they'd use for any other OpenGL application.

    OpenGL has the advantage over the other things you list in that it's (a) an existing widely used API, and (b) it has hardware acceleration support.

  33. Re:Browsers might be ready for GL but not Javascri by Anonymous Coward · · Score: 0

    sigh.. browsers are NOT designed for low latency programs like games. quakelive gets around it by using a separate plugin that bypasses the browser process. ALL flash games lag to some extent, and of course it is worse when there is no gpu acceleration for the vector gfx.

  34. Re:Browsers might be ready for GL but not Javascri by Prof.Phreak · · Score: 1

    also don't forget true "arrays"; as is, I think it takes lg(n) time to access array elements.

    --

    "If anything can go wrong, it will." - Murphy

  35. Re:Browsers might be ready for GL but not Javascri by ardor · · Score: 1

    Hmm, imagine LLVM in a browser..

    --
    This sig does not contain any SCO code.
  36. Really? by Anonymous Coward · · Score: 0

    "I don't think many people expected browser-based, hardware-accelerated graphics this soon."

    Ask the guys at Wild Tangent...10 years ago...

  37. Re:Remember Web3D? Shockwave? Java 3D? by ardor · · Score: 2, Informative

    The matrix calculations required for rendering are done by OpenGL, not the caller programming language (the advantage of doing this way is that it can be hardware accelerated).

    No they are not. The vertex transformations are hardware accelerated. The matrices itself are done either by the application of by the driver (when calling something like glTranslate). Matrix manipulations never ever are done by the graphics hardware.

    --
    This sig does not contain any SCO code.
  38. Re:Browsers might be ready for GL but not Javascri by Secret+Rabbit · · Score: 1

    Invariably these games use 99% of the CPU because Javascript doesn't have a real sleep() function.

    It's called timer. Use a timer. Javascript is event driven. Use a timer.

    There's no decent way to manipulate sounds (like an FMOD for javascript).

    Well, there's SoundManager (flash) and one could do similar things with a Java interface.

    3D games sound like a nice idea but they'll be prohibitively...

    Well, you loose here because every game that's on a different platform has such issues. EVERYTHING that's developed cross-browser (i.e. cross-platform) or on multiple consoles (i.e. cross-platform) or on PC/Mac/Linux (i.e. cross-platform) has such issues. When it comes to performance, I should mention that not too long ago Canvascape was unplayable (no textures) on my computer. But, recent performance improvements makes even the textured version playable.

    In all seriousness, what I see you doing is thinking of modern games that are on the consoles, etc and putting something like that on the web. Are you sure that's a good assumption? Because, with what I see of the 2d canvas games, they are quite reasonable. Why wouldn't we expect the same of the 3d variety? i.e. You've made a bad initial assumption and ran with that. Fail.

  39. Goes deeper than just WebGL... by nulled · · Score: 2, Funny

    I think a lot of people fail to see the coincidences of this.

    1) MS announces BING
    2) Founder of Google personally leads a team to investigate and potentially retaliate. (MS just HAS to get into EVERYONE's business)
    3) Google Chrome and OS is announces, officially.
    4) WebGL is announced.
    5) Google Native Client is being heavily developed and will be the core of WebGL use.

    It is a war folks. a Tech war. MS is trying to take more search market shares with the Yahoo/Bing deal. Google is not going to tolerate this, as it is a DIRECT threat to Googles AD business. (Bing actually has a crap ton od marketing behind it and is gaining market share fast.)

    Google is not playing Mr. Nice guy to MS anymore.

    Welcome to Google OS... while many think this will just be a Linux kernel running Chrome and using the WEB for web apps... Google is also doing some key things.

    1) Improving Kernel Linux ( remember the null pointer exploits found? Everyone was wondering, what is Google doing hiring top grade Black hat hackers to look for vulnerabilities in the kernel? To get it ready for world domination is WHY!!!

    Google is also going to write 'from scratch or maybe' a new X server, as the current one has problems... it will make X.org work the way everyone wanted it to... with millions in money and research, google can afford a rewrite, than release it all as Open Source, like they have already done with CHROME and Native Client.

    2) Chrome Browser/OS has been in the works for a while, and MS responds with BING, but Google only exclutes the situation with announcing an OS as well.

    3) WebGL is MORE than just a replacement for flash.

    WebGL + Google native Client allows 3d gaming, they also mention in Google 'Talk Videos' that you will be able to make full fledged Multi Media Products (hint hint... another PhotoShop, 3dsmax, Audition (formerly Cool Edit Audio Editing ) and games.

    What does this all mean?

    It means Google OS. It means that safari, opera and Chrome OS ( Firefox will follow ) have more market share than Microsoft.

    The browser has shown ( and MS has known this since the famous MS internal email 'INTERNET TIDAL WAVE' written by Bill Gates in 1995 in response to the Netscape/Java platform emergence ) is a direct THREAT to MS as a platform.

    The Open Source will soon have their own version of Direct X ( called OpenGL or WebGL ) BTW. openGL standard has come a LONG way in a SHORT mount of time to catch up with Direct X and supporting Shader Model 1,2,3 and beyond... this is become google and apple are supporting it for the new OS take over.

    The Google OS with Browser will beable to BY PASS Microsoft... the Internet Tidal wave has HIT. THe only reason Netscape failed, was because it's revenue source was the Browser, MS was able to cut that 'artery' with a quickness. But, Google does not make money with anything by ADs, which MS can not touch. They can not STOP google in any way shape or form from going what Netscape tried to do 15+ years ago...

    BING is pissing Google OFF and now its game over.

    To learn more google for the following topics and read carefully...

    1) google native client (watch the videos)
    2) google os
    3) WebGL (kronos group) an all open source affiliation group
    4) Bing triggers google response

    Google Native client will be platform independant. which means you can run it all in Apple, Windows and Linux... Google's claim is that it wants full reach for their Ads,as the Web has already become platform independant.

    Google OS will be OPEN SOURCES, FREE and no worries of vendor lock in.... of course there are people that think Google has gotten too big and a data hog... but at least the OS will be Open Sources.

    Gone will be the days of BOTNETS, which threaten ecommerce... Google is partnering with everyone NOT Microsoft... which equates to one thing... more Ads for Google...and a NEW OS paradigm for the worldd.

    yes, javascript right now is a but slow.. but in recent times it has seen a

  40. Re:Remember Web3D? Shockwave? Java 3D? by Secret+Rabbit · · Score: 1

    The problem with offering OpenGL access to Javascript is that Javascript isn't a good language for fast matrix math.

    Yah, because it's not like the underlying javascript engine, where the matrix math is actually run, couldn't be enhanced...

    Similarly to your other complaint.

  41. Re:Remember Web3D? Shockwave? Java 3D? by Animats · · Score: 1

    If you want a sense of how far Shockwave can be pushed, try Maid Marion. They have a halfway decent 3D multiuser RPG that runs in a browser. Looks about as good as Everquest of a few years ago. There are guilds, monsters, dungeons, items, PvP combat - all the usual stuff. The game mechanics, like collisions, ground contact, and camera control, are all reasonably decent, if well behind modern console games.

    If Adobe could just solve the loading time problem, as they did for Flash, this would be the solution to 3D on the Web.

  42. Re:Browsers might be ready for GL but not Javascri by Aggrav8d · · Score: 1

    setTimeout/setInterval doesn't actually surrender control of the thread back to the CPU. My CPU monitor says 99% usage, even when I set long intervals.

    Yes, you could use the audio tag. But good luck getting the sound to play at the moment you request it, and fat chance of getting multiple sounds to overlap.

    Firebug is the best thing I've found for doing stack traces but it won't tell you where your typo is. If you made a significant change it can be a PITA to track down.

    Less than a second to be in a game? I don't think you appreciate how long it takes to load resources before the game is actually running.

  43. Re:Browsers might be ready for GL but not Javascri by Aggrav8d · · Score: 1

    Which timer? SetTimeout? SetInterval? Both are failures. I might as well use Date and a while() loop. :P

    SoundManager2 is a Flash app. That I need to step outside of javascript to get something done demonstrates javascript's failure to be ready for multimedia.

    I don't believe that I "loose". I'm trying to write simple 2D games and I would hope that unloading some work onto the GPU would speed things up, because writing all my own rasterizing code would be a big time sink. I'm not trying to write the next Quake, I'd be happy with a Braid or Snood. I think you see what you want to see, and then accuse me of making assumptions. Double fail.

  44. Re:Browsers might be ready for GL but not Javascri by BZ · · Score: 1

    > Performance concerns with "fill color" and such are not an issue because they are
    > offloaded to the graphics card.

    The original poster's concern was with _setting_ the fill color. Since the format for the set is a string that allows the full CSS color syntax and hence has to be parsed with a full CSS parser, changing the fill color is in fact somewhat expensive. It's comparable in time spent to the fill operation itself in browsers last I tested.

  45. Re:Remember Web3D? Shockwave? Java 3D? by mdwh2 · · Score: 1

    I was careful to say "can be", not "are always". By "matrix calculations" (not "manipulation") I include multiplication of a matrix with a vector, which can be hardware accelerated.

    Whatever the OP meant by "fast matrix math", it's something that is handled by the API, and doesn't have to be done using Javascript, so I don't see how the speed of Javascript affects it. (Although I admit I meant to say "one advantage" rather than "the advantage".)

  46. Re:Browsers might be ready for GL but not Javascri by SanityInAnarchy · · Score: 1

    setTimeout/setInterval doesn't actually surrender control of the thread back to the CPU. My CPU monitor says 99% usage, even when I set long intervals.

    Sounds like you're Doing It Wrong.

    Seriously, take a block like this:

    function tick() {
    // do some stuff
    }
    setInterval(tick, 1000);

    I guess it depends what you mean by a "long interval", but that definitely doesn't take 100% CPU for me.

    good luck getting the sound to play at the moment you request it,

    Have you actually had a case of this being a problem?

    it won't tell you where your typo is.

    If your file is so big you can't find a typo, your file is too big.

    If you made a significant change it can be a PITA to track down.

    If you made a significant change without testing, you're Doing It Wrong. See TDD, for one.

    Less than a second to be in a game? I don't think you appreciate how long it takes to load resources before the game is actually running.

    I think you're assuming all of these resources have to be loaded ahead of time.

    --
    Don't thank God, thank a doctor!
  47. Flashblock vs. Noscript; 0.05 Mbps download by tepples · · Score: 1

    IE can't do Flash without a plugin. IE can't do SVG without a plugin. What's the difference?

    The IE plug-in for SWF is preinstalled on most PCs, unlike the IE plug-in for SVG. The IE plug-in for SWF is mature, unlike the IE plug-in for SVG and the nonexistent IE plug-in for the <audio> element. The authoring tools for SWF are more mature than the authoring tools for animated SVG with synchronized audio.

    And I have to point out, I don't think you really mean "many browsers". I think you mean "IE".

    Sixty percent of browsers are IE.

    A geek, on the other hand, can install Linux and make an old system useful again.

    Unless the old system has Windows-only hardware.

    Would adblock suddenly stop working? How about noscript?

    Again, like so many other things in your response, this is already an issue with Flash.

    Flashblock blocks SWF and only SWF. Its user interface is more focused than that of, say, noscript.

    If it's properly sandboxed, there's not a lot it can do.

    I think grandparent's point is that a new API will likely not be "properly sandboxed" from day one. There will be holes.

    The rest are vulnerabilities in the API exposed to Javascript

    And WebGL is exactly that: a new API exposed to JavaScript, according to the press release.

    it's also such a simple API to begin with that the vulnerabilities are, again, likely to be in drivers, not the browser.

    Malware authors would love to prove you wrong.

    No download time.

    It takes time to download the JavaScript, maps, meshes, and textures. This isn't any faster just because your game is in JavaScript. And a lot of people are still limited to 0.05 Mbps Internet throughput; to download games, they have a CD or DVD shipped using the postal service.

    Flash lets you run languages other than Javascript

    JavaScript and ActionScript are pretty much the same language, as I understand it.

    1. Re:Flashblock vs. Noscript; 0.05 Mbps download by SanityInAnarchy · · Score: 1

      nonexistent IE plug-in for the element.

      There is, however, an IE plug-in for generic audio and video -- that's object/embed, with a straight mpeg, wmv, or something else readable.

      Sixty percent of browsers are IE.

      Sixty percent of users use IE. That's a meaningful distinction -- it's much easier to get those 60% to migrate to something else, than it would be to fix 60% of the kinds of browsers out there.

      Unless the old system has Windows-only hardware.

      The older the system, the less likely this is to be true. And even in cases where it is true, it is again a case where a geek could keep a clean Windows install running smoothly, whereas an ordinary user would decide it's "too slow" and just throw money at the problem.

      Flashblock blocks SWF and only SWF. Its user interface is more focused than that of, say, noscript.

      It seems very likely that something similar would appear for WebGL, or more generally, for Canvas-style elements.

      I think grandparent's point is that a new API will likely not be "properly sandboxed" from day one.

      In other words, it will be properly sandboxed later.

      I can stand the growing pains, knowing it leads to a much better platform than we have right now. Right now, there are holes in our procedure -- I mean, I'm not even sure The Power of Paint saves a config file, let alone savegames, yet in the current model, it has write access to my entire hard drive, not to mention running programs. That has to stop.

      Malware authors would love to prove you wrong.

      I'm sure they would -- but I suspect they'd prove me right, by exploiting the drivers.

      Which, by the way, really need to be fixed anyway. The way things are today, I should be able to download a game demo, or just a cool game, and install/run it as an unprivileged user. If there's a hole in the driver, I can't reasonably expect to do that.

      It takes time to download the JavaScript, maps, meshes, and textures. This isn't any faster just because your game is in JavaScript.

      It's true, Javascript isn't the reason -- though it could be part of the reason.

      First, let's consider an extreme: Procedural generation. There exists a first person shooter which fits into 96 kilobytes. It's not instant, as it has to do the generation -- but there's also the part where you'd have to download it, run it, click "yes" to the security prompt, etc etc -- as you should, since it actually is a security hazard.

      Now, consider that games have gotten fairly good at streaming game content. You can play all the way through Halo 2, or Jak and Daxter, without having to see a single loading screen.

      So the only latency here are, not all the maps, meshes, and textures, but just enough to draw what the player can see at the beginning. The rest can be streamed on demand.

      And before you say "too much bandwidth", it's probably a lot less than streaming HD video, which is something else some of us can already do.

      Now, you could do this with a downloaded game -- and indeed, Steam does this with the original Half-Life (though it doesn't seem to work for any of their other games) -- that is, download a tiny downloader, then stream the game as needed. But here, there's still a ton more setup that has to be done than just clicking a link in the browser -- and this is a poor example, as Steam stops downloading while you play, waiting until you change levels.

      And you're still dealing with both trusting a random file from the Internet, and reinventing the wheel -- the browser already knows how to cache things, and how to relate several resources by URIs, and these things together mean it also knows how to auto-update -- basically everything Steam does is a natural property of browsers and webpages. That's another cool feature for the user, t

      --
      Don't thank God, thank a doctor!
  48. too bad 40% of Web browsers can't use it by spikeham · · Score: 1

    HTML5 canvas has a lot of potential. Once accelerated 3D graphics in the browser is standard, the potential uses and demand for content will be huge: visualizations, innovative interfaces, attention-grabbing content, digital art, games...
    But IE doesn't support canvas so any site that relies on it for anything more than trivial rendering will be unusable by almost half of Internet users (current IE browser share: ~40%, according to w3schools). Probably Microsoft sees canvas as a threat to Silverlight so won't work with it until they absolutely have to.
    Here's a canvas animation demo I wrote. Looks fine on Firefox, Chrome, Safari, iPhone... barely works on IE using emulated support for the canvas element.

  49. No T&L on Intel GMA by tepples · · Score: 1

    It's 2009 - 3D hardware support has been bog standard for years, and isn't any different to a website that requires a lot of CPU or RAM.

    Low-end PCs, especially notebooks, still have Intel video. Like Voodoo3 cards from a decade ago, Intel GMA video chips don't accelerate transformation/lighting/vertex shading.

  50. Not rejectable by tepples · · Score: 1

    But you might as well just use the iPhone SDK so you don't have code all the touch interaction crap from scratch. If you coded it in WebGL what is the bonus that you got from doing that?

    Web apps can't get rejected, nor do they have the average 2-week delay.

  51. Boop, boop, boop by tepples · · Score: 1

    or to capture every key stroke/mouse movement.

    No, but you can capture enough of them to make a game.

    For one player. Otherwise, two players have to share a keyboard, and down that path lies "boop, boop, boop" when too many keys are held down.

    I know of no other platform where I could imagine clicking a link on a webpage and being inside a game in less than a second.

    On what kind of connection? Unless the game is something the same size as a 24 KB puzzle game, you'll run into problems while waiting to push maps, meshes, and textures through a sub-1 Mbps connection.

    1. Re:Boop, boop, boop by SanityInAnarchy · · Score: 1

      Otherwise, two players have to share a keyboard,

      So plug two of them in? USB keyboards are cheap.

      That, or have the other person use another computer. It's not as if it'll be hard to install.

      down that path lies "boop, boop, boop" when too many keys are held down.

      Is this a limitation of the OS, the browser, or the hardware? I'm guessing the hardware, but that's just a guess.

      you'll run into problems while waiting to push maps, meshes, and textures through a sub-1 Mbps connection.

      See my other post.

      And on a sub-1mbit connection, it still seems quite feasible to expect thirty seconds to a minute -- as good as some Flash games, or YouTube on slower connections (buffering). Still doesn't make it less cool on faster connections, or for smaller games. And certainly doesn't mean we shouldn't pursue it, when we all know bandwidth is expected to increase steadily.

      --
      Don't thank God, thank a doctor!
    2. Re:Boop, boop, boop by tepples · · Score: 1

      So plug two of them in? USB keyboards are cheap.

      But once I've plugged two keyboards into a hub, both players will expect to be able to use the same keys (e.g. player 1 arrows vs. player 2 arrows). The trouble is that Windows funnels keypresses on all keyboards into one virtual device, and only an obscure Raw Input API can distinguish presses on one keyboard from presses on another. Windows doesn't have this problem for gamepads, but PC browsers provide no gamepad API.

      That, or have the other person use another computer.

      Provided that the other person 1. owns another computer, and 2. is willing to dismantle the computer, transport it, and set it up. Otherwise, you lose the social aspect of being in the same room.

      Is this a limitation of the OS, the browser, or the hardware? I'm guessing the hardware, but that's just a guess.

      The limitation of keys pressed per keyboard is in the hardware. The limitation of keyboard devices per system is in the operating system.

      we all know bandwidth is expected to increase steadily.

      Even in the United States, whose wired and wireless ISPs have dragged their feet compared to Japan, Korea, and western Europe?

    3. Re:Boop, boop, boop by SanityInAnarchy · · Score: 1

      once I've plugged two keyboards into a hub, both players will expect to be able to use the same keys (e.g. player 1 arrows vs. player 2 arrows).

      True. Just pointing out that it is possible to plug two keyboards in, and have each player use separate keys.

      wired and wireless ISPs have dragged their feet compared to Japan, Korea, and western Europe?

      I said "steadily". I didn't say "fast".

      Good points otherwise, though.

      --
      Don't thank God, thank a doctor!
  52. It finally came down to this by slashdotjunker · · Score: 2, Interesting

    The history of 3D on the web is absolutely dismal. As a "graphics guy", I have been repeatedly shocked over the last 13 years by what the "web guys" propose as a 3D-in-the-browser solution. I don't understand why there is such a mismatch between the two factions' ideas about graphics, but I accept that they are vastly different.

    So, after many failures, this is where we are today. The graphics guys (Khronos) are saying, "Stop trying to make something fancy, just put OpenGL in the browser." And the web guys (Webkit) are saying, "Okay, fine."

    The reason why this is different, and more dramatic, than previous attempts is due to the fundamental place that OpenGL occupies in the graphics world. There are dozens of better and more specialized ways of doing graphics, but OpenGL is the most widely known and widely spread. To put it colorfully, OpenGL is our last line of defense.

    Therefore, this has to work. If this doesn't work, then there is no hope for 3D on the web. Which is silly.

  53. Somewhat misleading graph by mbessey · · Score: 1

    So, iPod Touch and iPhone are two separate browsers on that graph, even though they're identical for web-browsing purposes. You could argue, I suppose, about whether iPod Touch even belongs in the "mobile" category. But it works for a lot of folks as a mobile internet device, wherever they have Wi-Fi access.

    If you add iPod and iPhone together, they add up to 34.8 percent, which is more than Opera and the next two largest (BlackBerry and "Other") combined.

  54. Re:Browsers might be ready for GL but not Javascri by tepples · · Score: 1

    I guess it depends what you mean by a "long interval", but that definitely doesn't take 100% CPU for me.

    Even when the interval gets down to 16.67 milliseconds (60 fps)?

    Have you actually had a case of this being a problem?

    Yes. I request a sound, and it plays three seconds later.

    If your file is so big you can't find a typo, your file is too big.

    More files == more HTTP requests, one for each file == more startup time, especially on high-latency connections such as dial-up, satellite, or 3G.

    See TDD

    Test-driven development just moves all the bugs to the automated test suite.

    I think you're assuming all of these resources have to be loaded ahead of time.

    Would you rather have the game freeze for three seconds every three seconds to load a resource?

  55. Re:Remember Web3D? Shockwave? Java 3D? by monoqlith · · Score: 1

    'The problem with offering OpenGL access to Javascript is that Javascript isn't a good language for fast matrix math. Also, authoring tools will have to be developed. You can't effectively author 3D content in a text editor.'

    That's why there needs to be improvement either in just in time compilation of Javascript or in Java 3D graphics support....an interpreted language is just not going to be able to keep up with progress in the arena of 3d web applications. You're going to need to have an extremely portable, lightweight compiled language doing a lot of these operations.

  56. Re:Browsers might be ready for GL but not Javascri by tepples · · Score: 1

    See the media module for native sound support

    Which codec? One browser implements only MPEG codecs; another browser implements only Ogg codecs.

    Performance concerns with "fill color" and such are not an issue because they are offloaded to the graphics card.

    As BZ pointed out, CSS parsing is not "offloaded to the graphics card".

    Full screen mode is controlled by the user agent, not the web page for obvious reasons. Most browsers have support for a full screen mode in some fashion.

    But how does the web application know how to tell the user how to activate full-screen mode on all major web browsers?

  57. Re:Browsers might be ready for GL but not Javascri by SanityInAnarchy · · Score: 1

    Even when the interval gets down to 16.67 milliseconds (60 fps)?

    Haven't tried, but you did specifically mention that you had this problem with long intervals.

    But just for fun... I've now got a sample program working that uses between 15% and 40% CPU -- and that's out of 800 mhz (I'm on Linux, top measures vs current CPU, and since my laptop is mostly idle, it's clocked itself back to 800 mhz).

    Granted, it's not a particularly complex program -- it's just a stupid little drawing app, you know, draw lines to follow the mouse -- but the actual drawing method is called every tick, and it ticks at 16 ms. Just to confirm that this is happening, I had it increment a counter, wrote something else on an interval of 1000 ms (and had it check itself against wall time), and I'm getting about 62 frames per second. Sometimes 63, sometimes 61, never less than 60.

    Oh -- and I'm on the Chromium nightlies. Wouldn't be surprised if some other browsers aren't quite as fast with Javascript yet.

    I request a sound, and it plays three seconds later.

    Is that true even when the sound is already there? (Example: data urls?)

    More files == more HTTP requests

    Only if you don't know how to concatenate them together for production.

    one for each file == more startup time,

    Only if the browser doesn't know how to make multiple requests at once.

    Test-driven development just moves all the bugs to the automated test suite.

    Since the automated test suite is a description of what should happen, and what it means for the program to work, you're basically talking about moving all of the bugs to the spec level.

    And you know what? I'm fine with that. It absolutely is a definite improvement. And this is ignoring things ilke git-bisect, which rely on some sort of automated test -- it's difficult to communicate just how useful that is until you've used it.

    Would you rather have the game freeze for three seconds every three seconds to load a resource?

    Hmm, I don't remember Halo 2 using that, yet it streamed off a DVD. The maximum throughput of the Xbox DVD drive is 6.6 MB/s -- my Internet can do that, and I doubt Halo used anywhere near all of that, especially as they wanted to stream reliably.

    Just offhand, I'd guess they prefetched things, asynchronously. Remember what AJAX stands for? That's right, asynchronous. I'm kind of surprised you suggested doing it synchronously.

    The worst effect was "popup" or something like that, where the level of detail would adjust itself jarringly as things got farther away -- which is really more about the graphical capabilities of the system, and less about the fact that things happened to be streamed rather than completely precached.

    --
    Don't thank God, thank a doctor!
  58. Re:Browsers might be ready for GL but not Javascri by tepples · · Score: 1

    Is that true even when the sound is already there? (Example: data urls?)

    Internet Explorer limits data URIs to 32 KB, which is worth 24 KB after base64 decoding. Good luck fitting background music in that, unless perhaps it's MIDI. Besides, data URIs in Internet Explorer cannot contain sound, only images. And yes, some games do need to precisely synchronize rapid volume changes to background music; the canonical example is Guitar Hero, which mutes the sound when the player misses notes.

    Only if you don't know how to concatenate them together for production.

    There may be limitations in what can be concatenated. For example, textures used as CSS sprites can't be scaled.

    Only if the browser doesn't know how to make multiple requests at once.

    Have you any evidence that Internet Explorer does "know how to make multiple requests at once"?

    Since the automated test suite is a description of what should happen, and what it means for the program to work, you're basically talking about moving all of the bugs to the spec level.

    Then the bugs are in the translation of the spec from English to code in the tests, just as they would be in the translation of the spec from English to code in the actual product.

    Hmm, I don't remember Halo 2 using that

    What irks me is that Halo 2 is also an album by Nine Inch Nails, yet Halo 2 the game doesn't support custom soundtracks.

    The maximum throughput of the Xbox DVD drive is 6.6 MB/s -- my Internet can do that

    Nobody I know in Fort Wayne, Indiana, a city of 200,000 people, has over 50 Mbps Internet to the home.

    The worst effect was "popup" or something like that

    Where an enemy pops up and kills the player's character before the enemy's texture finishes downloading. Players do not appreciate that.

  59. Pitch, SANE, quotas, users, and ECMA by tepples · · Score: 1

    There is, however, an IE plug-in for generic audio and video -- that's object/embed, with a straight mpeg, wmv, or something else readable.

    But how easily do these plug-ins allow JavaScript to read the precise play position and adjust a sound's pitch and volume in real time?

    Unless the old system has Windows-only hardware.

    The older the system, the less likely this is to be true.

    There are USB flatbed scanners that are still not supported in SANE. I would imagine that there are other devices with whose manufacturers the free software community has given up on negotiating out of frustration.

    I'm not even sure The Power of Paint saves a config file, let alone savegames, yet in the current model, it has write access to my entire hard drive

    The Wii operating system creates the equivalent of a separate user for each disc or installed channel. I wonder why PC operating systems don't do something similar.

    First, let's consider an extreme: Procedural generation. There exists a first person shooter which fits into 96 kilobytes. It's not instant, as it has to do the generation

    It takes a program written in JavaScript a lot longer to decompress this data than it would take an equivalent program written in C. Another issue is quotas: the median browser policy would give a program written in JavaScript orders of magnitude less space to cache the decompressed data than the median operating system policy gives programs written in C.

    but there's also the part where you'd have to download it, run it, click "yes" to the security prompt, etc etc -- as you should, since it actually is a security hazard.

    Ideally, you'd create a separate user to run an untrusted application, leaving operating system defects and driver defects as the major vector for attacks.

    You can play all the way through Halo 2, or Jak and Daxter, without having to see a single loading screen.

    An Internet connection has far less throughput than a DVD-ROM drive: typically 6 Mbps or less in the United States, or far less on a mobile plan. There's also often a monthly transfer cap (e.g. 5 megabytes per month on a mobile plan), which has no equivalent in DVD-ROM terms. How would a video game's design work around a monthly transfer cap without the game being either an MMORPG or a clever simulation of one (like Animal Crossing series)?

    So the only latency here are, not all the maps, meshes, and textures, but just enough to draw what the player can see at the beginning.

    There are a lot of beginnings in a game: the main menu, the character builder, the mission briefing, the first room, the second room, etc.

    (And of course, if you want something always available, there's "save for offline mode" if nothing else. On the other hand, I suspect a lot of these games would be multiplayer.)

    What would multiplayer have to do with whether a game is designed for offline mode or not? Ideally, a web browser would provide an API to read connected USB gamepads, and two players could look off one monitor, or four players could look off one HDTV.

    See, you don't need everything the engine can possibly do to be loaded right there in the training sequence, either. And dynamic loading is easy in Javascript

    From what I've gathered reading critiques of JavaScript, it has no command to "include" code, other than writing another <script> element to the document, which isn't asynchronous in many browsers.

    load enough to run that first room, download the rest in the background.

    Then open one of the doors and see black space behind it while the room downloads.

    JavaScript and ActionScript are pretty much the same language, as I unde

    1. Re:Pitch, SANE, quotas, users, and ECMA by SanityInAnarchy · · Score: 1

      The Wii operating system creates the equivalent of a separate user for each disc or installed channel. I wonder why PC operating systems don't do something similar... Ideally, you'd create a separate user to run an untrusted application, leaving operating system defects and driver defects as the major vector for attacks.

      It would break tons of existing games, and it still wouldn't solve the security issue -- a driver bug would be just as dangerous here as it would be with WebGL. I don't see what the browser hurts in terms of security -- indeed, it adds something, by running each game as entirely managed code, in a VM that's already been hardened by real-world usage.

      Ideally, a browser could run each page as an unprivileged user, so they've got the browser's built-in protection plus the OS protection. I believe Chrome does this.

      In WebGL, you have to break the browser or GL itself. In your proposal, you can use any local exploit in the OS.

      It takes a program written in JavaScript a lot longer to decompress this data than it would take an equivalent program written in C.

      Depends how much data it is, and how it's compressed -- in particular, gzip is handled by the browser, as is image compression.

      If we're talking about generation, sure, but it's not as much slower as you'd think, and I believe it's still fast enough -- that 96k took forever to load because it generated the entire game first. Plenty of demoscene demos do everything dynamically.

      How would a video game's design work around a monthly transfer cap without the game being either an MMORPG or a clever simulation of one

      Even if it is an MMORPG, you'd be relying heavily on browser cache.

      There are a lot of beginnings in a game: the main menu, the character builder, the mission briefing, the first room, the second room, etc.

      Each of which you spend some amount of time in, during which the other "beginning" can be loaded.

      And "first room / second room", really? Did you miss the point about Halo 2? (Or any of the Jak games, for that matter.)

      What would multiplayer have to do with whether a game is designed for offline mode or not?

      Sorry, I should've been clear -- multiplayer and online.

      From what I've gathered reading critiques of JavaScript, it has no command to "include" code, other than writing another element to the document, which isn't asynchronous in many browsers.

      *facepalm*

      It's got eval. It's got XMLHttpRequest, which can retrieve arbitrary text over HTTP. Is it that hard to figure out how those go together?

      Then open one of the doors and see black space behind it while the room downloads.

      Which would be similar to watching a YouTube movie and getting the little spinner.

      The answer is similar: With enough bandwidth, you'll already have that room buffered before you open the door.

      JavaScript is ECMAScript on top of the CSS and HTML DOM. ActionScript since around Flash 6 is ECMAScript on top of the SWF DOM.

      Actually, Flash 7 added ActionScript 2.0, which is ECMAScript -- plus some "enhancements". And they've been enhancing it since then.

      --
      Don't thank God, thank a doctor!
  60. Re:Browsers might be ready for GL but not Javascri by SanityInAnarchy · · Score: 1

    There may be limitations in what can be concatenated.

    We were talking about Javascript. There shouldn't be any problem concatenating multiple script files together into a single script file. (And, for that matter, running it through a minifier and serving it via gzip.)

    For example, textures used as CSS sprites can't be scaled.

    Granted -- or at least, not easily. I believe you can render HTML to a Canvas element -- thus, if you can render it, you can scale it.

    But what does this have to do with concatenating Javascript files?

    Have you any evidence that Internet Explorer does "know how to make multiple requests at once"?

    In its default configuration, I believe it still defaults to 2 at once for HTTP 1.1, and 4 for HTTP 1.0. And this can be adjusted. Source.

    the bugs are in the translation of the spec from English to code in the tests, just as they would be in the translation of the spec from English to code in the actual product.

    You really don't see how it could possibly be easier to code a test that matches a spec, versus an actual product that matches a spec? I mean, we agree that tests and formal specs both define what, not how? And the actual product must necessarily define how?

    For that matter, have you seen rspec? It's possible to go pretty much directly from user stories (management-readable specs) to executable code.

    Anecdotally, I can say that I've very, very rarely had more bugs in the tests than I do in actual code, and I can't ever remember a bug in the test that was silently ignored -- bugs in my tests lead to test failures. The only way a bug silently sneaks into production, where I need robust debugging tools, is where I didn't test something, not where I tested something incorrectly.

    I do appreciate a decent debugger, but if I had to choose, I'd choose a robust test suite over a debugger any day.

    Nobody I know in Fort Wayne, Indiana, a city of 200,000 people, has over 50 Mbps Internet to the home.

    Which is still close to that, and fast enough to stream a DVD.

    Oh, and I've got 100 mbit Internet, at a reasonable price, in Fairfield, Iowa, a city of 10,000 people.

    Point is that even a tenth of that is easily sufficient.

    Where an enemy pops up and kills the player's character before the enemy's texture finishes downloading.

    Ah, interesting. Also can't remember ever actually seeing that.

    It's also strange that you'd have this, yet not have similar things happening in the environment -- especially as I remember this being talked about in relation to the environment, not the enemies.

    --
    Don't thank God, thank a doctor!
  61. Re:Browsers might be ready for GL but not Javascri by sonamchauhan · · Score: 1

    just following this interesting discussion,

    > maximum throughput of the Xbox DVD drive is 6.6 MB/s -- my Internet can do that

    you probably mean your internet can do 6 Mbps (mega bits per second) - the Xbox drive throughput is in _Bytes_ per second?

    The other thing is that if a significant portion of net users start running hour long 6 Mbps data streams, it puts a tremendous strain in the remote server and the ISPs along their network path and there will likely be QoS deterioration. That's why it makes sense taking the heaviest game assets from DVD

  62. I've never played those games by tepples · · Score: 1

    Did you miss the point about Halo 2? (Or any of the Jak games, for that matter.)

    Yes, I missed this point. I have never played Microsoft Halo 2 or any Jak game.

    It's got eval.

    Not once sites start enabling Content Security Policy. From that page:

    eval and related functions make trivial the task of generating code from strings, which commonly come from untrusted sources, are loaded via insecure protocols, and can become tainted with attacker controlled data.

    Which would be similar to watching a YouTube movie and getting the little spinner.

    Except in a "multiplayer and online" game, other players would be shooting you while the spinner runs.

    With enough bandwidth, you'll already have that room buffered before you open the door.

    Provided that the game can successfully guess what room the user is going to enter next. Or did you mean "prefetch all rooms that the player could enter from here"? In that case, "with enough bandwidth" looks like wishful thinking to me.

    1. Re:I've never played those games by SanityInAnarchy · · Score: 1

      Yes, I missed this point. I have never played Microsoft Halo 2 or any Jak game.

      Jak and Daxter, Jak II, Jak III, Halo 2...

      And countless other games -- World of Warcraft comes to mind, though I suppose that's mostly loading from disk, and they aren't particularly smart when navigating to instances or other continents.

      From the Content Security Policy page:

      eval and related functions make trivial the task of generating code from strings, which commonly come from untrusted sources, are loaded via insecure protocols, and can become tainted with attacker controlled data.

      Keep in mind, this is optional to enable. It also kills data URIs, and other interesting properties. And the entire justification is that strings can come from untrusted sources, via insecure protocols, which is a pretty brain-dead specification -- the browser can't figure out if they do come from a trusted source, via a secure protocol?

      Except in a "multiplayer and online" game, other players would be shooting you while the spinner runs.

      Which is not particularly different than any other kind of lag.

      Provided that the game can successfully guess what room the user is going to enter next. Or did you mean "prefetch all rooms that the player could enter from here"?

      I mean, prefetch all rooms, starting with the closest, in cases with a finite world. To allow for a potentially infinite world (where one room could link to another on a different server, or rooms are generated, etc), prefetch a configurable amount, based on an estimate of how quickly the player can move.

      I'm still not seeing how this sounds like too much bandwidth. I suppose it depends on the game you're trying to build, but again, I could stream Half-Life on 1 mbit DSL. It took somewhere between ten and thirty seconds to download a level, and many times that to play through a level -- going room-by-room, especially in a linear game like that, I'd expect it to easily stream -- remember, 400 megs total for a game that, by one person's estimate, was seven and a half hours. Rounding up to 8, if you can download 50 megs in an hour -- less than a megabyte per minute, looks to be under 150 kilobits per second.

      I can see where you'd be skeptical of the initial load time, and I base that mostly on guessing and the fact that it's never really been tried. But after that, Half-Life is less than 150 kilobits per second -- can't stream it on dialup, but just about any high speed connection should be able to handle it.

      So, if we were to limit it to games of about that graphical intensity, it seems easily doable. And if you remember Half-Life, or the original Counter-Strike, or Natural Selection, I think that would be worth it.

      The same person estimate 8 hours for Half-Life 2, which requires something like 4.5 gigs -- a little over 10 times the size. Which also means anyone of around 2-3 megabits can stream it -- and 6 megabits on cable is pretty common.

      Not "next gen" enough? But I don't know any PC games, next gen or not, which require more than a DVD -- so unless the game is really short playtime, or a ton of teleporting around, it should be streamable. (Note that teleporting isn't necessarily a problem for streaming -- just make the teleport some sort of portal, and let the engine treat it as an attached room.)

      With a bit of intelligence, you could gracefully degrade with a lack of bandwidth, just as games can currently scale (though not always automatically) to faster and slower GPUs (by adjusting level of detail, effects, etc). From what I hear, Silverlight does this for video, so that's not entirely a new idea either.

      --
      Don't thank God, thank a doctor!
  63. Browser share, test coverage, and overages by tepples · · Score: 1

    I believe you can render HTML to a Canvas element

    Once browsers supporting rendering HTML to a <canvas> become more widely installed, this will become the case. But until then, installing Chrome or Firefox or another "advanced" browser on a PC running Internet Explorer brings the same potential security holes as just installing a native game into a new user account.

    You really don't see how it could possibly be easier to code a test that matches a spec, versus an actual product that matches a spec? I mean, we agree that tests and formal specs both define what, not how?

    In many cases that I've worked with, "what" is nearly as complex as the "how", unless by "what" you mean a specific input and the corresponding output. In my experience, testing a set of (input, output) pairs lacks coverage: good for finding regressions but not for finding bugs you don't already know about. True, automated tests are a good thing, but putting too much trust in them makes bugs fall into the "where I didn't test something" cracks. See "Bugs In The Tests" on Ward's Wiki.

    Point is that even a tenth of [100 Mbps] is easily sufficient.

    Suppose that a 4G mobile connection can actually reach a tenth of 100 Mbps. Sustaining that rate for even an hour on a mobile connection is enough to use up almost the entire 5 GB monthly cap and put the user into a cost-prohibitive overage.

    It's also strange that you'd have this, yet not have similar things happening in the environment

    I didn't rule that out. Walk around a corner, see a black area (because environment textures haven't loaded), an invisible creature (because its texture hasn't loaded) attacks you, and you die.

    1. Re:Browser share, test coverage, and overages by SanityInAnarchy · · Score: 1

      installing Chrome or Firefox or another "advanced" browser on a PC running Internet Explorer brings the same potential security holes as just installing a native game into a new user account.

      Except:

      • Chrome and Firefox are both open source.
      • These only need to be installed once, and can then be a client for multiple games.
      • Native games, unless you develop some sort of package manager, will present the same security risks for each game.

      I'm pretty sure we've been over this.

      In many cases that I've worked with, "what" is nearly as complex as the "how", unless by "what" you mean a specific input and the corresponding output. In my experience, testing a set of (input, output) pairs lacks coverage: good for finding regressions but not for finding bugs you don't already know about.

      That's pretty much exactly what I mean -- input and output. Or, behavior given a set of input.

      But this is also just the primitives -- input and output are pretty much what all programs generalize to. I tend to do integration tests ("acceptance tests"?) much more often than unit tests.

      However, I do disagree with:

      Test cases are often more likely to contain errors than the code being tested.

      It just doesn't fit my experience -- at least, counting undetected errors -- those "silent horrors".

      By that I mean, if I can get the test to run successfully, it generally doesn't have bugs. If a test fails, the bug could be in the test or in the code, but at least I know about it -- and the test is simple enough that I can usually tell where the bug is.

      people are really lax when writing tests, and tests are boring, and tests aren't normally elegant.

      That's a matter of discipline, and again, look at rspec. Tests can be beautiful.

      The "not elegant" may refer to the fact that tests often won't be particularly DRY. This is deliberate -- making things more explicit makes it easier to verify what's going on, and avoiding typical code-reuse things (sometimes even to the point of looping) means you're also testing for bugs in how you use those constructs.

      The page seems to be full of people agreeing with me:

      My experience is that bugs in tests causing them to print an error at first run, even though the production code is correct, are quite often. But this takes seconds to find them and fix and gives me more confidence in my production code. There was exactly one test from more than 200 (currently, much more) in my previous project which succeeded while production code was wrong.

      And for that matter:

      Just a reminder. In XP UnitTests, one starts with a failing test. This would seem to eliminate the likelihood of a false positive. Before I have written any of the application code, I know that my test will report failure. I then write the test code and verify it will also report success.

      Granted, this isn't necessarily true -- tests can fail, then succeed, and still be insufficient. But test-driven development does tend to lead to comprehensive and accurate coverage.

      And finally:

      The scenario where a bug in the test masks a bug in the code is likely when there are bugs in the programmer's brain.

      And if the bug is in my brain, I find that debugging tools aren't nearly as useful as thinking about it -- though they are useful.

      Suppose that a 4G mobile connection can actually reach a tenth of 100 Mbps. Sustaining that rate for even an hour on a mobile connection is enough to use up almost the entire 5 GB monthly cap and put the user into a cost-prohibitive overage.

      For mobile, you'd want a much lighter version of the game anyway -- the GPU in an iPhone can't handle what a desktop PC can.

      And while I agree that this is an issue, I think one way to force US carriers to ca

      --
      Don't thank God, thank a doctor!
  64. Re:Browsers might be ready for GL but not Javascri by SanityInAnarchy · · Score: 1

    you probably mean your internet can do 6 Mbps (mega bits per second) - the Xbox drive throughput is in _Bytes_ per second?

    Nope.

    Let me break it down for you: I have 100 mbit Internet. I've gotten ten or eleven megabytes per second to servers I control on the same fiber network.

    --
    Don't thank God, thank a doctor!
  65. Like on the original PlayStation by tepples · · Score: 1

    Jak and Daxter, Jak II, Jak III, Halo 2

    None of which are in my collection. I don't even have an Xbox or Xbox 360, and most of my PS2 games are quirky puzzle-ish games like FantaVision or music games like Amplitude or In the Groove or Guitar Hero. I have both PS2 Katamari games, and they both have a noticeable pause for loading whenever the ball crosses certain size thresholds. I do own a copy of Super Mario Galaxy, which covers loading with a clever animation of Mario flying to a planetary system.

    the browser can't figure out if they do come from a trusted source, via a secure protocol?

    Content Security Policy is designed to help enforce scripting restrictions on sites that allow user-generated content. So even if you're serving a page over HTTPS, a malicious user of your system might have created the elements.

    Which is not particularly different than any other kind of lag.

    Most lag in online games isn't as sensitive to bandwidth as the kind of lag you get from streaming the textures.

    I could stream Half-Life on 1 mbit DSL.

    A 3 Mbps link is about as fast as the 2x CD-ROM drive in an original PlayStation. So I guess if people come in with expectations of PS1 quality, which is still an upgrade from the roughly GBA quality of DHTML, 2D canvas, or SWF, they might accept it.

    I can see where you'd be skeptical of the initial load time, and I base that mostly on guessing and the fact that it's never really been tried.

    It's been tried. Remember how long it took PS1 games to boot to the menu? People will see loading every time they play, just like on the PlayStation, because most people aren't going to let a single web site cache hundreds of megabytes.

    1. Re:Like on the original PlayStation by SanityInAnarchy · · Score: 1

      So even if you're serving a page over HTTPS, a malicious user of your system might have created the elements.

      Still doesn't mean I'm planning to run eval on any string that I didn't create, or that a script I created didn't create.

      And this XHR-then-eval technique is something I've used in real apps. I doubt I'd give it up without a replacement.

      Most lag in online games isn't as sensitive to bandwidth as the kind of lag you get from streaming the textures.

      True -- it is, however, sensitive to latency (which can be sensitive to bandwidth), as well as local RAM, CPU, disk (sometimes), and video capabilities.

      A 3 Mbps link is about as fast as the 2x CD-ROM drive in an original PlayStation. So I guess if people come in with expectations of PS1 quality, which is still an upgrade from the roughly GBA quality of DHTML, 2D canvas, or SWF, they might accept it.

      Right. Missing a couple of points, though:

      • Many people have better than a 3 mbit link. Games that can scale will look better on a faster connection.
      • Many times better GPU, CPU, and RAM than a PS1.
      • You are deliberately ignoring local disk cache.
      • "Seek time" would be significantly less than a PS1. A PS1 optimization (still used for optical disks, particularly Blu-Ray) would be to duplicate content all over the disk, so that you can read a level in a single shot, with no seeks. On the web, that content would be either already cached, or no slower to download than anything else.

      It's been tried. Remember how long it took PS1 games to boot to the menu?

      You mean, after all the logos that have to go into games? Yeah, I guess interstitials would cause that, too.

      But no, I don't think we've seen anyone try to reduce boot time of a game to where it can be quite that kind of impulse thing (the way YouTube is).

      People will see loading every time they play, just like on the PlayStation, because most people aren't going to let a single web site cache hundreds of megabytes.

      ...why not? I mean, if the alternative is to actually download hundreds of megabytes and store it permanently, why wouldn't I just crank up my browser's cache to use, oh, 10, 20, 50 gigs? I've got the space, and so do most people -- the way that space would otherwise be used is with games, massive amounts of audiovisual content, or virtual machines.

      It's possible there are uses I'm not thinking of, but really, even netbooks come with at least some 8 gigs, laptops tend to be around 300 gigs, and it's hard to buy a hard drive with less than 80 gigs anymore.

      Keep in mind, it's just browser caching -- which means it also benefits from a caching proxy (Squid, say), and it means it's not the site doing anything, it's the browser caching. Every browser I've tested this on can cache XHRs as easily as anything else.

      --
      Don't thank God, thank a doctor!
  66. Games - done already by DrYak · · Score: 1

    ID software ship a special version of Quake3 as a browser plug-in. So currently you can already play 3D games in your browser window.
    Dofus is another example, it's an MMO which works in a browser window, using the Flash plugin.

    Thank to WebGL in one hand, and thank to the future evolution of ever faster processors and ever more aggressive Javascript compilers, we might one day reach the situation where games are deployed directly through the browser *without* requiring a binary plugin. Imagine StarCraft 3 or 4 being part of a website, which also has AJAX chat and a whole social platform for guilds, etc.
    And perhaps with ever increasing CPU power, and compiler technology, you could also imagine old 3D games being recompiled C-to-Javascript - Quake 1 as web application by 2015 ?

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  67. Re:Browsers might be ready for GL but not Javascri by sonamchauhan · · Score: 1

    100 mbit Internet. Neat. Good for you but very few other people are thus privileged.

    See also my second point for why the Internet is not a good replacement for your SATA bus.

  68. Re:Browsers might be ready for GL but not Javascri by SanityInAnarchy · · Score: 1

    Your second point tells me that such applications should be developed, to force ISPs to upgrade their networks. Or, if a game like this gets popular, CDNs help relieve that strain. It's worth mentioning that YouTube, Hulu, and Netflix present the exact same problems and solutions.

    And when was the last time a game saturated a SATA bus?

    Oh, and elsewhere -- places like Japan, Sweden, etc -- have plenty of fiber. The US is a bit backwards this way.

    But I still think good things could be done with much less bandwidth. I was just demonstrating that it's possible right now without really making any compromises -- I still think it could be done well for a lot of games without requiring more than 1 mbit -- yes, mbit.

    --
    Don't thank God, thank a doctor!
  69. Re:Browsers might be ready for GL but not Javascri by sonamchauhan · · Score: 1

    > Your second point tells me that such applications should be developed,
    > to force ISPs to upgrade their networks.

    But who will bell the cat. :-)

    A company who builds and sells access to such applications will have a small market to sell to -- folks like you, for whom internet bandwidth is cheap and reliable.

    I have a notional 21 Mbps connection myself (ADSL+) with an ISP and my bandwidth is cheap.

    However, of the two chains below, the first one is more likely to have a stutter or outage - simply due to it having more moving parts:

    1 - Application Service Provider + CDN + multiple ISPs + my ISP + my telco + ADSL modem + Home Wifi link + Home computer

    2 - Home computer (with DVD drive)

  70. Re:Browsers might be ready for GL but not Javascri by SanityInAnarchy · · Score: 1

    A company who builds and sells access to such applications will have a small market to sell to -- folks like you, for whom internet bandwidth is cheap and reliable.

    Tell that to Hulu. Or Netflix Watch Now.

    All you have to do is be able to scale down enough that it's usable by the general population -- even to where it's almost usable by the general population -- but where you can clearly see that more bandwidth would work better. Obvious example: YouTube has an HQ and HD button. On some connections, the normal version will work, but the HQ/HD version is too slow -- but if you've got half a brain, you realize that a faster, more reliable connection would look better.

    of the two chains below, the first one is more likely to have a stutter or outage - simply due to it having more moving parts

    I dispute that, simply because:

    Home computer (with DVD drive)

    When the DVD drive fails, it has to be replaced. Mine did, in my laptop, and the tech did mention it was the highest-failure item in the machine (and complained about how it had to be completely taken apart to get to it -- stupid design).

    When a game disc is scratched, it has to be replaced. Experience shows that while services like Steam may occasionally shut down, I have lost, scratched, or otherwise destroyed plenty of physical game discs, whereas I can't remember more than a temporary outage due to Steam, ever.

    Obviously, YMMV. Some people have horror stories -- mostly revolving around forgetting a password (which is really their own stupid fault). But then, there are just as many horror stories revolving around DRM for games that come on DVDs. If you're not going to crack the game, the DRM is just as much an issue with or without Steam, but with Steam, you at least don't have the additional stack of DVD drive, DVD, DVD driver, DRM layer injected into DVD driver...

    I'm not suggesting that this would completely replace games bought on DVD -- at least, not yet. As much as people might enjoy Netflix Watch Now (and I enjoy BitTorrent), many people still buy or rent actual DVDs. But there's very clearly a vast, gaping niche here, for games that Flash can't do (yet, and I hope it never does, narrow window of opportunity!), but which don't necessarily match what a DVD can do (yet) -- just as YouTube covers things text can't, but can't match DVD quality (unless you click "HD" on a fast enough connection).

    --
    Don't thank God, thank a doctor!