Title    : Quake2 Relay
Filename : relay02.zip
Version  : 0.2 beta
Date     : Dec. 5, 1999
Author   : Conor 'TheKoron' Davis
Email    : cedavis@epid.org
Webpage  : http://www.planetquake.com/relay/

Legal
-----
Quake2 Relay is Copyright (C) 1999 by Conor 'TheKoron' Davis

Quake2 Relay is based on the Quake2 3.20 source, and is subject to the
the Id Software license agreement in id_license.txt. All non-Id code
is distributed under the GNU General Public License. See the file
Copying for details.

Intro
-----
Have you ever wanted more from a Quake2 demo? Tired of making every
player record demos of your clan matches just to see everything? Now
your problems are over (well not all, but..). With Quake2 Relay, you
can record entire matches and play them back through the Replay
module. Unlike client demos, which only record a match through one
player's view, relay demos can record everything in the level for the
entire duration of the match. With Replay, you can watch these matches
through any player's perspective, chase-cam mode, or free-fly mode.

Benefits of Relay/Replay:
- Every player's perspective is recorded
- No lag
- Smaller and easier than many separate demos
- Many different viewing options

Installation
----------
Unzip the archive into the quake2 directroy. It will create a release
directory and a proxy subdirectory. Your Quake2 tree should
look like this:
Quake2/
Quake2/release/gamex86.dll
Quake2/release/readme.txt
Quake2/proxy/relay/gamex86.dll
Quake2/proxy/replay/gamex86.dll

Relay
=====
The Relay component is used to record a match. It must be run on the server.

To use Relay, start quake2 from the command line:
quake2 +set proxy relay +set demofile <demofile> +set game <game>
or type the commands from in the console.

The Relay module will start recording when a level is loaded and stop
recording when the level is over.

Relay will record to path <basedir>/<gamedir>/demos/<demofile>.rla

If the demofile console variable is not set or is empty, Relay will
not try to record a demo.

The demofile console variable can have escape codes, which will be
replaced by whateever they represent when recording starts:
%A - Full weekday name
%a - Abbreviated weekday name (3 letters)
%B - Full month name
%b - Abbreviated month name (3 letters)
%d - Day of month (01 - 31)
%F - Map title
%f - Map filename
%H - Hour in 24-hour format (00 - 23)
%h - Hour in 12-hour format (01 - 12)
%j - Day of year (001 - 366)
%M - Minute (00 - 59)
%m - Month of year (01 - 12)
%S - Second (00 - 59)
%W - Week of year, with Monday as first day of week (00 - 51)
%w - Weekday, with Sunday as first day of week (0 - 6)
%Y - 4-digit year
%y - 2-digit year

Example:
If you set the demofile console variable to "%f.%d%b%Y.%H.%S.rla",
Relay might store the file as:
quake2/baseq2/demos/base1.05Dec1999.11.04.rla

Replay
======
The Replay component is used to playback a match recorded with Relay.

To use Replay, start quake2 from the command line:
quake2 +set proxy replay +set demofile <demofile> +set game <game>, 
where <demofile> is the filename of the file you recorded to with
Relay, and <game> is the same game you used to record.

Then load the same level used to record the demo. If you load
the wrong level, Replay will restart the server with the correct
level.

While viewing the demo, pushing number keys 1-9 will track player 1-9,
respectively. Pressing 0 will stop tracking any player and revert to
freefly mode.

Pressing TAB will bring up the menu which lets you view information
about the demo, switch players to track, and change tracking options.

When watching a demo through a player's eyes, you will still see the
player's model. This is a limitation of quake2.exe and cannot be fixed
without making the model invisible to everyone.

How It Works
------------
Relay is a proxy module, also called a transparent dll. When you start
Quake2, it looks in the release directory for a module to load before
the game directory. The module there is responsible for loading other
proxy modules in a chain as specified by the proxy cvar. For example,
if the proxy cvar is set to "relay", the proxy loader will load the
Relay proxy, which will then load the regular game module. The Relay
module intercepts various calls between the game module and the quake2
executable, which it then uses to record the locations of all the
entities and info for all the players.


Acknowledgements
----------------
Many thanks to id Software for Quake2.

Uwe Girlich for lmpc and the dm2 format description
http://www.planetquake.com/demospecs/

Avi Rozen (Zung!) for the ProxyMod interface
http://www.telefragged.com/zungbang/gamecam

David 'crt' Wright for the ra2menu source
http://www.planetquake.com/servers/arena

Tom Vykruta for posting a serverrecord sample from 
John Carmack

