Skip to content

PlayingModes

jklap edited this page Apr 24, 2020 · 3 revisions

Playing modes

Contents

1. Hotseat
1. Moderator
1. Shared Directory
1. Autosave/load
    1.1 Procedure
    1.2 Details

Hotseat

You can use Rails to play an entire game while seated around one screen on which Rails is run. The playing value of this mode may be doubtful, but in any case this is the primary mode with which Rails is developed and tested. Moderator

A feature called "nomap mode" allows using Rails as a moderator for players around a table, using part of the physical game components. Tile and token lays are done on the board, and only any money shifted will be recorded into Rails. All other activities are entered normally, and so Rails fully accounts for the financial part of the game.

To start this mode.... to be completed

Moderator

To be completed

Shared Directory

This is any type of shared file system (Dropbox, Google Drive, WebDav, network share ala Samba, AFP, NFS).

The basic premise is simply saving your game file to this shared file system so that other players can open it directly.

Files are named reflecting the next players turn.

See Autosave/load below for additional details on how you can use a shared folder for near real-time play.

Autosave/load

This is a new feature that allows playing with Rails over the internet in near real-time mode. Game files are saved in a shared directory, as described above. In this mode, Rails will poll that shared directory when it is not your turn, and only give you control over the game when it is your turn.

(N.B. it has been requested to allow entering moves even if it's not your turn - this extension is under consideration)

Please note: this is an experimental feature, and it is not guaranteed to work in all cases and for all games. In particular, special "round" types like the 1856 CGR formation or the 18EU Final Minor Exchange Round can have problems.

Procedure

Each player will need to set their player name in their user Configuration profile (Options -> Configuration -> General -> Local Player). These names must match the player names entered during game setup.

Once the game has been created by a user (does not need to be the first player), the game should be saved to the shared directory. If the player that is creating the game is also the first player in the game they can make their first move before saving the game for the first time but this is not required.

All players should then enable the polling mode (File -> Auto Load/Save Game) and setting a polling interval. Note that some sync systems have a delay in the sync process and that setting this to a small interval may not improve turn changes.

Low-level Details

  1. Autosave/load is activated by checking a menu option. Steps 2 and 3 apply only if this option has been activated.

  2. Every time that an active player ends their turn, the following is done: 2a. A saved file is written to the default location (the first time the usual popup will ask for it) and with the usual filename: .rails. 2b. The name of this file is written into another file, named .last_rails. 2c. Rails goes into polling mode. When in polling mode most game actions are disabled.

  3. In polling mode, Rails regularly checks the .lrails file to check if a new game file has been writen. The interval is configurable (default 30 secs). If a new filename is found: 3a. This file is read and processed in the same way as Reload does it. 3b. Rails checks if the local player has the turn. If so, polling mode is suspended, and normal operation resumes. Otherwise, polling mode continues.

  4. When Rails is restarted for an ongoing game, the last saved file must be loaded manually. Autosave/load can only be activated after that. If the local player does not have the turn, Rails will enter polling mode at that point.

Notes:

  1. Normally, each game should use a separate directory. In theory it should be possible to run multiple games in one directory, if each game is given a unique at the first save action, but this is not recommended.
  2. Repeated reloading during polling mode ensures that actions by other players show up with a reasonable delay.
  3. It does not matter if a saved file is missed because the interval is longer than the time between two saves by other players. Each saved file contains the whole game history.