Skip to content

lomky/terraforming-mars

 
 

Repository files navigation

terraforming-mars

Terraforming Mars Board Game

The board game is great and this repository highly recommends purchasing it for personal use. If you want to play with people online, you can use this web app.

Join us on Discord here.

Demo

You can demo this web app online here. If you find a bug or have a feature request, please add it as one in issues tab. If you plan on playing long-running games, it is recommended that you host the game locally. This demo site is currently not stable and gets restarted during each push to master. A multiplayer game will remain available for 10 days, after which it will be flushed from the database. Unfinished solo games are flushed after one day. As this repository is gaining in popularity, we will attempt to make this demo page stable but cannot guarantee that your game will not be lost. It is highly recommended to host the game locally, and it's dead simple: run npm install and then npm run start.

Running

You can run the game server locally if you have npm and node. To start the game server run the start script.

npm install
npm run build
npm run start

This will start the game server listening on the default port of 8080. If you then point a web browser to http://localhost:8080 you will be on the create game screen. To change this port from 8080, add PORT=<new port> in your .env file.

Pointing your web browser to http://localhost:8080/games-overview?serverId=_SERVER-ID_ will provide a list of all games available on the server. The secret SERVER-ID is available from the console after starting the server and required to access game administration pages like the games overview.

Local Setup

Additional information on how to setup the game server locally can be found here (short version) and here (detailed version).

dotenv

A .env file allows you to store environmental variables like PORT=443. The following are supported and are optional:

  • PORT: (default 8080) Which port to use for this server
  • HOST: What hostname to use
  • CERT_PATH: Your TLS certificate path (=> fullchain.pem created by certbot)
  • KEY_PATH: Your TLS private key path (=> privkey.pem created by certbot)
  • MAX_GAME_DAYS: How many days to keep unfinished games before deleting them
  • WAITING_FOR_TIMEOUT: (default 5000) How many milliseconds to check for game update on multi-player games
  • ASSET_CACHE_MAX_AGE: (default 0) How many seconds should assets (fonts, stylesheets, images) be cached by browsers

Deployment

If you are looking for a dead simple deployment, use Heroku, instructions are are on the wiki. For Docker, read below.

Docker

Additional information on how to setup the game with Docker can be found here.

HTTPS

To set up an HTTPS sub/domain for use with this project, set the paths for KEY_PATH and CERT_PATH in your .env. If you do not have a TLS cert/key for your domain, you can get one for free from certbot.

✨ Contributors ✨

Thanks goes to these wonderful people:


Brian Folts
All the things

Vincent Moreau
Venus, Prelude, Hellas & Elysium, Colonies, Turmoil

alrusdi
Front End

Simeon Simeonov
UX, cards and Colonies design

Pierre Hilbert
Turmoil and helps with the things

nwai90
Helps with the things

Pocc
He did that one thing one time

Robert Konigsberg
Ares expansion!!!!!

LICENSE

GPLv3

About

Terraforming Mars Boardgame

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.8%
  • Less 6.6%
  • Other 0.6%