Dedicated Server

From Eagle Dynamics Wiki
Jump to: navigation, search

(this page is still under construction)

Description

Dedicated Server

The following information is about to become redundant as a dedicated Server tool has been announced for DCS Wold 2 which is about to be released soon, more information to follow as soon as the community knows more
The term "dedicated Server" is actually a bit confusing, because currently there's no dedicated server program for any DCS product available. There have been indications that a dedicated server is in the works (e.g. this interview and this forum post), but no official announcement as to when it will be available has been made as yet. However, it's still possible to run the game as a "dedicated" server host, which means that everybody has the opportunity to run a server in the form of a simple host, which is likely named as dedicated server.

What do I need to run a server for DCS?

The first thing you'll need is a server. That sounds a little stupid because we already want to run a server, why do I need one then? This simply means that a PC, which is connected to the Internet, is needed. Another PC in your house which has a fast connection to the internet is enough. The king of all is of course a dedicated server at a well-connected datacentre. But this is another theme to explain, and hosting the game on such a server is the same as hosting it on a spare PC you may have at home.

To run a server you need:

  • Sufficient hardware to actually run the game. See below for more information.
  • A downloaded and installed copy of DCS World (Check the current Version number scroll to the button to see the latest Version built)
  • A licensed copy of at least one DCS Module, is no more needed as DCS World comes with an included module. The Multiplayer feature is already enabled for the free DCS World download.
  • Have the server be accessible from the internet; you'll generally need to configure your router to forward the port you're using (default is 10308) to your server computer. The guide at portforward.com may be useful.

Hardware requirements

As running a "dedicated server" currently requires you to actually run the GUI, your host computer will need to have sufficient graphics capability and DirectX support for the game to create the multiplayer window. It doesn't need a lot of power, however, as you can disable the rendering of the 3D environment.

Confirmed to be sufficient for hosting a server with 3D rendering disabled are (please add to the list if you run a server on low-spec hardware):

  • Intel HD Graphics provided by the Intel H67 chipset, which some motherboards will have built-in ("on-board graphics").

So long as the system supports DirectX 9 for video, it should be sufficient. You can configure a low screen resolution and disable the 3D rendering. Some server boards have very basic graphic chipsets which don't have even basic DirectX support, and these may fail to launch the game at all.

Server configuration

There are a few settings you can tweak specifically for your "dedicated" server to improve performance.

First, in Config\Graphics.cfg under your game install location, find and change these parameters:

MaxFPS = 30;
render3d = false;

You can experiment with different values for MaxFPS; I'm not sure what effect they have on actual computations. Some people seem to suggest 20 as the lower bound. This simply prevents the game from wasting too much time refreshing the display which nobody will be looking at, anyway.

The render3d option prevents the game from rendering the 3D environment; it will just show a completely black screen any time it would otherwise be showing the game world. This significantly improves game performance especially on systems with embedded or low-spec graphics cards, and prevents the server from stuttering when intensive effects (like cluster bombs) occur.

Note: the updater program will overwrite your changes to graphics.cfg, since it's part of the game installation folder and it will "repair" any modified files. You'll need to re-make these changes each time you run the updater.

Next, you can modify the per-user configuration to better suit your setup. I run the game in 1024x768 windowed mode, which makes the game UI easier to interact with. The easiest way to set this up is to run the game in single-player (under the Windows user account you'll be running the server as), and configure it via the Options screen. If you're going to be accessing the server remotely, you might want to remap the Pause key to something like "P" that can be easily sent via different remote-control programs, which might have difficulty transmitting the Pause/Break key.

You'll probably also want to edit Saved Games\DCS\config\network.cfg under your user directory to set the bandwidth you actually have available. You can use sites like speedtest.net to get an estimate. This will help the game work out how much data to send to clients. Note that the values in this file are in bits per second, and it's the Upload parameter that will be the determining factor. For example, if you have 5.49 Mbit/sec of upload bandwidth, you could set this parameter to around 5.49 x 1,000 x 1,000 = 5490000. Since you'll probably be doing other things while playing (voice chat, etc.) you'll probably want to reduce this to allow a safety margin.

While you're in the network.cfg file, there is a parameter in the server section named "pause_on_load". This is set to true by default, and it does what it sounds like it does: it pauses the mission when it's first loaded, so you have to manually unpause it once you're ready to begin. Depending on how you play and the kind of missions you're hosting, you might want to set this to "false". That way, connected clients can be begin playing immediately, without having to wait for the host to resume the session. If you're flying organised missions where you want everyone to start at the same time, leaving this enabled can be useful, allowing you to unpause the mission only after everybody is connected and in their cockpit.

Running the server

The "dedicated server" is launched just by running the game in multiplayer mode as normal. Remember to go into the options screen to set your client name, which is what other people will see in the server list. When you select to host a mission, you can set the mode to "LAN" or "Internet"; the only difference is that "Internet" will submit your details to the master server list (so your server will appear in the server browser).

That is basically all there is to it. You'll find a few difficulties with this setup, which is why people are still eagerly awaiting a proper dedicated server program. The next section has some tips for advanced users to overcome some of these difficulties.

Advanced tips

Remote access

If you don't have (easy) physical access to the server, you'll need a way to manage it over the network. The easiest method is the built-in Remote Desktop feature in Windows. I've had limited success with this method, and prefer to use VNC (specifically I use TightVNC but there are many variants). VNC attaches to the console session, so to the game it's exactly as if you were sitting there at the screen.

Server management

If you want to run your server on a seperate Root server, so you should take a deeper look onto the Server Management tool created by Interceptor from the German DCS Community Spare-time-Pilots (InSeMa). This tool has the ability to automatically administrate it as for kicking and banning Team killers or highpingers as well as Missionrotating without the need of a presence of an Admin. The Installation is well explained in the following Link: Download and configure InSeMa

Unfortunately, the nature of the internet is such that idiots will feel the need to join your server for the purpose of annoying other people. This is mostly often done via team-killing (i.e. shooting down members of their own team), or just by behaving in a manner which isn't conducive to the rest of the players enjoying themselves. The current best method for dealing with troublemakers is the server management functions of Speed's excellent slmod add-on. (Now used prior to use InSeMa)