BrowserQuest – a massively multiplayer HTML5 (WebSocket + Canvas) game experiment

It’s time for some gaming action with a new HTML5 game demo: BrowserQuest, a massively multiplayer adventure game created by Little Workshop (@glecollinet & @whatthefranck) and Mozilla.

Play the game:

BrowserQuest is a tribute to classic video-games with a multiplayer twist. 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.

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

Watch a screencast:

A multiplayer experience

BrowserQuest screenshot

BrowserQuest can be played by thousands of simultaneous players, distributed across different instances of the in-game world. Click on the population counter at any time to know exactly how many total players are currently online.

Players can see and interact with each other by using an in-game chat system. They can also team up and fight enemies together.

BrowserQuest is a game of exploration: the more dangerous the places you go, the better the rewards.

Powered by WebSockets

WebSockets are a new technology enabling bi-directional communication between a browser and a server on the web.

BrowserQuest is a demo of how this technology can be used today to create a real-time multiplayer game in a single webpage. When you start to play, your browser opens up a WebSocket connection to one of several load-balanced game servers. Each server hosts multiple world instances and handles the player synchronization and game logic within all instances. Because the server code is running on Node.js, both the server and client codebases share a small portion of the same JavaScript source code.

Server code is available on Github.

BrowserQuest screenshot

Built on the Web platform

BrowserQuest makes extensive use of different web technologies, such as:

  • HTML5 Canvas, which powers the 2D tile-based graphics engine.
  • Web workers, allowing to initialize the large world map without slowing down the homepage UI.
  • localStorage, in which the progress of your character is continually saved.
  • CSS3 Media Queries, so that the game can resize itself and adapt to many devices.
  • HTML5 audio, so you can hear that rat or skeleton die!

Available everywhere

Since BrowserQuest is written in HTML5/JavaScript, it is available across a lot of different browsers and platforms. The game can be played in Firefox, Chrome and Safari. With WebSockets enabled, it’s also playable in Opera. Moreover, it’s compatible with iOS devices, as well as tablets and phones running Firefox for Android.

BrowserQuest screenshot

The mobile versions are more experimental than the desktop experience, which has richer features and performance, but it’s an early glimpse of what kind of games will be coming to the mobile Web in the future. Give it a try with your favorite mobile device!

Join the adventure

Want to be part of BrowserQuest? Create your own character and venture into the world. Fight enemies by yourself or with friends to get your hands on new equipment and items. You might even stumble upon a couple of surprises along the way…

About Paul Rouget

Paul is a Firefox developer.

