BrowserQuest is built entirely on native web technologies

Mar 28, 2012 12:20 GMT  ·  By

Just as Adobe bets that developers will pay to be able to deploy powerful games on the web, Mozilla is showing that you don't have to. In fact, you don't even need to use a plugin, the web can handle it all.

Mozilla is showcasing one of its latest projects, an MMORPG built entirely with native web technologies, HTML5, JavaScript and Websockets.

BrowserQuest was built by Little Workshop and Mozilla. It's a classic 2D RPG with a multiplayer twist. And it works in any browser that supports the modern web, that would be Firefox, Chrome, Safari and Opera with a bit of tweaking.

"You play as a young warrior driven by the thrill of adventure. No princess to save here, just a dangerous world filled with treasures to discover. And it’s all done in glorious HTML5 and JavaScript," Mozilla explains.

"Even better, it’s open-source so be sure to check out the source code on GitHub," it added.

Owing to the "massive" part of its description, the game can entertain thousands of users at a time, across several instances. Players can talk to each other and kill the baddies.

More interesting than the game itself is the technology behind it though. For one, the client, the stuff you see in your browser, is powered by HTML5 Cavans, for the 2D graphics, and JavaScript, for the actual code.

The game communicates with a server via Websockets, ensuring great latency and bi-directional data transmission. What's more, the server itself is written in JavaScript too and is run on multiple servers via Node.js.

That's not all, the game uses the HTML5 Audio API for sound, web workers to load the game map while allowing the homepage to work properly, localStorage to save game progress and CSS3 Media Queries to ensure the game adapts to the various window and screen sizes.

Photo Gallery (2 Images)

BrowserQuest was built entirely with web technologies
The game is a classic 2D RPG with a multiplayer element
Open gallery