Where do you spend most of your time on the computer? Chances are it’s probably the browser window. That’s where you check email and update social media, and where you watch videos and conduct research. You’re probably using it right now to read this article.
And it’s starting to catch on. Early on, it only worked in Firefox; now Chrome has joined the bandwagon, and even Internet Explorer will do likewise soon. Microsoft said asm.js support was one of developers’ top 10 requests for Windows 10.
“Asm.js is well suited for any computationally intensive task on the Web,” said Dave Herman, Mozilla’s director of strategy for research. “Mozilla is seeing uptake of asm.js at places like Khan Academy, AutoDesk’s new tool, and photo editing solutions like Polarr.”
What Game Developers Want
Among those clamoring for asm.js, however, the voices of game developers are the loudest. At the forefront of the movement is Humble Bundle, the pay-what-you-want digital distributor that teamed up with Mozilla last fall to provide a number of games you can play in the browser.
That offering caught on with users, too. In two weeks, the bundle closed at more than half a million dollars in sales with more than 89,000 bundles sold. Now the company is gearing up for a second Humble Mozilla Bundle in 2015, bringing twice as many games to the browser.
“We ask ourselves at Humble Bundle, ‘why shouldn’t playing a game be as easy as watching a YouTube video?’” said cofounder John Graham. “These days, most computer users live in the browser. They should be able to play games in the browser, too.”
How It Works
Normally, if you want to play a video game on your computer, you can’t just click and go. You might run a DVD version of the game, or download a copy of the software from Steam or a similar service.
“Right now, you have to download an extension or an app manager,” said Graham. “Really, the browser could be handling all that for you. In general, I’m worried about the direction of app stores. Their deeper and deeper integration is turning the PC into more of an iPhone.”
It’s no instant process, says Humble Bundle software developer Anthony Vaughn, but it’s no more difficult than porting a game written in C/C++ to Linux.
What’s The Catch?
There’s no doubt that asm.js has the potential to revolutionize the way gamers play on the computer. But it’s not quite there yet.
Plus, there are the technical difficulties some users have been experiencing with the Humble Bundle’s asm.js games as recently as November 2014. Vaughn said that the difficulty of porting a game to the Web with asm.js depends significantly on the way the game has been designed.
“Many games are made to update synchronously where most of their work is done such that every task that a game wants to do can’t start until the task before it has completed,” he said. “However, if you design a game for asm.js, you can have multiple tasks going on at once. So the game might be running a level, and while that’s happening, you can have it streaming audio, video, and pulling up another level in the background.”
Or to put it more simply, the game needs to have the ability to buffer.
“It’s like watching a YouTube video before the entire video is loaded,” Graham said. “If you can let if buffer while you watch, you get a smooth, continuous experience.”
Humble Bundle said the most difficult part of the process is where middleware is involved. Many game developers use middleware solutions to shortcut audio playback, UI rendering, and physics calculations. In his recent post on Gamasutra, Vaughn encouraged game developers to ask their favorite middleware options to come over to asm.js. Otherwise, these solutions need to be restructured in order to bring games to the browser.
These difficulties are a major reason why you’re not seeing more games in your browser right this minute. It’s up to pioneers like Humble Bundle to work out the kinks. According to Graham, it’s worth the effort.
“In one sense, asm.js is the most cross platform language there is.The browser is the most cross-compatible platform there is, and accessibility is very much part of the ethos of Humble Bundle,” he said.
Screenshot of the asm.js game “AaaaaAAaaaAAAaaAAAAaAAAAA!!! for the Awesome” via Humble Bundle