7 ms·
Mozilla Pushes the Web to New Levels as a Platform for Games
- _greim_ 11y agoThis is awesome and I hope it ushers in an era of the web being a platform for high-performance apps in general.
- Touche 11y agoI'm really disappointed with how slow publishers are being to adopt these technologies. If you look at the timeline[1] asm.js came out 3 years ago, fullscreen API 4 years ago. And I can't hardly find any non-demo WebGL games on the web. I'm not talking AAA games, just something beyond "here's something I built at a hackathon". [1]http://www.openwebgames.com/#/timeline.html http://www.openwebgames.com/#/timeline.html
- chadaustin 11y agoAs someone who has tried, there are just too many things wrong with the web as a platform. I'd love to use it to ship great customer experiences, but: 1) Web Audio is awful -- https://chadaustin.me/2014/09/web-platform-limitations-part-2-web-audio-api-is-a-mess/ https://chadaustin.me/2014/09/web-platform-limitations-part-... 2) You STILL cannot prioritize XMLHttpRequests. https://chadaustin.me/2014/08/web-platform-limitations-xmlhttprequest-priority/ https://chadaustin.me/2014/08/web-platform-limitations-xmlht... 3) The input APIs are janky 4) High frame latency in Chrome, low frame rate in Firefox 5) Allocating more than a couple hundred megabytes is risky -- it might even crash your process (I've filed a few bugs against Chrome on this) 6) SIMD.js is a least-common-denominator approach, meaning you pay a penalty on one of x86 or ARM, just like we saw with the JVM and floats. 7) JavaScript still doesn't have int64. 8) Still no efficient memcpy. As far as I can tell, the web is not on track to catch up to native platforms in terms of customer experience anytime soon. That said, you could probably ship some small things on this tech and get away with it, but in no way would they supplant a native iOS or desktop app. [begin rant] The WHATWG is a bunch of out-of-touch buffoons who have an opinion on everything even when they're not close to the problem domain. Browser vendors try too hard to work together, meaning if anyone has an objection about any API, it won't ship. (Or will take years.) The Extensible Web Manifesto seems to have had no effect. There are no conformance suites, so you can't actually rely on APIs working the same across all browsers. [end rant] I'm a strong believer in the open web as an enabling democratizing force for all kinds of content, but I no longer have faith that web standards bodies and consortiums of browser vendors will get us there anytime soon. EDIT: That really got me worked up. Better than morning coffee. :) But I'd be remiss if I didn't call out a small group of amazing people who are, without much support, pushing the platform forward. Alon Zakai, author of Emscripten, is a visionary and has had a HUGE impact on the feasibility of games in browsers. Dan Gohman, even though I've disagreed with his opinions on how SIMD.js should work, does extremely influential work. Patrick McManus is awesome. Vladimir Vukicevic pushed WebGL, which is one of the few good web APIs. Also, major props to Google's PNaCl team as they've retooled towards WebAssembly. I'm sure I'm missing people. Contrary to what I might have indicated, there ARE people with taste who do great work. :)
- vvanders 11y agoYep, lots of reasons for no adoption. Hell, WebSockets doesn't have UDP. That's like the cornerstone of low latency networked games.
- opless 11y agoOr just not use JS for serious computation. It was never designed for this, and upgrading the core language to do serious computation will be like putting lipstick on a pig or a sticking plaster on a wooden leg. You're correct though Emscripten and WebGL are amazing things, but ultimately hacks. With browsers scurrying to implement ASM.js support, JITs etc... (because most JS developers write shonky code and interpreting JS is not fashionable any more) JS considered dangerous. DO. NOT. USE.
- forgotmypassw 11y ago>I'm really disappointed with how slow publishers are being to adopt these technologies. And for that, I'm grateful.
- andrewmcwatters 11y agoPublishers? You mean game developers? Game developers don't use these technologies because they're a joke.
- drhayes9 11y agoMy favorite resource for news about HTML5 and gaming is http://www.html5gamedevs.com/ http://www.html5gamedevs.com/. You should also check out itch.io and filter for browser games: https://itch.io/games/platform-web https://itch.io/games/platform-web The "biggest" WebGL game I'm tracking these days is Wild Terra: http://www.playwildterra.com/ http://www.playwildterra.com/ But https://www.starbreak.com/ https://www.starbreak.com/ is also a pretty fun MMO in its own right. But there are hosts of others hiding within non-traditional gaming sites, like the BBC. I think browser-tech games haven't figured out the marketing/monetization paths. I think the rational response to the loads of risk found in making money on games is to produce lots of smaller games to see what sticks rather than investing tons of time into single, larger titles. That doesn't mean that larger projects aren't out there, I just think the risk/reward curves of game development don't lend themselves to experimenting with weird technologies as well without morphing the gaming experiences beyond what we'd normally call games.
- leereeves 11y agoFrom a purely technical standpoint, both Wild Terra and Starbreak look like games from 20 years ago. Good examples of HTML 5 instead of Flash, but not great examples of the web as a serious games platform.
- drhayes9 11y agoWhen you say "technical standpoint", do you mean the graphics? 'Cuz I think the accessibility provided by browser-based MMOs is the best feature: no download, no install, available anywhere there's a browser. AFAIK there wasn't something like that available in 1996 and is the key technical differentiator that makes me so excited about the web as a games platform. I think if we're talking about the web as a serious games platform we have to widen the scope of the discussion from graphics/sounds and include both the network effects of online players and the true multimedia approach the games can have, especially when paired with social media. Here are some features web games can use because they run on the web platform that the authors don't have to write themselves: * Speech recognition * Peer-to-peer communication * WebVR * getUserMedia I agree, though, that not enough web games do any of this. The ones I've played keep trying to ape the old platform without using all the benefits of the new one.
- MisterBastahrd 11y agoThe web is an inferior platform for games. Not sure why this is a surprise.
- vamur 11y agoIt's going to take time for these technologies to mature and for developers and companies to start using them. And even then it will be Flash like games for a while.
- maho 11y agoDo these new technologies enable lower mouse-event latencies? I struggle with making even the simplest 2d apps in a canvas element, because they always end up feeling sluggish. This was and still is a major point where Flash beats HTML5.
- adrusi 11y agoYou don't want to use mouse events for games. You probably want to use window.getAnimationFrame and then just query cursor coordinates. The mouse move events have to be filtered to be less frequent to accommodate some of the limitations of the JavaScript concurrency model.
- blaisio 11y agoNeither of the APIs you mention exist. Maybe you mean requestAnimationFrame? That still doesn't solve the problem of getting the current mouse coordinates though. Currently, the only way to get them is through events like mousemove. Honestly, it would be wonderful if we had immediate mode APIs for everything instead of being forced to register event handlers, which will always lag at least 1 frame behind.
- adrusi 11y agoWhoops, yeah it's been a while since I worried about stuff like this in javascript. I guess what I remembered doing was keeping track of cursor position in a global, updated on every mousemove to simulate immediate mode in a requestAnimationFrame callback. But as you say, that retains all the disadvantages of event latency. requestAnimationFrame is designed for immediate mode rendering, so it should probably pass its callback some information about input states or offer some other way of getting that.
- mtgx 11y agoWhat about Vulkan for WebAssembly?
- tangue 11y agoTwo years later : "Mozilla will sunset it's games team to focus on Internet for dogs" Sarcasm aside, I saw XUL, I saw Thunderbird, I wrote code for both, it's hard for me to believe in Mozilla.
- _wmd 11y ago"I saw OLE, I saw Outlook Express, I wrote code for both, it's hard for me to believe in Microsoft" Shitty apps and shitty tech :) XUL was conceptually nice but in reality a nightmare for efficiency and pretty much it was just hard to work with due to a lack of tooling and solid evolution over time. I don't know of many sad to see it go
- toyg 11y agoIt is really hard to believe in Microsoft, even for card-carrying microsofties. Silverlight? VB6? The umpteen drm formats? DCOM? ActiveX?...
- oblio 11y agoOn the other hand, people working with .NET/SQL Server have been making a (great) living for 10 years. Every company has its duds.
- VOYD 11y ago+100
- discreteevent 11y agoOne can debate the details but in my opinion COM is fundamentally a great technology. Statically defined interfaces with extremely late bound, relatively large, opaque implementations. No inheritance. It's one of the only things that realises what Alan Kay was talking about when he talked about OOP (which is very different to what most people complain about). It's microservices and more and it works: It's still at the core of Windows and has served it well.
- JasonSage 11y agoThese kind of announcements from Mozilla have become quite regular, and every time I find myself wanting an Electron- or nwjs-like technology to evaluate the possibility of shipping a real app with it.
- kruhft 11y agoIs XULrunner still a thing?
- JasonSage 11y agoThey dropped support for it several years ago, I believe.
- robterrell 11y agoWhy would you do that? All of the disadvantages of the web stack in the middle, none of the advantages of a stand-alone app. I guess I mean, if you can code for WebGL in JavaScript you can probably code for GL in C even if you're not yet aware of that fact. And if you're just using Unreal or Unity, they already export "real" apps.
- JasonSage 11y ago> I guess I mean, if you can code for WebGL in JavaScript you can probably code for GL in C even if you're not yet aware of that fact You're quite right about that. But then writing the rendering code is not the hard part, is it? I'd actually prefer to build my native app in Rust right now, but there's a few things holding me back. Namely: 1. UI layout and rendering: Currently Rust has no packages (that I'm aware of) delivering a good developer experience for building layouts and interfaces. There's a lot of parts to this besides just the layout calculation—there's font loading and text layout, too. 2. Easy cross-platform support: I don't have access to all the devices I'd like to build my app for. That's a relatively small problem, but also one I don't want to worry about if I don't have to. Not only can you write cross-platform logic and interfaces very easily, but the debugging experience for these is also really, really good. Could I figure out solutions to these problems? Definitely. However, I'd rather spend my time crafting a great user-experience for my game instead of building a layout engine. The JavaScript ecosystem is great currently, and if web performance is "good enough" for my use case, I don't have a very good business reason to pursue a different technology stack.
- TazeTSchnitzel 11y agoShared Array Buffer is exciting, this opens the way to threading in asm.js and WebAssembly.
- golergka 11y ago> Unity, one of the largest and best-regarded game engines in the industry, showed that the Web stack is ready for prime time by removing the ‘Preview’ label from their amazing WebGL exporter which takes advantage of WebGL and asm.js. And still, making a straightforward social game with simplest 3d scene to work in WebGL takes a month of work, and even after that, it hogs 1 Gb of memory, runs around 30 FPS and heats up the CPU like a beast.
- hackuser 11y agoI love Mozilla's dedication to the open Internet and their innovative, strategic thinking about it. This seems like a way to nudge developers off of native apps and onto open technologies. However, must the platform be a browser? Why not an open app technology? (Based on Servo?) Perhaps that is too much of a leap to influence the marketplace any time soon.