More articles by Paul Rouget…


  1. ywlcjl

    I success try to fix the browserquest “connecting to server” Problem on my win7 x32 sp1, it’s the Anti-virus software setting Problem. I close Web protection on AVAST Anti-virus software , the game can play.

    May 23rd, 2012 at 19:43

  2. Mike

    Well its a very good game but i keep dying so it is not that awesome but its VERY Awesome

    May 31st, 2012 at 17:41

    1. Kyle

      You must not have been trying very hard. I was able to make it through the entire game and get the best armor and beat the final boss in about 10 minutes.

      October 5th, 2012 at 21:00

      1. Sassy

        Me too :)

        February 27th, 2013 at 18:33

  3. Wern

    Very nice game! But is it only normal for this game to use up a lot of resources? Because every time I play it the fan of my laptop spins like crazy and more heat is produced by the computer.

    June 1st, 2012 at 22:04

  4. Weerayut Teja

    Great game with source code. Thank you. I’ll learn from it.

    June 5th, 2012 at 07:56

  5. Simon Smith

    the website doesnt work in Firefox 13.0.1 on Mac :'(

    trying to test out the websockets and also try this game but just keeps saying

    We’re sorry, but your browser does not support WebSockets.
    In order to play, we recommend using the latest version of Firefox, Chrome or Safari.

    July 15th, 2012 at 09:28

  6. Enda Mannn

    I really enjoyed playing this game but wish there were many more tasks to complete. Great work all the same.

    July 20th, 2012 at 02:54

  7. DD

    Sorry if this question sounds silly but I am a newbie to web development as a whole and I have to do a PoC on HTML5 games.

    I have compiled the server and started it on my localhost. If i type “http://localhost:8000/status’ in the browser I get a result. But I cannot get the game to start. What is the URL to start the game? Is it “http://localhost:8000/BrowserQuest”? In the client foler I have modified config_local.json and config_build.json to
    “host”: “ws://localhost”,
    Is this correct.

    August 1st, 2012 at 02:31

  8. Mark Manning

    I think this is awesome. Very smooth text transition, graphics transition, and it played very well. To Mike who keeps dying – quit attacking monsters you can’t kill. Try the smaller ones first. :-) To Wern – the reason your cpu’s fan comes on is because your system probably is not set up to handle the newer technology. Older computers just have a harder time with it because usually the hardware is emulated in software. So a particular bit of code may be executing a lot to compensate for the missing hardware.

    August 5th, 2012 at 12:44

  9. Robert Burkhall

    I’m posting this for anyone who has tried to get the game working on their local machined and have had issues. I describe the problem with cross domain security and the fix(work-around) that I came up with that fixes the game’s connecting issue. Hope this helps!!!

    August 17th, 2012 at 23:52

  10. abhinav

    Really nice :)

    August 20th, 2012 at 01:13

  11. hello

    here to play extension of browserquest

    Server runned by an individual
    not for commercial use

    August 22nd, 2012 at 04:01

  12. hello

    here is the new link for the extension of the game

    to global chat type /1
    for example “/1 hi”
    to use potion press 1 or 2

    September 3rd, 2012 at 10:00

    1. sonns

      Hello !
      Can you teach me how to exten this game please ?
      I wan to develop it

      December 24th, 2012 at 01:17

  13. alex

    you have to register in browserquest

    September 8th, 2012 at 09:45

  14. Jenny


    I really like this article and the game. I also would like to suggest you a HTML5 game:

    Have fun playing it! :-)

    September 18th, 2012 at 05:30

  15. Robert Wagner

    I get stuck at “Connecting to server…” I’m not to familiar with WebSockets but it might have to do with the fact that I am behind a proxy server. I was able to connect on another device that was not behind the proxy.

    September 24th, 2012 at 11:00

  16. Justin Clift

    For anyone interested in trying out the BrowerQuest code, or getting involved with further development, use this GitHub repo:

    The Mozilla repo has many bugs, and although a useful reference point, is abandoned. :(

    September 26th, 2012 at 02:53

  17. Goldniko

    The game cant connect to a server, though i wait for half a hour to do so

    October 7th, 2012 at 20:10

  18. hello

    here to watch the extended version of browserquest!

    October 11th, 2012 at 05:48

  19. Chris Nikolajsen

    Great game! It reminds me of the SNES game “Zelda: A link to the past”. Its realy nice that you made the game code opensource. Im on a quest to make an HTML5 game and this is going to be a good source of inpiration and knowledge :) thx

    November 7th, 2012 at 01:10

  20. Agent BA-2 “J”

    Agent BA-2 “J” is my character name. (I got it from this DS game called Elite Beat Agents (EBA for short)).

    November 7th, 2012 at 17:51

  21. crizcross

    The last medal *spoiler*. to the east of the forest is a cave guarded by three giants. in the cave take right right bottom left bottom left or sthin like that to get to the rickroller :P

    November 18th, 2012 at 05:42

  22. Juan Vazquez

    This is one heck of a game! I love browserquest

    December 7th, 2012 at 07:52

  23. Yossi levi


    I want to build multiplayer game.

    I read about web-socket which work with tcp protocol which possible to response by 50 ms to each request.

    I know that node.js work with web-socket,
    I read some guide and I see that I must to install node.js on my local host(

    My question is:

    How can I integrated the web-sockt in my host domain
    like instead -> 1337 port listening ?

    Many Thanks

    December 9th, 2012 at 22:52

  24. RandomAdventure

    Wow I beat the game and got the best armor in 10 minutes! :D

    December 30th, 2012 at 05:56

  25. RandomAdventure

    Also RandomAdventure is my game’s username

    December 30th, 2012 at 06:08

  26. Cameron

    Unfortunately, while the game claims iOS compatibility, this is not the case. The game freezes you whenever you enter the room containing the boss using mobile Safari. Whichever bug causes this should be fixed. It is not “compatible”, in my opinion, if it does not function properly. Misleading, and very disappointing for the many users that cannot complete this game.

    January 10th, 2013 at 19:57

  27. Francis

    The page could use something that stops you pressing back button

    January 22nd, 2013 at 13:35

  28. Stephanie Bergmann

    I want to play Games @ Facebook in Germanlanguage!!

    February 12th, 2013 at 11:34

  29. Brian

    This was amazing! I made a multiplayer html5 game of my own after being inspired by this one! Check out

    February 15th, 2013 at 19:23

  30. PLayer

    make diffrent maps

    March 4th, 2013 at 12:38

  31. Fire crow

    Awesome !!!! excelent game, the real time between players is wonderful

    March 6th, 2013 at 09:09

  32. Zoe Barrie

    i luve it

    March 27th, 2013 at 10:50

  33. vucko

    I can’t connect to the server, only the message “Connecting to server…” shows up in the browser without any change for more than 10 minutes.

    March 28th, 2013 at 17:41

  34. CraigLiamFord

    When I play the game in my web-browser, I can ha=ear the music playing, But when I use the Windows 8 app, I cannot.

    The sound/Volume is on at the bottom right.

    April 8th, 2013 at 04:47

Comments are closed for this article.