BrowserQuest is a HTML5/JavaScript multiplayer game experiment.
It has two major parts:
- the server side, which runs using Node.js
- the client side, which runs in your browser
Getting the server up and running is pretty easy. You need to have the following installed:
- Node.js (most recent stable version)
- Cygwin
- Microsoft Windows SDK (I don't recall if this is actually required or not; you could try it without the SDK initially and install the SDK if the server does not set up).
Use Cygwin for the following commands - the windows command prompt does not take kindly to some of them.
Clone the git repo:
$ git clone git://github.com/DJOKKATAJA/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 it's working. There should not be any warnings or errors.
Using a browser, connect to: 127.0.0.1:8000
The BrowserQuest start page should appear, and the game should work.
Getting the backend server up and running is pretty easy. You need to have the following installed:
- Node.js (most recent version)
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 up, 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 is listening on port 8000
That means its working. There should not be any warnings or errors.
Open a new terminal.
First, set the "host" value in client/config/config_build.json-dist, then copy it to/client/config/config_build.json:
$ vi client/config/config_build.json-dist
$ cp client/config/config_build.json-dist client/config/config_build.json
The updated host value must be the IP address of the BrowserQuest Node.js server. For example:
{
"host": "100.200.300.400",
"port": 8000
}
Then do the same thing for client/config/config_local.json-dist, editing the host value, then copying it to client/config/config_local.json:
$ vi client/config/config_local.json-dist
$ cp client/config/config_local.json-dist client/config/config_local.json
Next, copy the "shared" directory from the root of the git repo, into the "client" directory:
$ cp -r shared client/
Install http-server to run the client:
$ npm install -g http-server
Run http-server from the client directory:
$ cd client
$ http-server
You should see: Starting up http-server, serving ./ on port: 8080 Hit CTRL-C to stop the server
No warning messages should be displayed.
Using a browser, connect to port 8000 of the IP address you entered above. The BrowserQuest start page should appear.
If you have the BrowserQuest Node.js server running when you do this, you should then be able to launch and play the game.
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:
- Franck Lecollinet - @whatthefranck
- Guillaume Lecollinet - @glecollinet
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