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."
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
Damn, my RAM is full of llamas.
...please explain the difference between this and Google's O3D.
Don't thank God, thank a doctor!
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.
You know I'll practicably have this disabled for every site except 2 or 3. So, what's the point?
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.
... it just isn't at that point or even guaranteed to happen yet.
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
My work here is dung.
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!
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.
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.
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.
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!
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}}
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)
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?
Onda Technology Institute
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!
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?
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.
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.
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.
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/
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
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.
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.
Multiplatform 3d pornz coming on the way! On every device that has a browser!
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.
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."
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.
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.
And just in time for 3D TVs to hit the mainstream, too!
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.
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.
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.
the web into two very distinct flavors:
Hey KID! Yeah you, get the fuck off my lawn!
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.
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.
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
Hmm, imagine LLVM in a browser..
This sig does not contain any SCO code.
"I don't think many people expected browser-based, hardware-accelerated graphics this soon."
Ask the guys at Wild Tangent...10 years ago...
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.
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.
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
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.
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.
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.
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.
> 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.
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".)
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:
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!
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.
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.
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.
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.
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.
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.
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.
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?
'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.
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?
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!
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.
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
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!
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
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:
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.
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.
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!
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.
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 ]
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.
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!
> 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)
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!