BrowserQuest is a HTML5/JavaScript multiplayer game experiment.
- Node.js 20.x LTS or later
- Modern web browser (Chrome, Firefox, Safari, or Edge)
- Python 3 (for serving client files) OR Node.js http-server package
npm installcp server/config_local.json-dist server/config_local.json
# Edit server/config_local.json if needed (default: localhost:8000)node server/js/main.jsYou should see:
{"level":30,"time":...,"msg":"Starting BrowserQuest game server..."}
{"level":30,"time":...,"msg":"Server is listening on port 8000"}
IMPORTANT: The client MUST be served via HTTP (not opened as file://) for WebSocket connections to work.
Option A - Python (simplest):
cd client
python -m http.server 8080Option B - Node.js http-server:
npm install -g http-server
cd client
http-server -p 8080Option C - Any HTTP server (nginx, Apache, etc.)
Open your browser and navigate to:
http://localhost:8080
Enter a username and click "Play" to start!
To test multiplayer functionality:
- Keep the first browser window open with a logged-in player
- Open a second browser window/tab
- Navigate to
http://localhost:8080 - Create a second character with a different username
- Both players should see each other and interact in real-time
Server won't start:
- Verify Node.js 20+ is installed:
node --version - Check that port 8000 is not already in use
- Ensure
npm installcompleted successfully
Client won't connect:
- Ensure the game server is running on port 8000
- Verify the client is served via HTTP (not file://)
- Check browser console (F12) for WebSocket connection errors
- Verify
client/config/config_local.jsonpoints to correct host/port
Assets not loading:
- Ensure HTTP server is running from the
client/directory - Check browser console for 404 errors
- Verify file permissions allow reading client files
Additional documentation is located in client and server directories.
Code is licensed under MPL 2.0. Content is licensed under CC-BY-SA 3.0. See the LICENSE file for details.
Created by Little Workshop:
- Franck Lecollinet - @whatthefranck
- Guillaume Lecollinet - @glecollinet