Hosting multiple servers on Linux

From Bitfighter
Revision as of 06:53, 18 August 2010 by 97.120.109.154 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

It is possible to host multiple servers using a single install of Bitfighter. Here is how the official Bitfighter game server is organized:

The main game itself is installed in /home/autotron/bf013 All server-specific data is stored in /home/autotron/servers Each server has its own subfolder, which in turn has a levels and robots subfolders.

So the folder tree looks like this:

/home/autotron/bf013/install stuff  <-- SVN code checked out here, 
                                        built with dedicated option
               servers/classic/levels
                               robots
                       usrlevs/levels
                               robots
                       botlevs/levels
                               robots
                       ... 

Then, a shell script can be used to launch the servers:

cd /home/autron/bf013/exe
screen -dmS classic ./bitfighterd -hostname "Classic Levels" 
     -hostdescr "[Calif.] Classic levels shipped with Bitfighter" 
     -rootdatadir "/home/autotron/servers/classic" 
     -levelchangepassword changeit -adminpassword adminit
screen -dmS classic ./bitfighterd -hostname "User Submitted Levels" 
     -hostdescr "[Calif.] Levels submitted by users" 
     -rootdatadir "/home/autotron/servers/usrlevs" 
     -levelchangepassword changeit -adminpassword adminit
screen -dmS classic ./bitfighterd -hostname "Robot Levels" 
     -hostdescr "[Calif.] Where the robots play after happy hour" 
     -rootdatadir "/home/autotron/servers/botlevs" 
     -levelchangepassword changeit -adminpassword adminit
...