Mozilla And Epic Games Bring Unreal Engine 3 To The Web, No Plugin Needed

Back in 2011, Epic ported its popular Unreal Engine 3 technology to Flash and showed how relatively high-end 3D games could run in the browser. It’s 2013 now, however, and Flash isn’t exactly a hot topic anymore. So to show off what game developers can do with a modern browser and without plugins today, Mozilla and Epic teamed up a little while ago to port Unreal Engine 3 to the web, something that was unthinkable back in 2011.

As Vladimir Vukicevic, Mozilla’s engineering director and the inventor of WebGL told me earlier this week, Mozilla wants to make the web a viable platform for modern games. About six months ago, Mozilla started to work on using its emscripten compiler to port C and C++ code to asm.js, a strict subset of JavaScript. This combination allows the JavaScript code to run at a speed within 2x of native performance and the latest versions of Firefox Nightly now support these optimizations. Given the complexities of modern game engines and games, getting relatively close to native performance is a necessity for running something like Epic’s well-known Citadel demo and Unreal Tournament, which Mozilla showed running natively in the browser at the Game Developers Conference today.


Porting the whole Unreal 3 Engine to the web only took Epic four days and a few small adjustments, Vukicevic told me. It’s worth noting that Epic had already done some work on bringing its game engine to the web before, but that’s still a very impressive result. The actual demo will be available online in the coming weeks. Until then, you can always check out Mozilla’s own BananaBread demo running on the latest Firefox Nightly. It’s not clear if Epic plans to make Unreal Engine 3 for the web available commercially.

All of this work, Mozilla’s games platform strategist Martin Best also told me, will flow into Mozilla’s mobile browser for Android and, of course, Firefox OS. On mobile, Mozilla also expects games to run within 2x of native performance and the team already has some in-house demos working, but isn’t quite ready to share these with the rest of the world yet.

As for bringing actual commercial products to market that are based on these techniques, Best noted that Mozilla is already working with the likes of Disney, Electronic Arts and ZeptLab (which already brought an HTML5 version of Cut The Rope to the web after working with Microsoft). When Mozilla talks to potential new partners for this effort, Best told me, most of them are pretty skeptical at the beginning, but “by the end of the week, we usually have quite an excited partner.”

Google, of course, is also working on bringing the browser close to native performance with the help of its Native Client project that allows developers to build web applications that can execute native compiled code right in the browser. Quite a few of the games in Google’s Chrome Web Store already use this technology. As Brendan Eich, Mozilla’s CTO and the creator of JavaScript, told me, however, we aren’t likely to see Firefox support this anytime soon. Instead, he believes, JavaScript will continue to improve and get even closer to native performance over time. Native Client, Eich noted, is essentially “separate from the web” and uses totally different APIs. That’s not something Mozilla is interested in. Instead, the organization wants to push the web itself forward.

One of the nice things about Asm.js code is that it is just JavaScript in the end, so the code will run in any browser, but it will run significantly faster in a browser that features asm.js optimizations. Because of this, Eich believes that other vendors are likely to offer support for it sooner or later.