Linux Gaming News

'BrowserQuest' Shows HTML5 Could Slay Flash

Mozilla’s “BrowserQuest” online game may look crude by cutting-edge, hardcore gaming standards, but it’s intended as a simple showcase for how technologies like HTML5 can be used to create cross-platform games and apps. The growing sophistication of HTML5 could spell trouble for Adobe Flash.

The Mozilla Foundation on Wednesday released BrowserQuest, a massively multiplayer online (MMO) game written in HTML5, JavaScript and other open source languages. [*Correction – March 29, 2012]

“BrowserQuest is a showcase of how open Web technologies like HTML5, JavaScript, CSS (cascading style sheets) and WebSockets can be used to create a multiplayer game that scales up to thousands of users,” Christian Heilmann, principal developer evangelist at Mozilla, told TechNewsWorld.

“Its main purpose is to prove that the Web is a platform for gaming as much as it is a platform for apps and documents,” Heilmann continued. “It also shows that JavaScript can be used server-side with node.js to allow for scalable architectures without resorting to non-Web technologies and plugins.”

Node.js is a platform built on Chrome’s JavaScript runtime for building fast, scalable network applications. It uses an event-driven, non-blocking input/out model that makes it both lightweight and efficient. This is suitable for running data-intensive real-time applications running across distributed devices such as MMO games.

Some Details About BrowserQuest

The game uses 2D figures with relatively primitive rendering, harking back to 2D games of perhaps 15 or so years ago. Players type in the name they want their avatar to use. All avatars pretty much look the same.

Players are warriors who travel a dangerous world filled with treasures. They snap up prizes, and can team up with one another to battle enemies, then betray one another to snap up the prize the enemy lost. BrowserQuest can be played by thousands of simultaneous players distributed across different instances of the game world.

BrowserQuest is powered by HTML5 WebSockets. These offer a full duplex communication channel operating through a single socket over the Web, letting players chat with each other in real time while generating far lower network traffic and latency than the polling and long-poll solutions previously used to simulate a full-duplex connection.

Other Web technologies used in BrowserQuest include HTML5 Canvas, which powers the game’s 2D tile-based graphics engine; Web Workers, which is JavaScript executed from an HTML page and let the servers initialize the game’s large world map without slowing down the homepage user interface; localStorage, which continually saves the progress of players’ characters; and HTML5 audio.

The Keys to the Kingdom

BrowserQuest “is an important step in the direction of the Web as a platform free of proprietary technologies and working across devices,” Mozilla’s Heilmann said. “You can play BrowserQuest on a desktop, smartphone or tablet without having to change the original game.”

HTML5 will “eventually replace Flash in all roles, and that includes gaming,” Rob Enderle, principal analyst at the Enderle Group, told TechNewsWorld. “All of the major browser makers appear to be favoring HTML5 as a replacement for Flash.”

For casual games, HTML5 will be the future, Enderle suggested. However, “other platforms may remain more viable and popular” for high-performance games.

HTML5 vs Adobe Flash

“It will take time for HTML5 to improve in many aspects,” Lewis Ward, a research manager at IDC, told TechNewsWorld.

Audio is one of the weakest parts of HTML5, Ward pointed out. “Some of the HTML5 applications out there still use the Flash Player plugin behind the scenes to handle the audio because the audio pieces of HTML5 aren’t robust enough to really do quality audio,” he added.

However, HTML5 may continue to gain ground as a development platform in the wake of Adobe’s (Nasdaq: ADBE) introduction of new premium features for Flash Player that developers and publishers will have to pay for if their net revenues from the games, minus taxes and fees, add up to more than $50,000.

That’s for the lifetime of the game, Adobe spokesperson Alex Dewey told TechNewsWorld.

Having to pay may prove unpopular among many game makers.

“Adobe has a strong position, and there’s a large market for Flash-based applications, but without more effective strategies to gain ground on alternatives such as HTML5, the future for Flash and the premium player strategy is not terribly bright,” Eric Leland, a partner at FivePaths, told TechNewsWorld.

“We honestly cannot see a model whereby developers are consciously choosing a pay model when they have perfectly viable tools like HTML5,” Mike Ricci, vice president of Webtrends’ digital solutions group, told TechNewsWorld. “This seems like more of a matter of putting a thumb in the large hole that has sprung in the Adobe dike and trying to salvage some of the games developers who have continued to use Flash.”