Epic and Mozilla Bring HTML5 OpenGL Demo To the Browser
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."
Just got the latest Nightly and works smooth here. 5 year old computer running Win 7
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
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.
"If a nation expects to be ignorant and free in a state of civilization, it expects what never was and never will be."
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
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 instead). Most importantly, Mozilla and Google have recently moved to disabling non-standardized features by default, so there is less temptation for developers to try to use non-standard features (e.g. not doing the CSS-prefixing thing anymore in favor of making it a configuration option that's disabled by default).
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
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 related to memory use. Hopefully that will be fixed soon.
The difference between asm.js with and without special optimizations is not necessarily that big. See benchmarks here, showing it can be anywhere from 1x (almost no change) to 5x. It depends a lot on the benchmark. And in a demo like this, the GPU matters a lot too, which makes asm.js matter less.
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 public, that should make it easier for other browsers to fix what they need so the demo can work on them.
I have a HP dv7 (2.5 years old with 8GB RAM) running Fedora 18 with the latest updates as per a week ago and my Firefox is version 20. The demo definitely does run under Firefox although I did have to do two refreshes before the demo started.
:)
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 better in other games of this type. The thing that has me worried when viewing my performance monitor is that the CPU temperature showed about 95 deg C which considering that boiling water is 100 deg C means that I will be sending my dv7 in for repair before my warranty runs out.
Still for something like this to run on a browser under Linux IMHO is quite good and may level the playing field between desktop OS's since basically if you are a PC gamer you have to run your "Games for Windows" under a Microsoft OS (I do know about WINE but IMHO it is a kludge for a kludge anyway). Still I actually prefer console gaming to PC gaming and no amount of arguments can convince me otherwise.
On a lighter note where are all the NPC's and there has to be a dragon somewhere or at least some Orc's (maybe they were doing their washing)
There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.