The Web is the Game Platform

This week, a number of Mozillians attended the annual Game Developers Conference in San Francisco to demonstrate how the Web is a competitive platform for gaming and game development.

We’ve worked very hard over the past couple of months on technologies used to speed up the Web for game development, including asm.js, a JavaScript optimization technology and pure-JS-subset target language for compilers; Emscripten, a C++ to JavaScript compiler; and OdinMonkey, the SpiderMonkey JavaScript engine’s compiler for asm.js source.

On Wednesday, we were happy to announce that we’ve teamed up with Epic Games to combine these technologies to bring Epic’s Unreal Engine 3 to the Web.

This is significant because it demonstrates to everyone that game developers and publishers can now take advantage of the reach and scale of the Web without the additional user acquisition friction and even higher costs (infinite on iOS :-P) associated with third-party plugins. These technology advancements also mean improved performance and the ability to port lots of games to the Web on desktops, laptops, and mobile devices. (Note well that asm.js code runs pretty fast on modern browsers, and super-fast when optimized as by OdinMonkey.)

We’ve also developed a new demo for Banana Bread that includes multi-player support and integrates parts of WebRTC for the data channel.

Big thanks to everyone on the gaming team and supporters throughout the Mozilla project for all the hard work to make this possible. I must single out Martin Best, Dave Herman, Vladimir Vukićević (WebGL creator!), Luke Wagner, and Alon Zakai (AKA @kripken).

I was personally thrilled to meet Tim Sweeney, CEO and founder of Epic Games, for breakfast before GDC Thursday. I’d been aware of Tim since his invited talk at POPL 2006. Tim and I were on very much the same page on many things, including JS’s ascendance as a safe target assembly-like language for C++ via asm.js and beyond.

/be

P.S. I’d like to thank Luke Wagner for taking on module ownership of SpiderMonkey, as Dave Mandelin has handed the baton on.

P.P.S. Hot rumor: WebGL in IE11? Source, judge for yourself. I have hopes.

UPDATE: withinwindows.com says WebGL is coming, disabled by default so far, and (look for “UPDATE3” run together at the original source) with a different shader language, IESL based on HLSL, from GLSL ES.

2nd UPDATE: From “UPDATE4” at François Remy’s blog post, GLSL is the default and you set a registry flag to get HLSL. Cool!

P.P.P.S. asm.js support in V8 bug on file.

9 Replies to “The Web is the Game Platform”

  1. WebGL in Internet Explorer? I’ll believe it when it’s officially announced and not a moment sooner.

    I do hope that both asm.js and WebGL will eventually matter. Still WebGL has other problem besides Internet Explorer not supporting it. I’m not sure the exact reason for this but *many* demos (but not all) of WebGL don’t work at all (as in they don’t run, show only blank, and error message etc.). I’m not sure if it’s incompatibilities in implementations or my graphic drivers being blacklisted (a frustrating problem by itself).

    So as many cool things I see in WebGL they get canceled out by all of the demos that don’t work on my computer. Yes, I expect demos to work because they are usually trying to show the potential of something.

    To me this is more important than if Internet Explorer supports it. Besides I have a feeling (if they do support it) it won’t be what the rest of the Web considers to be “WebGL”.

  2. There’s no point in IE supporting a fragment or fork. Developers have the upper hand and they won’t target new-and-at-first-small-share IE11 if it doesn’t conform, so IE11 in such a scenario would see less adoption, all else equal.

    It’s good to believe when you see. Like Agent Mulder, I want to believe. We shall see, pretty soon I think!

    /be

  3. +1

    Few people realize the miracles Martin Best made happen, bringing the big names of the game industry to the table.

    That, and asm.js which made competing IL-for-the-Web approaches obsolete overnight. Thanks Luke Wagner, Alon Zakai, Dave Herman!

  4. This is impressive stuff indeed. Let’s try to get past the browser bickering and just recognize the developers leveraging our favorite platforms for gaming in a legitimate way. Kudos to the Epic and Mozilla teams for finding ways to make this possible.

  5. asm.js – so not all type info is thrown away. Makes sense for algorithmic/math code. Dynamic OO for everything else.

    I prefer:

    function area(a:int, b:int) { return a * b; }

    If all type annotations on a function signature are machine types (or even binary/value types) then optimise. Otherwise the type annotation is for tool support and thrown away.
    Note: annotations only on function signatures – and optional. No over annotation like Dart.

  6. Kevin: no syntax changes or asm.js is not a subset and doesn’t run (pretty fast) in modern browsers — totally defeats the purpose.

    You could be arguing only about the longer run, but the short run is a jealous mate.

    Some of us (most?) on TC39 are increasingly skeptical that we’ll ever have type annotations, but the v:t syntax is indeed what we’ve entertained and tried since ES4, and what’s in TypeScript.

    /be

  7. Yes – thinking longer term. Shortest-path evolution is often good – because in the long run – well Keynes said it best. But TypeScript syntax wise hits the spot in a way that Dart doesn’t. As well as type optional type annotations, ‘declare’ – is a nice way of dealing with dependency injection/globals.

    Any plans for Firefox OS on tablets – esp 7 inch ones. I think there’s a big opportunity in the education field. Every school kids book bag will have a tablet very soon – and no books. But what runtime will apps use – java/dalvik/renderscript or Obj C or JS/HTML5 or even JS/QML.
    Ideally ed apps will be coded in the language which students can learn as their first language.

  8. Game tech used for education – such an opportunity. Shooting zombies and throwing birds at pigs is fun. But why not for education. Could work with ed publishers – they seem to be a bit clueless with regards to software and would welcome a ‘platform’. Apple are shrewdly moving into this area.

Comments are closed.