This wiki is archived and useful information is being migrated to the main bzflag.org website

Replay Server

From BZFlagWiki
Revision as of 09:31, 21 February 2007 by Ts (Talk | contribs) (Transform {{{".."}}} to " ..")

Jump to: navigation, search

"Replay" is a feature that allows admins to record a match to a circular buffer and optionally store a portion of the recording to a file.

Recording Setup

To prepare your server to allow recording to a file, make sure to specify -recdir /path/to/record/dir, make sure /path/to/record/dir is writeable by the same user that bzfs is running as. It may also be a good idea to limit the size of the record buffer (this is taken from RAM), and will also automatically start the record buffer with the specified size (in Megabytes). For instance -recbuf 16.

Replay Setup

Although you could restart your server in replay mode each time you'd like to playback a match, its recommeded that you run a seperate server on a seperate port as a replay server. Again, you must specify -recdir /path/to/record/dir, but for replay mode also specify the -replay command line option. If you want this to be a public server, consider using the -advertise option to advertise only to your admin group(s).

How to Record

If during the game, you see something you'd like to record, first you must be in a group with the RECORD priveledge. Use the /record save <filename> [seconds] command. [seconds] is how many seconds you'd like to go back into the buffer to save to disk. If this recording is for administrative purposes, it may be a good idea to use a descriptive name for the filename. Try using playername.offense.ipaddress. This will help others who view the file know who they should be watching during playback. If it is for a league match, try using team1name.vs.team2name.

How to Playback

Once you've made your recording, log into your playback server, and use the /replay list command, which will give you a directory listing of the directory you specified with -recdir. Once you see the file you'd like to lay back, take note of the filename, or the #index, then use the /replay load filename or /replay load #index to load the file. If you load a file that isn't compatible with the map currently loaded on the server, you'll get a message like this:

SERVER: An incompatible recording has been loaded
SERVER: Please rejoin or face the consequences (client crashes)

If you see this message, simply rejoin. If you don't your client will close/crash. If that happens, don't fret, just start it back up and it'll work fine. When you're ready to start do /replay play.

Command Reference

The instructions above will get you started, but there are many more commands that may prove useful. Below is an explination of each.

/record list

     List all files in the recordings directory 

/record start

     Start recording into the memory buffer 

/record stop

     Stop recording into the memory buffer 

/record size <megabytes>

     Set the size of the recording memory buffer 

/record rate <seconds>

     Set the time between game state updates stored in the recording. This will affect the granularity of the 'skips' you can do while replaying a file. It will also make the recording files bigger if it is set to a faster update rate. 

/record stats

     Display the statistics for the current recording (file or buffered) 

/record file <filename>

     Start recording directly to a file 

/record save <filename> [seconds]

     Save the recording buffer into a file. If seconds is specified, then only save that many previous seconds into the file. 

/replay list

     List all files in the recordings directory 

/replay load <filename|#index>

     Load the specified recording file by name, or by index (same indices as produced by the 'replay list' command) 

/replay loop

     Same as /replay play except recording will wrap at the end and play in a loop

/replay play

     Start playing the recording. This will oftentimes require that all players connected to the server rejoin (to reload the map, etc...) 

/replay skip [+/- seconds]

     If seconds is specified, then skip that amount of time in the recording. Otherwise, skip forwards until there is activity. 


Notes

One command that is not documented in game is the /replay pause command. When you use this, the recording appears to all go [nr] (not responding), to unpause, use the /replay play command.