From: Erik V. <eri...@xs...> - 2011-07-06 14:38:10
|
Scott, To test Autosave/load you can run several Rails copies in parallel by specifying a different local user name for each process, with the command-line argument -Dlocal.player.name=<nameOfPlayer> If you want to keep the logs separate, you should add something like -Dlog4j.configuration=<path>/<nameOfPlayer>.properties For each player, you start with loading the same initial saved file, and then go to File|Autosave/load immediately. A popup is displayed, in which you must select "On". You can also change the polling interval to your liking (default 30 sec.). Press "OK". At the start of a game, let the first player do this first. Pressing "OK" automatically creates an initial saved file, which then must be loaded by the other players. Still, all players must use the menu and select "On". I copy the description below from an earlier email. I'll see if I can put this in the wiki. Please note, that this whole thing is still experimental. Several improvements are already foreseen, and it is known to break down on complex activities like the 1856 CGR formation or the 18EU Final Minor Exchange Round. So better try it with some simpler games first. Erik <Copied from an old post> 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 loses the 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: <prefix>_<timestamp>_<player>.rails. 2b. The name of this file is written into another (new) file, named <prefix>.last_rails. 2c. Rails goes into polling mode. (Ideally, all actions should be prohibited except Quit and perhaps some more). 3. In polling mode, Rails regularly reads the .last_rails file to check if the filename has changed. 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 player has got 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 <prefix> 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. Van: Scott Petersen [mailto:sc...@re...] Verzonden: woensdag 6 juli 2011 15:50 Aan: Development list for Rails: an 18xx game Onderwerp: Re: [Rails-devel] Refactored loading code On Wed, Jul 6, 2011 at 4:04 AM, Erik Vos <eri...@xs...> wrote: But, as I have not got any feedback yet on this new feature, its further development doesn't have a high priority for me right now. Erik, I never figured out how Autosave/load is supposed to work. What steps would I do to test it? I assume I could have two instances of Rails running on the same machine to try it. |
From: Scott P. <sc...@re...> - 2011-07-06 16:08:22
|
Thanks, Erik. I Autosave/load a quick try. A few comments: * Popup appears under the active window (why?) * Not evident enough whose turn it is (would it be possible to change the background color of the interface or something more noticeable like that when it is my turn? * I don't see the advantage of restricting player moves to the local player. When we play a live game online, often one player executes several SR actions when players are doing rote actions like floating new companies. * Any reason to restrict the polling interval to every 10 seconds? Could it be allowed to be done every second? * Why do the complex actions cause errors? Is it because player input is needed outside of the normal turns? If any player could enter commands for all players, would that fix it? For reference, I have played a few live games using Rails/Dropbox and it already flows pretty smoothly without the Autosave feature. We use voice chat. During the private auction and SRs, we typically have had one player enter commands and the others tell him what to do. Once we get to a complex decision or an OR, we have that player save it and "transfer control" to the active player. This speeds things up quite a bit over what I would assume the current version of Autosave/load. I think that removing the restriction on the active player would make this feature into something I would use on a regular basis. FYI, we managed to play a game of 18GA in about 2.5 hours, which is about a half hour faster than my experiences using the physical components. |
From: Erik V. <eri...@xs...> - 2011-07-06 19:00:41
|
Thanks for your feedback. That's exactly what I need. > * Popup appears under the active window (why?) It shouldn't, and I can't remember seeing that happening. I'm trying to get the active window always on top, no clue why that doesn't work for you. > * Not evident enough whose turn it is (would it be possible to change the background color of the interface or something more noticeable like that when it is my turn? I have also been thinking about ways to make that better stand out, such as displaying the current player name somewhere in a highlighted format (but where?). > * I don't see the advantage of restricting player moves to the local player. When we play a live game online, often one player executes several SR actions when players are doing rote actions like floating new companies. At least it shows who's turn it is.... It shouldn't be too difficult to make this restriction optional, but then the previous issue must be fixed first. Also, *all* instances must then be polling all the time, not just those that don't have the turn; not sure if that couldn't cause clashes. > * Any reason to restrict the polling interval to every 10 seconds? Could it be allowed to be done every second? That's pretty often... I suppose it could, but I don't know if file contention couldn't become a problem then. > * Why do the complex actions cause errors? Is it because player input is needed outside of the normal turns? If any player could enter commands for all players, would that fix it? I'm not sure, but your suggestion could well be (part of) the problem. These special actions are executed by special code, and I think not all of that already follows the rules yet. > For reference, I have played a few live games using Rails/Dropbox and it already flows pretty smoothly without the Autosave feature. We use voice chat. During the private auction and SRs, we typically have had one player enter commands and the others tell him what to do. Once we get to a complex decision or an OR, we have that player save it and "transfer control" to the active player. This speeds things up quite a bit over what I would assume the current version of Autosave/load. > I think that removing the restriction on the active player would make this feature into something I would use on a regular basis. OK, thanks for your input. I'll consider it. Erik. |