Thursday, April 4, 2013

Making a Game Out Of the Web

Andrew over at CSE just release an update about the UI in Camelot Unchained.

lol I think the word revolutionary falls way short.:)

"Today I want to talk about our plans for the UI, but it’s a much deeper thing than just making windows and buttons. It’s recognizing that once an MMO is launched, the world belongs to the players who live there as much as it does to the developers who built it. It’s admitting that, as a small studio, we won’t be able to exactly support every single player’s individual playstyle, and that there’s as much talent and creativity spread through the larger community as there is inside our little office. And it’s embracing the fact that in 2013, your ability to connect to something shouldn’t stop when you walk away from a desktop PC.

A few years ago I came around to an idea: This whole “web” thing is probably going to be around for a while. That sounds silly. It should sound silly, because it’s so obvious. But for whatever reason, most MMO developers haven’t gone all-in on it yet. There are “browser-based” MMOs, but most are just taking a traditional MMO and putting it in a web page, without making the most of what that enables. There are MMOs that do an increasingly good job of exposing their data through a web API (EVE and WoW are standouts in this regard), but even then it’s a backdoor view into the game rather than the game itself.

What if, instead of putting parts of our game ON the web, we made our game OUT OF the web?
That’s what brings us back to the UI of Camelot Unchained. Over the years I’ve worked with and/or built various UI toolkits. Scaleform takes advantage of all the Flash authoring tools out there, and it’s really big in AAA games — we used it on Skyrim. For Warhammer Online, we used a custom solution of Lua and XML — which was really familiar to players who were already making UI mods in Lua and XML for a certain other MMO. But there’s another option out there that isn’t getting as much use in games as it should. A toolkit that more of our players have experience developing for than anything else out there. A scripting engine that’s been optimized for years by a team of the brightest minds in the industry. A runtime that’s extensively tested every day on hundreds of millions of PCs and renders straight into DirectX textures ready for use in games.

I’m talking, of course, about the ever-present HTML and JavaScript. Each section of our in-game UI can behave as a little fragment of a webpage, with the same CSS and PNGs we all know and love. Whether we’re going to use Chromium or Mozilla or Awesomium or some other implementation isn’t the most important thing here; it’s all the additional possibilities that open up for us beyond just having a fast, cheap, flexible, and extremely moddable UI.

 Anytime, Anywhere, on Anything

First and foremost, because all of our UI will be implemented as web page(s) overlaid onto the game, our UI can also be put directly onto web pages. Have you ever wanted access to your guild chat from someplace other than a full-on game client? It’ll be right there at (link doesn’t work…yet). This won’t be some lesser, limited version of what you have in-game; it will be the exact version from the game. Access to characters? Statistics for your realm? The state of the war and frontiers? All there.

Obviously, anything that depends on your character’s physical presence at a certain spot in the game world won’t work in a meaningful way if you’re not connecting from the fully logged-in game client, and there’ll be things that we limit for security or spam-fighting. But as a general rule, your entire in-game social life and much of your economic life will be accessible from anywhere, in any modern web browser, without plugins, in exactly the same form as when you’re running our big shiny standalone 3D desktop client.

Accessibility Equals Moddability

As mentioned, HTML and JavaScript are spoken by nearly everyone who’s done any programming. There are some great tools in other languages, but the breadth of experience with them doesn’t come anywhere close to the number of people who know and understand how to put together a basic webpage. We want the only barrier to entry for hacking on our UI to be your own creativity, and that means we don’t want the first hurdle to involve learning a new language or toolkit.

There are also some really nice things that go along with HTML. Want to make your own plugin look like it fits in with the rest of our game, without being a graphic designer yourself? Just inherit our CSS. Want to change the look of the entire game, including other people’s plugins, because you are a graphic designer yourself? Just override our CSS. It’s the C part of CSS that makes the magic. This is also where the sandboxing of modern browser implementations becomes important — because their security’s already been battle-tested in the wild, we can be a little more liberal in what range of scripting we allow.

One of my personal goals, though it may not make it in at launch, is to make installing a new UI mod or plugin as simple as copy/pasting a URL into the game. We know we can’t make everything for everyone, but we want to make sure everyone can make something for each other.

Watch the video and continue reading here:   Making a Game Out Of the Web


Post a Comment