
Mozilla's BrowserQuest - Massively Multiplayer HTML5 Experiment - guigui
http://browserquest.mozilla.org/
======
paulrouget
Article about how the game works:
<https://hacks.mozilla.org/2012/03/browserquest/>

~~~
tkahn6
Since they used localStorage, you can modify the state of your character.

If you want the best weapons in the game, the sword is called 'goldensword'
and the armor is call 'goldenarmor'.

~~~
eridius
What would be the point of that? The only fun in the game (besides the fact
that it works at all) is finding the new gear and getting the achievements. If
you just edit your character, then you may as well not even play.

~~~
tkahn6
TBH I just did it because I could.

~~~
PhearTheCeal
How'd you do it? I'm trying to do:

localStorage.data = localStorage.data.replace('sword1', goldensword')

But it just reverts after I type that into the console. Could someone explain
how it works?

~~~
eridius
I ran this line

    
    
      localStorage.data = JSON.stringify((function (data) { data.player.weapon = 'goldensword'; return data })(JSON.parse(localStorage.data)))
    

and then reloaded the page, and I had the golden sword.

~~~
PhearTheCeal
Ah, I see. I didn't reload the page. I wonder if there is any way to do this
without reloading the page...

It be fun to show off if someone figured it out.

~~~
ynniv
The client server protocol only lets you specify arbitrary equipment when you
connect. To change equipment during the game, you have to Types.Messages.LOOT
a dropped item.

~~~
PhearTheCeal
Sorry, I don't understand. Types.Messages.LOOT can be used how exactly?

~~~
ynniv
LOOT is an action in the client server protocol - you can't easily use it. The
important part is that you can only equip an item that is available to be
picked up, unlike when you first connect. You can specify any weapon and armor
when you first connect, which is why editing the local storage works.

------
kenrikm
I like how they made it really easy to get in. No signup just name your guy
and go. I generally don't have time to play games however I appreciate the
amount of work that goes into them. Good Job.

~~~
masklinn
Realm of the Mad God is even better on that front: it auto-generate a name for
you, you just hit "Play" and you're in the game ready to rock (you can edit
the game once you're hooked of course, and create a formal account, and start
paying your dealer, but the initial experience is "hit play and you're
playing")

~~~
gcb
best "tutorial" i've seen indeed.

~~~
ayuvar
I thought the most clever part was how it throws you (pretty much) directly
into killing your first boss monster. You feel awesome within a few minutes of
starting, immediately before getting told to go kill more boss monsters.

------
riffraff
NPC soldiers with HTML5 orange shield are just too cute :)

And this is actually a nice little game. Buy then again, where is browserid
and open badges support ?

~~~
overshard
I have browserID supported on a few projects I've shipped, adoption comes down
to the developers, all Mozilla can do is provide the tools.

~~~
aptwebapps
Yes, but this is a Mozilla project, so no excuses on that one.

~~~
lillycat
It is on github, you could propose a patch... Mozilla is a not-for-profit,
this is a technological demo...

~~~
vertex-four
Mozilla are trying to push their BrowserID on the world though. A fairly
popular (among devs) technological demo seems like the right place to start
that; it'd show us how easy it is for users to use, and how simple it is to
integrate. Not using it is a wasted opportunity.

~~~
groovecoder
This demo is really for HTML5, not for BrowserID. BrowserID might add an
unrefined and unnecessary hurdle to the game. Then all the other platform
dev's and press will say silly things like HTML5 requires BrowserID or
something.

------
flexterra
Awesome! Thanks for the productivity kill mozilla. Looks great and it's a lot
of fun. Now I want to learn how to do this stuff in the browser.

------
michaelmartin
Brilliant game, the little Easter Eggs really made it worth playing.

