• C 75.9%
  • HTML 8.8%
  • C++ 6.9%
  • JavaScript 6.6%
  • Python 1.4%
  • Other 0.4%
Find a file
2026-02-26 07:12:40 -08:00
binaries Fixing seeded bug in CEv151 binary 2026-02-23 22:13:33 -08:00
brogue Adding brogue+ and printing versions in seed display 2021-04-27 07:27:50 +01:00
brogue-1.7.5 Revert "Record on death & moving victory notify earlier" 2022-10-01 10:12:53 +01:00
brogueplus Revert "Record on death & moving victory notify earlier" 2022-10-01 10:12:53 +01:00
build Turns out my build provisioning for vagrant didn't quite work. It has been updated to be better. 2015-03-05 19:33:17 -06:00
client Removing old versions 2026-02-26 07:12:40 -08:00
config/nginx Adding an example nginx config 2015-10-10 16:12:14 +01:00
doc Adding documentation about datagram backlog 2016-05-28 10:59:26 +01:00
game-data Succesfully spawned the child process in the logged in user's own directory - hooray. 2014-12-20 17:01:10 -06:00
gbrogue Adding brogueCE v1.14 2024-08-11 07:23:00 +01:00
research Using modern cmd line args in recording runner 2020-11-03 21:02:21 +00:00
scripts Adding tests for game API sorting and updating news deps 2021-12-21 07:00:24 +00:00
server Updating CEv1.51 2026-02-15 11:44:21 -08:00
unBrogue Revert "Record on death for unbrogue" 2022-10-01 10:12:56 +01:00
.gitignore Exclude the compiled binary from the repository. Though maybe we should keep it when we are done changing things for awhile 2015-01-14 16:35:26 -06:00
LICENSE Initial commit 2014-11-05 19:55:48 -06:00
licensing.txt Clarifying licensing 2020-01-07 07:17:30 +00:00
README.md Adding variant cmdline args for RB v1.5 2023-10-09 08:59:49 +01:00

Web Brogue

A web[sockets] server for playing the Brogue over the internet. Brogue is a game for Mac OS X, Windows, and Linux by Brian Walker. For more information go https://sites.google.com/site/broguegame/. The server only can be run on a POSIX environment at the moment.

Build Instructions

Step 1: Get Dependencies

Get the latest stable version of node.js and mongoDB. (Or whatever mongoDB comes with your distro which should be fine.)

Step 2: Get node packages

Navigate to the server directory and run npm install to get the node dependencies. You'll need a C++ compiler to compile the datagrams module.

Step 3: Build Brogue Executables

The paths to the binaries is stored in server/config.js. Brogue binaries are stored in the binaries/ directory. Linux ELF binaries are included in the distribution for all supported brogue versions. If there's a new version of a brogue variant, or a replay-breaking change is added to a brogue version without changing the version, create a new variant and add a new brogue binary. This allows old recordings to still work. (Note that a new variant means separate high scores for now.)

The lineage of each brogue version and build instructions is given below. You shouldn't need to follow these unless you're building for a different platform.

  • Brogue (1.7.4): cd brogue make web
  • Brogue (1.7.5): cd brogue-1.7.5 make web
  • gBrogue: cd gbrogue make -f Makefile.linux web
  • unBrogue: cd unBrogue make web
  • broguePlus: cd brogueplus make web
  • Brogue CE (1.8): Clone https://github.com/flend/BrogueCE and checkout branch tracking/web-brogue. make bin/brogue then copy binary to binaries/brogue-ce18
  • Brogue CE (1.9): Clone https://github.com/flend/BrogueCE and checkout branch tracking/web-brogue-v193. make bin/brogue then copy binary to binaries/brogue-ce19-c813284 (or similar filename)
  • Brogue CE (1.10): Clone https://github.com/flend/BrogueCE and checkout branch tracking/web-brogue-v110. make bin/brogue then copy binary to binaries/brogue-ce110 (or similar filename)
  • Brogue CE (1.11+): Clone https://github.com/flend/BrogueCE and checkout branch tracking/web-brogue-v1XX. make bin/brogue then copy binary to binaries/brogue-ce111 (or similar filename). This binary also includes RapidBrogue from v1.5+
  • Rapid Brogue (v1.4 and earlier): Clone https://github.com/flend/rapidbrogue and checkout branch tracking/rapid-brogue-vXXX. make bin/brogue then copy binary to binaries/rapid-brogue-vXXX (or similar filename)

Starting the Server

Starting the server should be as simple as starting up mongoDB and starting the node process.

  1. To start the mongodb daemon type mongod (this should be started at system init in most cases)
  2. To start the server type npm start in the server directory.

You will probably want to edit server/config.js and client/config.js to set the ports and the server secret.

If everything is running correctly it should say "Server listening on port XXXX"

Note that you might need root access if you are running on a privileged port (e.g. 80).

Configuration

Server global configuration variables are defined in server/config.js. Client configuration variables are defined in client/config.js.

In particular, make sure to get the client and server to agree on the websocketPort.

Restarting the server

When you restart (kill and run again) the server to start running a new version, games in progress are not affected. However, the server will forget about its registry of games that it uses to kill inactive games from over 2 weeks ago. Therefore you probably want to kill old games. A good command is killall --older-than 1M -r ".*brogue.*" which kills all brogue process started more than 1 month ago.

Tests

An API test suite can be run using npm test in the server directory.