Game-Loader is a simple Quake2 'mod' that allows you to specify what game 
DLL to load on the Quake2 command line.

The main source program, plugin.c is a slightly modified version of Zarjazz's
plugin source code sample from http://www.barrysworld.com/Zarjazz/, the author
of BW-Admin.  The only addition is the cvar used to specify what DLL to load.

I've compiled and released this program for use with Night Hunters Xatrix 
(http://www.planetquake.com/nighthunters), but it can be used with any mod.

Game-Loader does NOT provide ANY added functionality for Quake2.  It is only
used to specify what DLL to load when starting Quake2.

Game-Loader would be used when you want to run two servers which need to be
run from the same directory, but different DLL's need to be loaded.  

For example:  You want to run a Xatrix server AND a Night Hunters Xatrix 
server at the SAME TIME.  Both Xatrix and Night Hunters Xatrix must run from
the quake2/xatrix folder, but they both require DIFFERENT gamei386.so / 
gamex86.dll files to be loaded.  That creates a problem...

Another example would be with CTF.  You could run two different CTF mods from
the same quake2/ctf folder.

*******************************************
Installation:

1.  Rename your existing DLL/SO file to something else in the mod directory
2.  Copy the Game-Loader gamei386.so (Linux) or gamex86.dll (Windows) file 
    into the mod directory
3.  Copy the second DLL/SO mod file into the mod directory with a different 
    name

Start up your server as you normally would but add the following:

+set game_dll (dll filename name)

For example, to run both Xatrix and Night Hunters Xatrix (NHX) servers at 
the same time, your xatrix folder should contain:

gamex86.dll		(Game-Loader DLL - gamei386.dll for Linux)
gamex86.xatrix.dll	(original Xatrix DLL - gamei386.xatrix.so for Linux)
gamex86.nhx.dll		(Night Hunters Xatrix - gamei386.nhx.so for Linux)

To start the regular Xatrix server, use:

Windows: quake2 +set game_dll gamex86.xatrix.dll +set game xatrix +set deathmatch 1 +set dedicated 1 
          +set port 27910 +exec server.cfg

Linux: ./quake2 +set game_dll gamei386.xatrix.so +set game xatrix +set deathmatch 1 +set dedicated 1 
          +set port 27910 +exec server.cfg

To start the Night Hunters Xatrix server, use:

Windows: quake2 +set game_dll gamex86.nhx.dll +set game xatrix +set deathmatch 1 +set dedicated 1 
          +set port 27911 +exec nhserver.cfg

Linux: ./quake2 +set game_dll gamei386.nhx.so +set game xatrix +set deathmatch 1 +set dedicated 1 
         +set port 27911 +exec nhserver.cfg

*******************************************
I have tested Game-Loader with BW-Admin, and it appears to work fine.  The
configuration is a bit tricky, but it seems to work.  If Zarjazz can change 
BW-Admin to allow us to specify the DLL to load on the command line (instead 
of bw-admin.cfg), then we won't need to go through all this:

Windows:
========

1.  Setup BW-Admin as per the BW-Admin instructions (using the quake2\release
    directory)
2.  Copy the DLL's as desribed above and start the game as described above.  

The load sequence will be:

bw-admin -> game-loader -> actual game

Linux:
======

1.  Setup BW-Admin as per the BW-Admin instructions (copy bwadmin's .so 
    file to the mod directory)
2.  Copy the SO files as desribed above EXCEPT copy the Game-Loader 
    file as gamei386.loader.so
3.  Copy the bw-admin.cfg into the mod directory and modify/add a line 
    to the file that reads: dll = gamei386.loader.so
4.  Start the game as described above

For example, to run BW-Admin with both Xatrix and Night Hunters Xatrix 
(NHX) servers at the same time, your xatrix folder should contain:

gamei386.so		(BW-Admin)
gamei386.loader.so	(Game-Loader)
gamei386.xatrix.so	(original Xatrix)
gamei386.nhx.so		(Night Hunters Xatrix)

The load sequence will be:

bw-admin -> game-loader -> actual game

*******************************************

Not much testing has gone into this, so please send any questions or comments to: batmax@fragit.net.