For anyone wondering about the 2 mystery achievements at the end; the clues
are in client/js/game.js (
[https://github.com/mozilla/BrowserQuest/blob/master/client/j...](https://github.com/mozilla/BrowserQuest/blob/master/client/js/game.js)
), line 278.

Hiding the clues in the code like that just adds to the coolness. Great touch!

------
sbarre
Very fun and well done. Nice of them to publish the source as well..

~~~
lloeki
It feels very polished indeed. It works just fine on Safari, SFX included,
although there's no music (dunno if it is supposed to have). A little musical
theme per area would be nice.

There are easter eggs all over the place. I don't want to spoil them but a
bunch of them really made me smile.

~~~
vibrunazo
There is music, it can listen to it on Chrome.

~~~
gcb
as i could on firefox

------
franck
You can follow the player population in real-time on this dashboard:
<http://browserquest.mozilla.org/status/>

~~~
andypants
Can anybody explain what the dashboard is showing?

~~~
clone1018
3 servers, 10 worlds per server, number is people.

------
soapdog
Just collected the 20 achivements. Really fun demo, inspired me to learn more
about pixel art. I can code well but my art skills are bad. Wish they expanded
it...

------
ecto
This is so awesome. Well done Mozillians!

------
overshard
Could not move while on Chrome... was nifty though, I applaud the effort put
into this. One day Flash, one day...

~~~
jarito
I'm on Chrome and it worked fine. Took a while to connect to the server, but
other than that, it works great.

------
xtian
<https://github.com/mozilla/BrowserQuest/blob/master/server>

It's weird to me that they list the node dependencies in the server README
instead of using a package.json.

Very cool project, though.

------
pepijndevos
Did anyone figure out how to get to the mario pipe, and what the ??? quest is?

~~~
TobbenTM
First ??? quest: Get an orange potion (to get the Firefox costume)

Second ??? quest: Enter a portal. I found one to the east-southeast to the
starting point.

Still trying to figure out the last one.

~~~
mthq
The last one is Rickroll'd, you meet Rick Astley in one of the caves.

~~~
pepijndevos
It's in the maze, I've heard, but I can't find Rick.

~~~
boxysean
He's in there. Try unorthodox combinations. I think there's some state stored
on whether or not you went through "up" doors or "down" doors.

~~~
rtp
Always go to the left, even if it's the entries to the top or the bottom.

------
brico
It's still a long way to compete with Flash in the area of games but it's nice
to see this effort.

When I talked to Flash developers, their main concerns were having to worry
about different browsers and their belief that everything became "open source"
automatically because you can just view the source. They don't want to spend
weeks on a project that sets them apart from other competitors only to be
copied by the next guy within a day.

~~~
naeem
Shouldn't the beauty of games be the gameplay and the art, not the technology?
Isn't it a good thing that the technology behind a game is no longer the
primary selling point?

~~~
giulianob
It'll be nice when the tech doesn't matter but if someone can't play your game
because they prefer a different browser then that kind of sucks.

~~~
nextparadigms
If you're referring to IE, well IE will give up Flash support anyway.

~~~
SquareWheel
If you're referring to Windows 8, Flash will still work in desktop mode.
Plugins will only be disabled in Metro mode.

And yes, I think this separation is ridiculous.

------
weixiyen
The mouse movement is laggy. Why not use hardware mouse speeds? For an
interaction with that much frequency, it makes the game unplayable.

------
jiggy2011
Anyone know how they do the networking?

Websock , Comet or ajax?

~~~
paulrouget
All the info are here: <http://hacks.mozilla.org/2012/03/browserquest/>

------
rmc
I can't wait until browsers have inbuilt peer-to-peer networking. Then we
could do something like this entirely client side

------
cyborg
I forked this <https://github.com/mkrecny/BrowserQuest> \- added a static file
server on branch static and dependency management via package.json. Main
annoyance now is that they don't include the audio assets in the github repo :
/ Great fun game though.

------
sesqu
I found a bug.

I had my guy move to the other side of a barrier, and he did so by taking a
path through the adjacent square - but then my view was in the adjacent
square, my guy moved offscreen, never to return.

For such a slick demo, that was really unexpected.

------
itmag
Would be pretty cool if someone implemented a decent browser-based MMORPG with
a high degree of scriptability. Get the best of MMORPGs and MUDs +
portability.

~~~
brudgers
The other day, I was thinking about an SMS based MUD for cheap feature phones
- text based of course. An online game for places without much 3G adoption but
where there are lots of Nokias, so to speak.

~~~
daeken
I had an idea for a universal MUD a long while back (probably in junior high
school, when I was a huge MUD nerd). A single game world with interfaces for
IM, SMS, and the web. No matter where you were or what interfaces you had
available, you could continue to be immersed in the world. I got the
communication code working well for IM and the web, but never went beyond
that; with Twilio, it'd probably be pretty straightforward...

------
aw3c2
works with opera but eats a whole cpu core

~~~
gcb
which version? the non-preview 11 didn't worked.

~~~
aw3c2
Version 11.61, Build 1250, Platform Linux

------
Jyaif
HTML5, the futur of gaming! Meanwhile, World of Warcraft uses less CPU/GPU
than this demo...

------
glenntzke
I'd like to see see gain some traction and give Runescape a run for it's
popularity.

------
charlesju
What is the license on this?

~~~
franck
We will update the licensing info in the GitHub repo in the coming days.

------
digisth
Clever, and very well done.

------
theunixbeard
Am I doing something really stupid, or is this not working anymore???

------
nitinmartolia
19/20 ... what is the unknown ????? 20th one...anyone able to find?

~~~
PhearTheCeal
1\. Go into forest 2\. There is a maze cave in the top right corner of forest.
3\. Get stuck in the maze ;) 4\. To find final award just go through a cave
door then go back into the door you came out of. 5\. Yes, caves are magic

~~~
nitinmartolia
thanks !! it worked..

------
newobj
Crashes Mobile Safari on my iPhone.

~~~
masklinn
No issue on iOS 5.1 here (on a 4S)

------
user2459
Really organized, easy reading source too:
<https://github.com/mozilla/BrowserQuest>

Outstanding work that I'm sure is going to inspire a lot of people. Though I
don't see a license file anywhere.

~~~
franck
Thanks. We are going to update the repository soon with licensing info.

~~~
user2459
Awesome! And again great work. The game was really enjoyable and the code
inspiring.

~~~
franck
Thank you. That means a lot to us. :)

------
fooooobar
Can't even get past the enter your name screen.

~~~
jiganti
I got past that and into the game but I can't get my character to move, tried
on Chrome and Safari.

------
dalore
Wow this is pretty cool. But flash could do this years ago :)

~~~
esente
Yes, but flash will not be here years from now. Just move on.

