Bolo is a top-down game of tank warfare originally written by Stuart Cheshire for the BBC Micro and Apple Macintosh, and also notably rewritten for Windows and Linux by John Morrison.
This project is an attempted revitalization of the now-abandoned "Orona" project, which rewrote Bolo for play in modern browsers.
This is a browser-based implementation of Bolo. To play:
-
Build the client bundle:
npm run build
-
Start a local server (see "Running a Bolo server" below).
-
Open your browser and navigate to
http://localhost:8124/.
- Arrow Keys - Move tank
- Space - Fire
- R - Chat
- Mouse - Send little green man on missions, select items to harvest/build/deploy
- [Node.js] 14 or higher
- [git]
-
Clone the repository:
git clone http://github.com/davidangel/bolo.git cd bolo -
Install dependencies:
npm install
-
Copy and edit the configuration:
cp config.json.sample config.json # Edit config.json with your settings -
Build the client:
npm run build
-
Start the server:
npm run server
The server will start on port 8124 by default. Open http://localhost:8124/ in your browser to play.
The server reads its settings from config.json. In addition to the basic general.base, general.maxgames, and web.port values, the sample config includes two security-related options:
web.allowedOrigins- Allowed browser origins for WebSocket upgrades. Supports exact origins likehttp://localhost:8124, wildcard subdomains likehttps://*.example.com, or*if you intentionally want to allow any origin.web.rateLimit.create- Per-IP limit for requests to/create, configured withwindowMsandmaxRequests.web.rateLimit.websocket- Per-IP limit for WebSocket upgrade attempts, also configured withwindowMsandmaxRequests.
Rate limiting uses X-Forwarded-For when that header is present, otherwise it falls back to the socket remote address. If you run Bolo behind a reverse proxy or load balancer, make sure only trusted infrastructure can set X-Forwarded-For, or strip/rewrite that header at the edge so clients cannot spoof their source IPs.
Example:
{
"general": {
"base": "https://play.example.com",
"maxgames": 10,
"gameTimeout": 900
},
"web": {
"port": 8124,
"allowedOrigins": ["https://play.example.com", "https://*.example.com"],
"rateLimit": {
"create": { "windowMs": 60000, "maxRequests": 20 },
"websocket": { "windowMs": 60000, "maxRequests": 60 }
}
}
}Alternatively, run the server using Docker:
docker-compose up -dConfigure the server using environment variables:
PORT- Server port (default: 8124)BASE_URL- Public URL of the serverMAXGAMES- Maximum number of games (default: 5)ALLOWED_ORIGINS- Comma-separated origins allowed for WebSocket upgrades (default: same asBASE_URL)
The source code of Bolo/Orona is distributed with the GNU GPL version 2, as inherited from WinBolo. Much of the game logic was written with WinBolo as a reference, thus becoming a derived work of it. Though the GNU GPL version 2 is a fine license either way. You can find a copy of the license in the COPYING file.
Some files, or parts of files, are subject to other licenses, where indicated in the files themselves. A short overview of those parts follows.
All the graphic and sound files are from:
- Bolo, © 1993 Stuart Cheshire.
For the browser client, Bolo also bundles:
- [Sizzle], © 2010 The Dojo Foundation, licensed MIT, BSD and GPL.
- Components that are part of [Villain].