Difference between revisions of "Hosting a game"

From Bitfighter
(Detailed Instructions for Hosting a Dedicated Server on a Mac)
(Hosting a Dedicated Server on a Mac)
Line 15: Line 15:
  
 
===Hosting a Dedicated Server on a Mac===
 
===Hosting a Dedicated Server on a Mac===
 +
 +
To host a dedicated server on OS X, follow these instructions.
 +
 +
Setup:
 +
 +
1. Locate your Bitfighter app.
 +
2. Right click and choose "Show Package Contents."
 +
3. Double click on the "Contents" folder.
 +
4. Double click on the "MacOS" folder. Inside should be an item labeled "Bitfighter."
 +
5. In a new Finder window, browse to your Applications folder. Scroll down and double click on the Utilities folder, then scroll down some more and open the Terminal application. Wait a few seconds for the Terminal window to load fully; some sort of text should appear on the window.
 +
 +
Through Terminal you will be able to run a dedicated Bitfighter server.
 +
 +
6. Drag the Bitfighter item from the MacOS folder onto the Terminal window. Basically, this action writes the path from the harddrive to Bitfighter, allowing Terminal to work its magic. Depending on where Bitfighter is located on your computer you can write this path manually, but it's generally easier - and faster - to simply drag and drop.
 +
7. Add a space, then type "-dedicated" (without quotes) to establish your server as a dedicated server.
 +
 +
If you hit enter right now, you'll have a functioning Bitfighter dedicated server. Check for the "Welcome to Bitfighter!" message to appear on the Terminal window to ensure you've done everything right so far.
 +
 +
Adding commands:
 +
 +
We need to add some commands to make this server come alive. Consider writing the following commands, replacing <name> with the word of your choice. (For multiple words, use quotes.)
 +
 +
-dedicated -hostname <name> -hostdescr <description> -adminpassword <password> -levelchangepassword <password>
 +
 +
An example server might have a Terminal window looking like this:
 +
 +
BitfighterPlayer$ /Users/BitfighterPlayer/Desktop/Bitfighter.app/Contents/MacOS/Bitfighter -dedicated -hostname meow -hostdescr "meeeeeeeow meeeeow" -adminpassword whiskers -levelchangepassword kittens
 +
 +
You can find additional commands in the [[Command line parameters]] page, under "Options for Hosting."
  
 
===Specifying Levels===
 
===Specifying Levels===

Revision as of 18:14, 14 October 2013

The most typical way of hosting a Bitfighter game is to simply run Bitfighter normally, and select Host Game from the main options menu. This will start combined Bitfighter server and client instance. This is ideal for short-term hosting of games, but consumes more resources if you are not actively playing. Also, a normal game window will be open while the game is running. If you quit the game, you will also shut down the host, causing any other players to be disconnected.

For running a game host long-term, or where you may be dropping into and out of the game, a dedicated server may be the better option.

Dedicated server

Bitfighter can be run in Dedicated Server mode, which creates a background process that provides a game server others can play on.

To start a dedicated server, run Bitfighter with the -dedicated option. You can do this from a cmd (Windows) or shell window (Mac/Linux), or by creating a shortcut (Windows) specifying that bitfighter.exe be run with the -dedicated option.

When running in dedicated mode, the program window will disappear, and the server will continue to run. The server has been designed to have low resource consumption when no players. The game will also make a sound indicating that a player has joined or left the game. Therefore, it is possible for you to run a server unobtrusively in the background, and be alerted when a player joins the game so you start playing too.

You can easily join a game on a local dedicated server by running a second Bitfighter instance, and choosing the Join Game option from the main menu.

Note that the volume of the alerts can be controlled, or disabled altogether, in the bitfighter.ini file. You'll need to restart your dedicated server for the new settings to take effect.

Hosting a Dedicated Server on a Mac

To host a dedicated server on OS X, follow these instructions.

Setup:

1. Locate your Bitfighter app. 2. Right click and choose "Show Package Contents." 3. Double click on the "Contents" folder. 4. Double click on the "MacOS" folder. Inside should be an item labeled "Bitfighter." 5. In a new Finder window, browse to your Applications folder. Scroll down and double click on the Utilities folder, then scroll down some more and open the Terminal application. Wait a few seconds for the Terminal window to load fully; some sort of text should appear on the window.

Through Terminal you will be able to run a dedicated Bitfighter server.

6. Drag the Bitfighter item from the MacOS folder onto the Terminal window. Basically, this action writes the path from the harddrive to Bitfighter, allowing Terminal to work its magic. Depending on where Bitfighter is located on your computer you can write this path manually, but it's generally easier - and faster - to simply drag and drop. 7. Add a space, then type "-dedicated" (without quotes) to establish your server as a dedicated server.

If you hit enter right now, you'll have a functioning Bitfighter dedicated server. Check for the "Welcome to Bitfighter!" message to appear on the Terminal window to ensure you've done everything right so far.

Adding commands:

We need to add some commands to make this server come alive. Consider writing the following commands, replacing <name> with the word of your choice. (For multiple words, use quotes.)

-dedicated -hostname <name> -hostdescr <description> -adminpassword <password> -levelchangepassword <password>

An example server might have a Terminal window looking like this:

BitfighterPlayer$ /Users/BitfighterPlayer/Desktop/Bitfighter.app/Contents/MacOS/Bitfighter -dedicated -hostname meow -hostdescr "meeeeeeeow meeeeow" -adminpassword whiskers -levelchangepassword kittens

You can find additional commands in the Command line parameters page, under "Options for Hosting."

Specifying Levels

Levels can be specified in several ways. When you run Bitfighter out-of-the-box, it will attempt to load all levels in the levels folder contained in your Bitfighter data folder, which is installed in different locations on different platforms. You can add additional levels to this folder if you wish, and they will automatically be loaded the next time you restart the game.

There are several command line parameters and INI settings that can change this behavior. You can specify an alternate level folder in your INI file with the LevelDir entry. This can point to any folder on your machine, either as an absolute path, or a path relative to the Bitfighter install folder.

You can also specify a folder on the command line using the -leveldir parameter. Bitfighter will first look to see if you specified a folder that exists on your machine. If it cannot find that folder, it assumes you are specifying a subdirectory under the levels directory in your game install folder (or an alternate location specified in the INI). Using this parameter, you could maintain several collections of levels in subfolders under your main levels directory, then select different collections at runtime with the -leveldir parameter.

If you wish to specify specific levels in your level folder (rather than loading them all), you can do so with the -levels parameter. Note that the .level suffix is optional here.


See Command line parameters for detailed syntax and more details about how the level folder is resolved.