diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/docs/TODO | 15 | ||||
-rw-r--r-- | public/docs/architecture.html | 103 | ||||
-rw-r--r-- | public/docs/database.html | 206 | ||||
-rw-r--r-- | public/docs/index.html | 52 | ||||
-rw-r--r-- | public/docs/install.html | 82 | ||||
-rw-r--r-- | public/docs/module.html | 294 | ||||
-rw-r--r-- | public/docs/production.html | 143 | ||||
-rw-r--r-- | public/docs/style.css | 30 | ||||
-rw-r--r-- | public/docs/tips.html | 108 |
9 files changed, 1033 insertions, 0 deletions
diff --git a/public/docs/TODO b/public/docs/TODO new file mode 100644 index 0000000..3861872 --- /dev/null +++ b/public/docs/TODO @@ -0,0 +1,15 @@ +- getting started setting up the server +- basic architecture + database + server + join + play +- database overview and tools to export/import/examine data +- overview of module architecture (play vs rules) +- rules framework +- client framework +- tutorial module +- common library +- DSL example for events +- tips & tricks for preparing graphics +- using the fuzzer to find crashes diff --git a/public/docs/architecture.html b/public/docs/architecture.html new file mode 100644 index 0000000..9b0aada --- /dev/null +++ b/public/docs/architecture.html @@ -0,0 +1,103 @@ +<!doctype html> +<title>Architecture Overview</title> +<link rel="stylesheet" href="style.css"> +<body> +<article> + +<h1> +Architecture Overview +</h1> + +<p> +The basic architecture of Rally the Troops is a single server process storing all data in an sqlite database. +This server handles both HTTP requests for the "meta-site" and websocket requests for the rules when playing a game. + +<h2> +Meta-site +</h2> + +<p> +The meta-site consists of all the web pages showing the login, signup, active game lists, the create a game page, forum, etc. +These pages are all created using PUG templates in the "view" directory. +The "join" page is the most complicated, and also uses javascript and server sent events for live updates. + +<h2> +Database +</h2> + +<p> +See the <a href="database.html">database overview</a> for a brief introduction to the tables involved. + +<h2> +Client/Server +</h2> + +<p> +When playing a game, the browser (client) connects to the server with a web socket. +The query string indicates which game and role to connect to. + +<p> +The game state is stored in a JSON object. A redacted version of this game state is sent to the clients, which then update the game display in real time. +One part of the view object is a list of possible actions a player can take. +When a player clicks on a possible action, a message is sent to the server with this action. +The server then processes the action, updates the game state, and sends out a new view object to all the clients that are connected to the game. + +<p> +The client code for connecting to the server, sending actions, and managing the player list, game log, chat, and notes is shared between all modules. +The following files contain the code and styling for the client display: +<ul> +<li> +<a href="https://git.rally-the-troops.com/common/server/tree/public/fonts/fonts.css">public/fonts/fonts.css</a> +<li> +<a href="https://git.rally-the-troops.com/common/server/tree/public/common/client.css">public/common/client.css</a> +<li> +<a href="https://git.rally-the-troops.com/common/server/tree/public/common/client.js">public/common/client.js</a> +</ul> + +<h2> +Tools +</h2> + +<p> +The "tools" directory holds a number of other useful scripts for administrating the server and debugging modules. + +<dl> + +<dt> +<code>bash tools/export-game.sh <i>game_id</i> > <i>file.json</i></code> +<dd> +Export full game state to a JSON file. +<dt> +<code>node tools/import-game.js [title_id=<i>title</i>] <i>file.json</i></code> +<dd> +Import a game from an export JSON file. + +<dt> +<code>node tools/patchgame.js <i>game_id</i></code> +<dd> +Patch game state for one game (by replaying the action log). + +<dt> +<code>node tools/patchgame.js <i>title_id</i></code> +<dd> +Patch game state for all active games of one module. + +<dt> +<code>bash tools/undo.sh <i>game_id</i></code> +<dd> +Undo an action by removing the last entry in the replay log and running patchgame.js + +<!-- +<dt> +<code>bash tools/gencovers.sh</code> +<dd> +Generate cover images and thumbnails. Requires imagemagick. + +<dt> +<code>bash tools/showgame.sh <i>game_id</i></code> +<dd> +Print game state JSON object. + +--> + +</dl> diff --git a/public/docs/database.html b/public/docs/database.html new file mode 100644 index 0000000..f4ec4c2 --- /dev/null +++ b/public/docs/database.html @@ -0,0 +1,206 @@ +<!doctype html> +<title>Database Overview</title> +<link rel="stylesheet" href="style.css"> +<body> +<article> + +<h1> +Database Overview +</h1> + +<p> +The database uses the following schemas, somewhat simplified and redacted to highlight the important bits. + +<h2>Users</h2> + +<p> +The user table is pretty simple, it just holds the user account information. +Passwords are hashed and salted with SHA-256. + +<pre> +create table users ( + user_id integer primary key, + name text unique collate nocase, + mail text unique collate nocase, + notify integer, -- email notifications + password text, -- hashed & salted + salt text +); +</pre> + +<p> +The login session cookie is a 48-bit random number. + +<pre> +create table logins ( + sid integer primary key, + user_id integer, + expires real -- julianday +); +</pre> + +<p> +Webhook notification settings are kept in the webhooks table. +The error column keeps any error message such as timeouts or HTTP failure statuses. +It is null if the hook is operational. + +<pre> +create table webhooks ( + user_id integer primary key, + url text, + format text, + prefix text, + error text +); +</pre> + +<p> +The contact list keeps track of friends (positive relation) and blacklisted users (negative relation). + +<pre> +create table contacts ( + me integer, + you integer, + relation integer, + primary key (me, you) +); +</pre> + + +<h2>Modules</h2> + +<p> +The game modules to load are registered in the titles table. The title_id must match the directory name for the module. + +<pre> +create table titles ( + title_id text primary key, + title_name text, + bgg integer, + is_symmetric boolean +); +</pre> + +<h2>Games</h2> + +<p> +Each game session uses a handful of tables. +The main table holds the status (open/active/finished), setup information (scenario, options), whose turn it is (active), and the final result. + +<pre> +create table games ( + game_id integer primary key, + status integer, + + title_id text, + scenario text, + options text, + + player_count integer, + join_count integer, + invite_count integer, + user_count integer, + + owner_id integer, + notice text, + pace integer, + is_private boolean, + is_random boolean, + is_match boolean, + + ctime datetime, + mtime datetime, + moves integer, + active text, + result text, + + is_opposed boolean generated as ( user_count = join_count and join_count > 1 ), + is_ready boolean generated as ( player_count = join_count and invite_count = 0 ) +); +</pre> + +<p> +The players table connects users to the games they play. + +<pre> +create table players ( + game_id integer, + role text, + user_id integer, + is_invite integer, + primary key (game_id, role) +); +</pre> + +<p> +The game state is represented by a JSON blob. + +<pre> +create table game_state ( + game_id integer primary key, + state text +); +</pre> + +<p> +Each action taken in stored in the game_replay log. This is primarily used for +the detailed "Sherlock" replay view, but is also used to patch running games when +fixing bugs. + +<pre> +create table game_replay ( + game_id integer, + replay_id integer, + role text, + action text, + arguments json, + primary key (game_id, replay_id) +); +</pre> + +<p> +Whenever who is active changes, we take a snapshot of the game state +so we can provide the coarse turn-by-turn rewind view that is available when +playing. This table is also used when rewinding games. The replay_id syncs each +snapshot with the corresponding action in the game_replay table. + +<pre> +create table game_snap ( + game_id integer, + snap_id integer, + replay_id integer, + state text, + primary key (game_id, snap_id) +); +</pre> + +<p> +Game chat is kept in another table, and there's also a table to track whether a +user has any unread in-game chat messages. + +<pre> +create table game_chat ( + game_id integer, + chat_id integer, + user_id integer, + time datetime, + message text, + primary key (game_id, chat_id) +); + +create table unread_chats ( + user_id integer, + game_id integer, + primary key (user_id, game_id) +); +</pre> + +<h2>Other tables</h2> + +<p> +There are several other tables to deal with password reset tokens, email +notifications, messages, and the forum. + +See the full +<a href="https://git.rally-the-troops.com/common/server/tree/schema.sql">schema.sql</a> +for more details on these. diff --git a/public/docs/index.html b/public/docs/index.html new file mode 100644 index 0000000..87dd954 --- /dev/null +++ b/public/docs/index.html @@ -0,0 +1,52 @@ +<!doctype html> +<title>Documentation</title> +<link rel="stylesheet" href="style.css"> +<body> +<article> + +<h1> +Documentation +</h1> + +<p> +This is the documentation for the <i>Rally the Troops</i> software and website. +Here you will find information both about how to configure and run your own +server instance and how to create new modules. + +<h2>For players</h2> + +<ul> +<li><a href="tips.html">Tips & tricks.</a> +</ul> + +<h2>For developers</h2> + +<p> +Before you start to develop a module, you will need to run a local instance of the server. + +<ul> +<li><a href="install.html">Installing the server.</a> +<li><a href="production.html">Running a public server.</a> +</ul> + +<h2>System overview</h2> + +<ul> +<li><a href="architecture.html">Server architecture</a> +<li><a href="database.html">Database schema</a> +<li><a href="module.html">Module architecture</a> +</ul> + +<!-- +<h2>Module implementation guides</h2> + +<ul> +<li><a href="tutorial.html">How to create a module.</a> +<li><a href="rules.html">How to write good rules</a> +<li><a href="client.html">How to write a good client</a> +<li><a href="utils.html">The javascript utility library</a> +<li><a href="events.html">Implementing events using a mini-language</a> +<li><a href="graphics.html">Preparing map, card, and component graphics</a> +<li><a href="fuzzer.html">Using the fuzzer to stress test your rules</a> +</ul> +--> diff --git a/public/docs/install.html b/public/docs/install.html new file mode 100644 index 0000000..a448db8 --- /dev/null +++ b/public/docs/install.html @@ -0,0 +1,82 @@ +<!doctype html> +<title>RTT: Getting Started</title> +<link rel="stylesheet" href="style.css"> +<body> +<article> + +<h1> +Getting Started +</h1> + +<p> +The <i>Rally the Troops</i> software is very simple and has minimal dependencies. +All the data is stored in a single SQLite3 database. +The server runs in a single Node process using the Express.js framework. + +<p> +To run an RTT server instance, you will need +the <a href="https://www.sqlite.org/index.html">sqlite3</a> command line tool +and +<a href="https://nodejs.org/en">Node</a>. + +<h2> +Install the server +</h2> + +<p> +Check out the server repository. + +<pre> +git clone https://git.rally-the-troops.com/common/server +</pre> + +<p> +In the cloned server directory, install the NPM dependencies: + +<pre> +npm install +</pre> + +<p> +Initialize the database: + +<pre> +sqlite3 db < schema.sql +</pre> + +<h2> +Install the modules +</h2> + +<p> +Game modules are found in the "public" directory. +They also need to be registered in the database. + +<p> +Check out a game module: + +<pre> +git clone https://git.rally-the-troops.com/modules/field-cloth-gold public/field-cloth-gold +</pre> + +<p> +Register it in the database: + +<pre> +sqlite3 db < public/field-cloth-gold/title.sql +</pre> + +<h2> +Start the server +</h2> + +<pre> +node server.js +</pre> + +<p> +Open the browser to <a href="http://localhost:8080/">http://localhost:8080/</a> and create an account. + +<p> +The first account created will have administrator privileges. + diff --git a/public/docs/module.html b/public/docs/module.html new file mode 100644 index 0000000..d392b3e --- /dev/null +++ b/public/docs/module.html @@ -0,0 +1,294 @@ +<!doctype html> +<title>Module Overview</title> +<link rel="stylesheet" href="style.css"> +<body> +<article> + +<h1> +Module Overview +</h1> + +<p> +A module consists of a directory containing certain mandatory files which are loaded by the server. +All the other resources needed for a module are also put in this directory. +Note that all of the files in the module will be available on the web. + +<p> +The module must be put in the server "public" directory, matching the name of title_id. +If our example game has the title "My Example Module" and a title_id of "example", +the module directory should be "public/example/". + +<h2> +Metadata +</h2> + +<p> +Each module needs to be registered in the database so that the system can find it. +To do this we usually create a title.sql file that you will run to register the module. + +<pre> +insert or replace into titles + ( title_id, title_name, bgg ) +values + ( 'example', 'Example', 123 ) +; +</pre> + +<p> +The bgg column should have the <a href="httsp://www.boardgamegeek.com/">boardgamegeek.com</a> game id. + +<p> +After creating this file, source it into the database and restart the server program. + +<pre> +$ sqlite3 db < public/example/title.sql +</pre> + +<h2> +Cover image +</h2> + +<p> +Each game needs a cover image! Create a file containing the high resolution cover image named cover.png or cover.jpg. After you have created or modified the cover image, run the following script to generate the small cover images and thumbnails that the site uses. + +<pre> +$ bash tools/gencovers.sh +</pre> + +<p> +<i>This script requires ImageMagick (convert), netpbm (pngtopnm), and libjpeg (cjpeg) tools to be installed.</i> + +<h2> +About text +</h2> + +<p> +The game landing page on the server has a bit of text introducing the game, and links to rules and other reference material. + +<p>Put the about text in the about.html file. + +<xmp><p> +Dolorum fugiat dolor temporibus. Debitis ea non illo sed debitis cupiditate +ipsum illo. Eos eos molestias illo quisquam dicta. + +<ul> +<li> <a href="info/rules.html">Rules</a> +</ul> +</xmp> + +<h2> +Create game options +</h2> + +<p> +When creating a game, the scenarios and common options are handled by the system. +However, if your game uses custom options these need to be added as form fields. + +<p> +Add a create.html file to inject form fields into the create game page. + +<xmp><p> +Player count: +<br> +<select name="players"> + <option value="2">2 Player</option> + <option value="3">3 Player</option> + <option value="4">4 Player</option> +</select> + +<p> +<label> + <input type="checkbox" value="true" name="house_rule"> + House rule +</label> +</xmp> + +<p> +This file may be empty if your game doesn't have any custom options. + +<h2> +Client HTML +</h2> + +<p> +The game needs a play.html file using the following template: + +<xmp><!doctype html> +<html lang="en"> +<head> + <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, interactive-widget=resizes-content, viewport-fit=cover"> + <meta name="theme-color" content="#444"> + <meta charset="UTF-8"> + <title> + GAME TITLE + </title> + <link rel="icon" href="favicon.svg"> + <link rel="stylesheet" href="/fonts/fonts.css"> + <link rel="stylesheet" href="/common/client.css"> + <script defer src="/common/client.js"></script> + <script defer src="play.js"></script> + <style> + GAME STYLES + </style> +</head> +<body> + +<header> + <div id="toolbar"> + <details> + <summary><img src="/images/cog.svg"></summary> + <menu> + <li><a href="info/rules.html" target="_blank">Rules</a> + <li class="separator"> + </menu> + </details> + </div> +</header> + +<aside> + <div id="roles"></div> + <div id="log"></div> +</aside> + +<main data-min-zoom="0.5" data-max-zoom="2.0"> + GAME AREA +</main> + +<footer id="status"></footer> + +</body> +</xmp> + +<h2> View Program </h2> + +<p> +As you saw above, the client page references a play.js script which should +contain the code for updating the game. This script must provide a couple of +functions that are called by the common client code whenever the game state +changes. + +<h3>The view object</h3> + +<p> +TODO + +<h3>Framework globals</h3> + +<p> +These global variables are provided by the framework for use with your code. + +<dl> + +<dt>var player +<dd>This variable holds the name of the current role the player has in this browser window. +The value may change if the client is in replay mode. + +<dt>var view +<dd>This object contains the view for the role as returned by the rules view method. + +</dl> + +<h3>Framework functions</h3> + +<p> +These functions are provided to your client code to build the game interface and communicate with the server. + +<dl> + +<dt>function send_action(verb, noun) +<dd>Call this when player performs an action (such as clicking on a piece). +If the action is not in the legal list of actions in the view object, +this function does nothing and returns false. Returns true if the action +is legal. + +<dt>function action_button(verb, label) +<dd>Show a push button in the top bar for a simple action (if the action is legal). + +<dt>function action_button_with_argument(verb, noun, label) +<dd>Show a push button in the top bar for an action taking a specific argument (if the action with the argument is legal). + + +<dt>function confirm_send_action(verb, noun, question) +<dd>Same as send_action but pop up a confirmation dialog first. + +<dt>function confirm_action_button(verb, label, question) +<dd>Same as action_button but pop up a confirmation dialog first. + +<dt>function send_query(what) +<dd>Send a "query" message to the rules. The result will be passed to on_reply. + +</dl> + +<h3>function on_update()</h3> + +<p> +This function is called whenever the "view" object has updated. +It should update the visible game representation and highlight possible actions. + +<p> +The client code has already updated the prompt message and log when this is called. + +<p> +The view.actions object contains the list of legal actions to present. + +<h3>function on_log(text)</h3> + +<p> +Optional function to implement custom HTML formatting of log messages. +If present, this function must return an HTML element representing the given text. + +<h3>function on_reply(what, response)</h3> + +<p> +This function is invoked with the result of send_query. +The what parameter matches the argument to send_query and is used to identify different queries. + +<p>See rommel-in-the-desert and wilderness-war for examples of using the query mechanism. + +<h2> Rules Program </h2> + +<h3> The game object </h3> + +<p> +TODO... + +<h3> exports.scenarios </h3> + +<p> +A list of scenarios! If there are no scenarios, it should be a list with one element "Standard". + +<h3> exports.roles = function (scenario, options) </h3> + +<p> +Either a list of roles, or a function returning a list of roles. + +<h3> exports.setup = function (seed, scenario, options) </h3> + +<p> +Create the initial game object with a random number seed, scenario, and options object. + +<p> +The options object is filled in with values from the create.html form fields. + +<h3> exports.view = function (game, player) </h3> + +<p> +Given a game object, a player role, return the view object that is used by the client to display the game state. +This should contain game state known to the player. + +<p> +TODO: prompt + +<p> +TODO: actions + +<h3> exports.action = function (game, player, verb, noun) </h3> + +<p> +Perform an action taken by a player. Return a game object representing the new state. It's okay to mutate the input game object. + +<h3> exports.query = function (game, player, what) </h3> + +<p> +A custom query for information that is normally not presented. +For example showing a supply line overview, or a list of cards in a discard pile. diff --git a/public/docs/production.html b/public/docs/production.html new file mode 100644 index 0000000..abb0b7c --- /dev/null +++ b/public/docs/production.html @@ -0,0 +1,143 @@ +<!doctype html> +<title>Public Server</title> +<link rel="stylesheet" href="style.css"> +<body> +<article> + +<h1> +Running a public server +</h1> + +<p> +To let other people connect to your server and play games, there are a few other things you will need to set up. + +<h2> +Recovering from a crash +</h2> + +<p> +Use <tt>nodemon</tt> to restart the server if it crashes. +This also restarts the server if the software is updated. + +<pre> +nodemon server.js +</pre> + +<h2> +Database & Backups +</h2> + +<p> +For best performance, you should turn on WAL mode on the database. + +<pre> +sqlite3 db "pragma journal_mode = wal" +</pre> + +<p> +You will want to backup your database periodically. This is easy to do with a single sqlite command. +Schedule the following command using cron or something similar, and make sure to copy the resulting +backup database to another machine! + +<pre> +sqlite3 db "vacuum into strftime('backup-%Y%m%d-%H%M.db')" +</pre> + +<h2> +Customize settings +</h2> + +<p> +The server reads its settings from the .env file. + +<pre> +NODE_ENV=production + +SITE_NAME=Example +SITE_URL=https://example.com +SITE_IMPRINT="This website is operated by ..." + +HTTP_HOST=localhost +HTTP_PORT=8080 + +# Enable mail notifications +MAIL_FROM=Example Notifications <notifications@example.com> +MAIL_HOST=localhost +MAIL_PORT=25 + +# Enable webhooks +WEBHOOKS=1 + +# Enable forum +FORUM=1 +</pre> + +<h2> +Expose the server to the internet +</h2> + +<p> +For simplicity, the server only talks plain HTTP on localhost. +To expose the server to your LAN and/or WAN, either listen to 0.0.0.0 or use a reverse proxy server such as Nginx. +To use SSL (HTTPS) you need a reverse proxy server. + +<p> +Here is an example Nginx configuration: + +<pre> +server { + listen 80; + server_name example.com www.example.com; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name example.com www.example.com; + ssl_certificate /path/to/ssl/certificate/fullchain.cer; + ssl_certificate_key /path/to/ssl/certificate/example.com.key; + root /path/to/server/public; + location / { + try_files $uri @rally; + } + location @rally { + proxy_pass http://127.0.0.1:8080; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_read_timeout 86400s; + proxy_send_timeout 86400s; + } +} +</pre> + +<h2> +Archive +</h2> + +<p> +Storing all the games ever played requires a lot of space. To keep the size of +the main database down, you can delete and/or archive finished games periodically. + +<p> +You can copy the game state and replay data for finished games to a separate archive database. +Below are the tools to archive (and restore) the game state data. +Run the archive and purge scripts as part of the backup cron job. + +<dl> +<dt> +<code>sqlite3 tools/archive.sql</code> +<dd> +Copy game state data of finished games into archive database. +<dt> +<code>sqlite3 tools/purge.sql</code> +<dd> +Delete game state data of finished games over a certain age. +<dt> +<code>bash tools/unarchive.sh <i>game_id</i></code> +<dd> +Restore archived game state. +</dl> + diff --git a/public/docs/style.css b/public/docs/style.css new file mode 100644 index 0000000..a7bc776 --- /dev/null +++ b/public/docs/style.css @@ -0,0 +1,30 @@ +html { background-color: white; color: black; } +xmp, pre { background-color: #fafafa; } +xmp, pre { border: 1px solid gray; } +h1, h2, h3 { color: brown; } + +xmp, pre { white-space: pre-wrap; } + +html { margin: 0; padding: 0; line-height: 1.5; } +body { padding: 1rem 2rem; margin: 0 auto; max-width: 45rem; } +xmp, pre { min-width: fit-content; } +h1, h2, h3 { margin: 2rem 0 1rem 0; padding: 0; font-weight: normal; font-family: sans-serif; } +h1 { font-size: 1.8rem; } +h2 { font-size: 1.4rem; } +h3 { font-size: 1.2rem; } +p, ul, ol, dl, figure, blockquote, xmp, pre, table { margin: 1rem 0; font-size: 1rem; } +xmp, pre { font-size: 0.8rem; padding: 1rem 1rem; } +tt, code, kbd { font-size: 0.8rem; } +kbd { background-color: whitesmoke; padding: 0px 4px; border: 1px solid #444; } +dd { margin-bottom: 0.5rem; } + +hr { margin: 2rem 0; border: none; border-top: 2px dotted brown; } + +article::after { + display: block; + margin: 2rem 0; + color: brown; + font-size: 1.8rem; + text-align: center; + content: "\2766"; +} diff --git a/public/docs/tips.html b/public/docs/tips.html new file mode 100644 index 0000000..1faa5eb --- /dev/null +++ b/public/docs/tips.html @@ -0,0 +1,108 @@ +<!doctype html> +<title>Tips & Tricks</title> +<link rel="stylesheet" href="style.css"> +<style> +img { height: 18px; vertical-align: -3px; } +</style> +<body> +<article> + +<h1> +Tips & Tricks +</h1> + +<p> + +<h2> Shortcuts </h2> + +<p> +There are several ways to scroll without the scroll bars: + +<ul> +<li> The <kbd>←</kbd> <kbd>↑</kbd> <kbd>↓</kbd> <kbd>→</kbd> keys. +<li> <kbd>Shift</kbd> + <kbd>mouse wheel</kbd> to scroll horizontally. +<li> Hold down the middle mouse button and drag. +<li> Two finger scrolling with the touch pad. +<li> Tap and drag using a touch screen. +</ul> + +<p> +There are also several ways to change the size of the game area: + +<ul> +<li> <kbd>Control</kbd> + <kbd>+</kbd> to zoom in. +<li> <kbd>Control</kbd> + <kbd>-</kbd> to zoom out. +<li> <kbd>Control</kbd> + <kbd>0</kbd> to reset zoom. +<li> <kbd>Control</kbd> + <kbd>mouse wheel</kbd> to zoom in and out. +<li> Pinch gesture with a touchpad. +<li> Pinch gesture on a touch screen. +</ul> + +<p> +Hold down the <kbd>Shift</kbd> key to see more information. +In some games cards and chits will be magnified when mousing over them when holding shift. +Other games may reveal the reverse side of pieces. + +<p> +Open a separate browser tab or window for each side when playing solo. + + +<h2> Toolbar </h2> + +<p> +The <img src="/images/cog.svg"> menu has links to rules, player aids and other reference material. +In some games you can also choose between alternative graphics and layout options. +The resign option is also present here if available. + +<p> +The <img src="/images/scroll-quill.svg"> button toggles the game log and player status displays. + +<p> +The <img src="/images/magnifying-glass.svg"> button shrinks the map to fit your screen. + +<p> +The <img src="/images/chat-bubble.svg"> button lights up if you have unread chat messages. +Chat messages can only be seen by players who have joined the game. +Use <kbd>Enter</kbd> and <kbd>Escape</kbd> to quickly open and close the chat box. + +<p> +The <img src="/images/cycle.svg"> button appears when the game is over. +Use this to quickly start a rematch with the same players. + +<p> +The <img src="/images/earth-africa-europe.svg"> button hides all counters and markers. +Use this if you need to check something on the map that is obscured. +</ul> + + +<h2> Time Control +</h2> + +<p> +For everyone's enjoyment, please respect the pace requests! +If someone wants a fast game, don't join if you can only play one move per day. + +<dl> +<dt> Live +<dd> +Let your opponents know if you're going away! +If you need to resume the game another day, arrange a time when you can all continue, +or agree to continue playing at a different pace. + +<dt> Fast +<dd> +Turn on notifications so you can take your turns promptly. +If you see that your opponent is online (the dot next to their name is filled in) +then stay in the game for a while and perhaps you can play live for a bit. + +<dt> Slow +<dd> +If you create a game and know you can not play more than one move per day, +please pick this option to set the appropriate expectations. + +<dt> Any +<dd> +Anything goes. Read the game notice and adapt! + +</dl> + |