It has three major parts:
- the server side, which runs using Node.js
- the database side, which runs using Redis
- Firefox - Works well.
- Chrome - Works well.
- Chromium - Works well.
- Opera 15.x - Works well.
- Opera 12.16 - Background music doesn't play. Everything else works (Very slow though).
- Safari 6.x - Background music doesn't play. Everything else works well.
- IE 10.x - Doesn't work. Other versions untested.
How to get it going
Getting the server up and running is pretty easy. You need to have the following installed:
- Node.js ← Versions 0.8.x-0.10.x work. Do not use 0.6.x, it does not work.
- gcc-c++ ← optional. Not needed on windows.
- GNU make ← optional. Not needed on windows.
- Memcached ← optional. This is needed to enable metrics.
- zlib-devel ← this is the Fedora/RHEL package name, others may be sightly different. Not needed on windows.
- Redis server ← this is needed for the game to connect to the backend database.
Clone the git repo:
$ git clone git://github.com/browserquest/BrowserQuest.git $ cd BrowserQuest
Then install the Node.js dependencies by running:
$ npm install -d
Then start the server by running:
$ node server/js/main.js
The BrowserQuest server should start, showing output like this:
$ node server/js/main.js This server can be customized by creating a configuration file named: ./server/config_local.json [Thu Sep 13 2012 17:16:27 GMT-0400 (EDT)] INFO Starting BrowserQuest game server... [Thu Sep 13 2012 17:16:27 GMT-0400 (EDT)] INFO world1 created (capacity: 200 players). [Thu Sep 13 2012 17:16:27 GMT-0400 (EDT)] INFO world2 created (capacity: 200 players). [Thu Sep 13 2012 17:16:27 GMT-0400 (EDT)] INFO world3 created (capacity: 200 players). [Thu Sep 13 2012 17:16:27 GMT-0400 (EDT)] INFO world4 created (capacity: 200 players). [Thu Sep 13 2012 17:16:27 GMT-0400 (EDT)] INFO world5 created (capacity: 200 players). [Thu Sep 13 2012 17:16:27 GMT-0400 (EDT)] INFO Server (everything) is listening on port 8000
That means its working. There should not be any warnings or errors.
Using a browser, connect to port 8000 of the server entered above. The BrowserQuest start page should appear, and the game should work.
Mac OS X
Node.js, Memcached, and Redis installed through Homebrew are known to work:
$ brew install node redis memcached $ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist $ git clone git://github.com/browserquest/BrowserQuest.git $ cd BrowserQuest $ npm install -d $ node server/js/main.js
Or you can download the latest Redis source from http://redis.io/download
$ tar xzf redis-<version>.tar.gz $ cd redis-<version> $ make
To start Redis now, you can simply run:
You can try interacting with it by starting another terminal and typing:
$ redis-<version>/src/redis-cli redis> set foo bar OK redis> get foo "bar"
Node.js, Memcached, and Redis for Fedora 16+ and RHEL/CentOS/SL 6.x
On Fedora 16+ and RHEL/CentOS/SL 6.x, you can install Redis (required) and Memcached (optional) using yum.
For just RHEL/CentOS/SL 6.x, you need to add the EPEL repo first. Not needed for Fedora:
$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Then install Node.js and everything else needed:
$ sudo yum install zlib-devel gcc gcc-c++ autoconf automake make redis nodejs npm memcached $ sudo chkconfig redis on $ sudo chkconfig memcached on
Start Redis and Memcached by running:
$ sudo service redis start $ sudo service memcached start
Now continue on with the normal steps to clone the BrowserQuest git repo, and start up BrowserQuest:
$ git clone git://github.com/browserquest/BrowserQuest.git $ cd BrowserQuest $ npm install -d $ node server/js/main.js
Windows 8 is known to work ok with just the base Node v0.8.18 installed, without Visual Studio, nor Python, nor the native extensions for npm modules installed.
You can download an experimental Win32/64 version of Redis from here: http://redis.io/download
You can download the latest version of Memcached for Win32/64 from here: http://blog.elijaa.org/index.php?post/2010/10/15/Memcached-for-Windows&similar
Currently, BrowserQuest can run on the following PAAS (Platform as a Service) providers:
Instructions for OpenShift
Follow the instructions to get started with the OpenShift client tools here.
Create a new application by running this command:
$ rhc app create <app-name> nodejs-0.6 $ cd <app-name>
where <app-name> is the name of your app, e.g. browserquest.
Add the Redis cartridge (necessary for BrowserQuest to be able to store data) with the following command:
$ rhc add-cartridge \ http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart \ --app <app-name>
Add the BrowserQuest repository, and pull its contents with the following commands:
$ git remote add github https://github.com/browserquest/BrowserQuest.git $ git fetch github $ git reset --hard github/master
Now, deploy to OpenShift with one final command (this will take several minutes):
$ git push -f
Congratulations! You have now deployed BrowserQuest to Openshift! You can see the url of your instance by running
$ rhc app show <app-name>
Visit the url shown by the above command to see BrowserQuest running. You will need to add ":8000" to the end. Use the url below as a guide:
Lots of useful info on the wiki.
The old mailing list on librelist.com is no longer used. Its archives are online here.
#browserquest on irc.mozilla.org
Code is licensed under MPL 2.0. Content is licensed under CC-BY-SA 3.0. See the LICENSE file for details.
Originally created by Little Workshop:
All of the music in BrowserQuest comes from Creative Commons Attribution 3.0 Unported (CC BY 3.0) sources.
- Aaron Krogh - beach
- Terrel O'Brien - boss, cave, desert, lavaland
- Dan Tilden - forest
- Joel Day - village
Many other people are contributing through GitHub:
- Myles Recny @mkrecny
- Ben Noordhuis @bnoordhuis
- Taylor Fausak @tfausak
- William Bowers @willurd
- Steve Gricci @sgricci
- Dave Eddy @bahamas10
- Mathias Bynens @mathiasbynens
- Rob McCann @unforeseen
- Scott Noel-Hemming @frogstarr78
- Kornel Lesiński @pornel
- Korvin Szanto @KorvinSzanto
- Jeff Lang @jeffplang
- Tom McKay @thomasmckay
- Justin Clift @justinclift
- Brynn Bateman @brynnb
- Dylen Rivera @dylenbrivera
- Mathieu Loiseau @lzbk
- Jason Culwell @Mawgamoth
- Bryan Biedenkapp @gatekeep
- Aaron Hill @Aaron1011
- Fredrik Svantes @speedis
- Sergey Krilov @sergkr