Epic and Mozilla Bring HTML5 OpenGL Demo To the Browser 77
sl4shd0rk writes "Mozilla and Epic (of Epic Megagames fame) have engineered an impressive First Person OpenGL demo which runs on HTML5 and a subset of JavaScript. Emscripten, the tool used, converts C and C++ code into 'low level' JavaScript. According to Epic, The Citadel demo runs 'within 2x of native speeds' and supports features commonly found in native OpenGL games such as dynamic specular lighting and global illumination. This concept was previously covered on Slashdot, however the Citadel demo has just been released this week."
Re:Plain Crap (Score:4, Informative)
This requieres Mozilla JS enhancements (asm.js) currently on nightly builds, It can work on other browsers but without the performance tuning made for the JS subset that is asm.js it will run slow. Chromium bug proposing to add support for asm.js http://code.google.com/p/v8/issues/detail?id=2599 [google.com]
Re:Plain Crap (Score:5, Informative)
This requieres Mozilla JS enhancements (asm.js) currently on nightly builds, It can work on other browsers but without the performance tuning made for the JS subset that is asm.js it will run slow. Chromium bug proposing to add support for asm.js http://code.google.com/p/v8/issues/detail?id=2599 [google.com]
It doesn't require special asm.js optimizations (asm.js is a subset of JavaScript, so it already runs properly in all modern browsers). The demo works fine in the stable release of Firefox for example, which has no special asm.js optimizations. It is faster in Firefox nightly though which does have those optimizations. But how much faster depends on the CPU and GPU, it might matter a lot or it might matter a little. In this demo a lot of time is spent in WebGL, so a fast GPU and good WebGL implementation matters a lot too.
The demo should work in any browser with WebGL and JavaScript support. For example the only reason it currently fails in Chrome is due to a bug [google.com] related to memory use. Hopefully that will be fixed soon.
Re: (Score:2)
Re: (Score:2)
Re: (Score:3)
This demo is plain Javascript, but only uses as subset of it (asm.js), the VM needs performance enhancement to run (asm.js) efficiently so it is not an easy task to support other browser, unless you call "supported"to run it very slow http://code.google.com/p/v8/issues/detail?id=2599 [google.com]
Re:Useless until (Score:3)
So all modern browsers should already work on this demo. But this is a very large codebase (over 1M lines of C++ compiled to JS), and it pushes the limit of what browsers have tested on. Now that this demo is pub
Re: (Score:2)
Mozilla & Epic worked together on this together.
They used Emscripten, which Mozilla developed, to compile to asm.js, which Mozilla developed and put an optimized module in Firefox's Javascript engine.
So I'd say it's little more than Epic choosing Firefox.
Re: (Score:1)
This comment shows an amazing understanding of the article and it's contents, clearly a Slashdotter for the ages.
Re: (Score:2)
Well you can try it in Chrome, but right now Chrome crashes when you do.
They also don't prevent you from trying it in any browser (AFAIK) except pre-23 versions of Firefox.
Re: (Score:1)
Oh God no!
We've finally reached the "Best NOT viewed on Internet Explorer" days, and it's about time.
Re: (Score:2)
Re: (Score:1)
I just got the RAM filling up and the computer going to a crawl until I forcefully killed firefox.
Re: (Score:3, Informative)
Just got the latest Nightly and works smooth here. 5 year old computer running Win 7
Re: (Score:3)
I ran the performance test and I got about 17 frames a second in full screen mode which is not that good but it is still viewable although a bit jerky at time. I did like the refection on the tiles in the church and the water effects although I have seen similar and b
Re: (Score:1)
Re: (Score:2)
20.0.0.1 (win 8) worked fine for me.
Re: (Score:2)
Re:Browser Not Supported (Score:5, Insightful)
HTML5 is trying to be the next Java, substituting the browser in place of the JVM. This is a logical extension to the past decade of offloading all the heavy processing to the web browser.
Yes, the client is much faster and more powerful than what the server could provide for each individual connected client. But at the same time, the implementation differences between browsers, platforms, and even browser versions will still result in the same or worse incompatiblities than before.
Re: (Score:2, Insightful)
I'm having trouble getting too worked up about a tech demo showing off a 10x performance improvement in the nightly over the stable version not working in the stable version.
Yes, new ideas will get implemented differently and at different rates, but Mozilla and Google are working hard to make sure the final versions of things get standardized and work cross-browser as it is in both of their interests (Apple and Microsoft both have some amount of interest in the web working poorly so people use native apps i
Re: Browser Not Supported (Score:2)
After kicking off Flash from OS X, I feel getting 3D acceleration in the browser is also advantageous for Apple. Maybe only Microsoft is the one that does not particularly feel inclined to invest in this tech. But on the other hand, they also have their version of a tablet for sale.
Re: (Score:2)
HTML5 has been the next Java since WebOS ... a slow but portable app environment that's best replaced with native code when possible but still functional.
Re: (Score:2)
Re: (Score:2)
Is it so hard? (Score:1)
For some reason the people here don't understand immediately what this is: A tech demo.
asm.js is experimental. html5 is very new. WebGL is not that widely used yet. emscripten. This is just demonstrating what is possible with what we have today.
I tried it on linux with intel 4000 with mesa git master and firefox nightly.
I haven't looked into why the rendering in the default settings is bad. Maybe they still blacklist it.
To get decent performance I had to go to about:config and set layers.acceleration.force-
Re: (Score:2)
"This is just demonstrating what is possible with what we have today."
so ... how does one demonstrate something not possible today without demonstrating it today
blah blah bla , no input
love
osgeld
Rube Goldberg (Score:1)
Let me get this straight.
They (the asm.js [asmjs.org] nutjobs and the vendors who trot along) are proposing to take programs written in C or C++, "compile" them to the fascist brother of Javascript (I won't call it a "subset" of the language because it actually works by adding boilerplate code) so that supported implementations can recognize that the Javascript source has all the boilerplate cruft in place and try to compile the damn thing back to machine code.
Rube Goldberg would be proud.
Besides, I can see the secu
Re: (Score:2)
Re: (Score:2)
All JavaScript engines compile to machine code; it's not something specific of asm.js.
'within 2x of native speeds' (Score:2)
What the hell does "within 2x of native speed" mean? Is it 2x faster? Is it 2x slower? Is it 200% faster/slower? Is it 50% slower?
If only there were a marketing-to-English dictionary, or perhaps a school we could send people to ...
Re: (Score:2)
Multiply native speeds by two
Actually, it would be "divide native speed by two" ;)
Re: (Score:2)
Considering everyone who's replied to my post has gotten it wrong, my point stands. ;)
Re: (Score:2)
I understand math, I understand 2x=100% faster, etc.
But "within 2x native speed" is nonsensical and non-mathematical.
Considering even you got it wrong ... I wonder who needs to go to school now ...
Re: (Score:2)
Heh... The English isn't the best (It's proper and valid- but I wouldn't have put it in the somewhat confusing manner that they did...), but they're talking about being about half as fast as native, based on what I've been able to ascertain playing with the demos and a bit with emscripten. Considering what I know about Javascript...it's not half bad.
It's a clever hack- but it's still a hack. It'll let vendors make casual games and light MMOGs easily playable with more than just one platform- no Flash or
Worked great for me (Score:2)
I just tried, and I was able to "play" the demo, walking around the environment, etc. I ran the benchmark, and got 57fps, and although I have 120hz monitors, I suspect something is limiting most of the rendering to 60hz. TBH, this is amazing to me. I tested under windows 7 with firefox 20.0.1 however, so I'll have to try booted into Ubuntu and see how it works there.
All we ever wanted... (Score:2)
All we've ever really wanted was a unibiquitous software development platform that wasn't bloated as hell and allowed optional access to the local file system (for save data / load data). Java could have been this, but they didn't make Applets be trimmed down lean and mean for the web, and included the kitchen sink so the attack surface was too large. HTML+JS is becoming what we want, if it wasn't for the horribly designed scripting language -- Its design had no concern for speed since all the heavy lift
Re: (Score:2)
Leaked IE11 builds support WebGL.
Chrome has some pretty bad bugs with the element in gaming contexts. But the real solution to audio in HTML5 games is the Web Audio API. This is still a work in progress, but we'll get there. The Citadel demo uses it. If you stand on the bridge over the river and turn around 360 degrees, you should get a nice stereo effect.
Re: (Score:2)
Lua would be so cool as scripting language. (Well, except for this crap about arrays starting with index 1 by default.) Just by looking at the HUGE amounts of performance optimizations that LuaJIT is able to pull off shows why.
Pretty cool. (Score:1)
Tried the demo and it's actually pretty surreal being able to play a game like that in a web browser. I hope the technology improves further as time passes. One issue is that it cannot capture the mouse in fullscreen meaning you have to click in order to turn the camera. This would be a big problem playing windowed of course but in full screen, it's more intuitive just to move the mouse to turn around (like every FPS has implemented).
Slow, little CPU usage, feels like an Android game (Score:2)
I tried the demo. It feels extremely slow despite very low CPU usage (15%) and a high-end graphics card.
It might be a problem with latency or responsiveness, but it's definitely not as smooth as an AAA game.
Graphics-wise it also feels like an Android game.
Shitty flash games actually look better than this.
Proprietary codec (Score:2)
Apparently this is another proprietary codec. Brendan Eich considers this unimportant because "consumers" won't get sued for using the browser, but it leaves people who want to participate (by encoding their own material) my have the same limitations that h.264 users do - no participating unless you pay the Intellectual Property Poll-Tax.
It sounds like they're still in "discussions" about the licensing of the codec itself. Unfortunately I'm not too confident that Mozilla is concerned much about that these d
Re: (Score:2)