News for hackers. Stuff that matters.
Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by ricardobeat on Thursday May 02, 2013 @07:39PM (#5647951)
Dude. (sorry)

This is Unreal Engine, with physics, cloth simulation, particles, light & glare effects. It's not C++ on Native Client or a plugin, it's running in javascript. Just yesterday you couldn't draw a circle on a 2d canvas at 30fps.

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by Stranger2013 on Friday May 03, 2013 @08:50AM (#5649882)
[some negative rant below to offset the hype - sorry]

> "This is Unreal Engine" - a subset of it

> "with physics" - did not notice any falling kickable boxes and such

> "cloth simulation, particles, light & glare effects" - impressive, but there will be twice less of that then via native code

> "It's not C++ on Native Client or a plugin, it's running in javascript" - what's the difference between downloading one/two specific browsers or making a build of each with a flash player bootstrapped?

> "Just yesterday you couldn't draw a circle on a 2d canvas at 30fps" - so instead of pushing to make a universal VM, they decided to use a dynamic prototype-OOP language just because it happened to be most common - not very impressive.

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by pornel on Friday May 03, 2013 @10:44AM (#5650318)
asm.js is a universal VM with bytecode that just happens to be similar to subset of JS, but it doesn't have dynamism, doesn't have OOP, doesn't have garbage collection.

Firefox has a separate ahead of time compiler for asm.js that isn't a JS VM.

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by matthew-wegner on Thursday May 02, 2013 @07:44PM (#5647981)
It's probably a subset of the Unreal Engine.

And it only works in Firefox, and even then only very well in Firefox Nightly.

Those points aside, though, this is pretty amazing. I fully expect multiple engines to target HTML5 in the same way Unity/Unreal/etc were cross-compiling for the Flash runtime. It's just not quite there yet...

(And it's good that demos like this exist to put pressure on browsers to fully support them).

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by vladmoz on Thursday May 02, 2013 @11:35PM (#5648669)
As Brendan said, it's UE3, all of it. See the video at http://www.youtube.com/watch?v=BV32Cs_CMqo (second half of video) for the Sanctuary UT3 map, complete with bots, shooting, etc. Once the engine was ported, we threw random UE maps at it, and it worked fine.

It works in any browser that has solid JavaScript and WebGL support. Audio will work with Web Audio, but it'll gracefully not have audio effects if it doesn't. There's no Firefox specific magic here. If you're on Aurora/Nightly, then you get asm.js/Odinmonkey optimizations and it runs even faster; that's it.

Edit: UE3 was chosen because it's known stable and optimized tech. This isn't the pinnacle of what can be done, far from it. But neither us (Mozilla) nor Epic wanted to be working with code that was still under active development for a next generation engine while simultaneously trying to port it to a new experimental platform. One step at a time! :p

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by BrendanEich on Thursday May 02, 2013 @11:23PM (#5648633)
No, not a subset. It's UE3 cross-compiled by Emscripten from ~1MLOC of primary C++ source. Some configury to use OpenAL (mapped to WebAudio), and of course OpenGL-ES (mapped to WebGL).

/be

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by Arelius on Friday May 03, 2013 @04:22AM (#5649357)
It's really not. It's the UE3 Mobile Engine. Which while it's compiled from the same C++ source, It has enough things stripped during compilation to not really be considered 'full UE3' custom shaders for instance are not supported.

And atop of missing some things from UE3, Citadel is designed specifically for limited devices.

While still a very impressive feat, let's not confuse this with running GoW or The Samaritan demo in the browser.

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by azakai on Friday May 03, 2013 @11:00AM (#5650436)
As mentioned in other comments, we also ran other UE3 games, like Sanctuary. We demoed that in a booth at GDC last month where people could play it. That's a full UE3 desktop game with bots, AI, normal FPS mouse control (not tablet-like), etc. etc. You can see it in action in the 2nd half of this video

http://www.youtube.com/watch?v=BV32Cs_CMqo&feature=youtu...

And it's using the exact same code as this demo. You literally use the same compiled JS, and just swap in a different set of game assets.

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by Arelius on Saturday May 04, 2013 @05:18AM (#5654548)
If so, something like that would be a much more impressive demo. Citadel just frankly isn't that impressive.
Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by nailer on Friday May 03, 2013 @12:09PM (#5650826)
Brendan what was the game you played at JQuery UK a couple of weeks back? It was Unreal Engine 4 right?

Thanks! (also thanks for JS, it is neat!)

Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by ricardobeat on Friday May 03, 2013 @02:19PM (#5651671)
That was probably BananaBread (https://developer.mozilla.org/en-US/demos/detail/bananabread), which uses a different engine.
Re:Unreal Engine in JavaScript/HTML5 – Citadel demo by nailer on Thursday May 09, 2013 @11:12AM (#5680815)
BE stated explicitly that it was an upcoming Unreal Engine 4 game (and I've seen / played Bananabread, this wasn't it).