How To: Build a Multiplayer PC Gaming Server
LAN-based game servers are also a popular alternative offering for conventional arcades, and an entire business is springing up around the "PC room" and "LAN arena" concepts. Multiplayer game boxes are also appropriate for hobby/game store environments and other recreation centers. And for an ISP or ASP with spare bandwidth and an urge to diversify, they make an interesting side offering.
In this TechBuilder recipe, I'll show you how to build a multiplayer game server. While this system is inexpensive, it is powerful enough to manage both popular first-person/tactical combat games like Battlefield Vietnam, and leading cooperative and competitive role-playing games such as Neverwinter Nights.
Ingredients
Here's what you'll need to build this system:
- A PC with robust Windows OS: The requirements of a game server are relatively modest. The server does not need the latest and greatest graphics hardware--or any graphics hardware at all! A headless machine makes a perfectly good game server, and that's what we will use in this recipe.
- Most game servers are rated to run on any version of Windows, even Windows 98. But for stability purposes, I recommend that you consider Windows 2000 Professional the bare minimum requirement. I used Windows XP Professional. (Linux is also supported by many, but not all, game servers. But I won't cover Linux here.)
- My server has 768 MB of RAM. Yours should provide at least 384 MB. More is always better, as it will help protect against performance drops.
- How fast a server do you need? That depends on the number of players you expect to support. For my system, I used a 2.4 GHz Pentium 4 processor, which is adequate for 32 Battlefield players. Here's a cheat sheet, courtesy of Electronic Arts, to help you determine how much CPU power your system will need:
- High-speed network and bandwidth: In a LAN environment, 100BaseT Ethernet and corresponding switches will be adequate for full-speed game playing. Avoid wireless connectivity, because wireless has a higher latency than wired Ethernet. Latency dictates how fast the server can receive and respond to movements by client gameplayers—the lower the latency, the smoother the gameplay experience. If your server will to be offered to remote players over the Internet, then a dedicated ADSL line is adequate for as many as eight players. Higher-speed SDSL or cable connections, or fractional T1, will be needed for between nine and 15 players. For 16 to 32 players, T1 speeds are required. And for more than 32 concurrent users, you'll need multiple megabits per second.
- Game server software: We will install two free game servers in this recipe. The dedicated server for Battlefield Vietnam can be downloaded from 3DGamers. And the dedicated server for Neverwinter Nights may be downloaded from BioWare.
- Game client software: Though the servers are free, the game clients are not. A LAN gaming operator will need to acquire one license for each person who will be concurrently playing the game. The game is installed on client's PCs, which are connected to the server via the LAN. Single-unit licenses range between $20 and $40 for these titles.
- Remote access software (optional): If you want to store the server out of sight, you will need to install remote-access software. That way, the game room admin may access the server from any PC on the LAN, including a game client terminal during troubleshooting. I recommend TightVNC. TightVNC is open source and frequently updated, as well as supported on many platforms.
- Multiple hard-drive controllers or striped (level 0) RAID (optional): For performance reasons, I recommend that you run no more than one type of game on a single machine. However, a resource-constrained user, or one who wishes to offer an extra but seldom-played game on the same box, may demand that multiple game servers run on a single machine. If that's the case, then increase the power of the system's CPU and add a second hard drive, either on a different controller or in a RAID Level 0 (striped) array. These hardware upgrades will help to prevent disk contention from slowing the performance of either game.
17 Steps To Building a Game Server
Now that you have your components assembled, let's start building the game servers.
1. Download TightVNC, and install it on the server PC. Allow the software to be registered as a system service. The default configuration settings are acceptable. But be sure to assign a strong password for VNC logins.
2. Install the Battlefield Vietnam server. Download the latest version (1.21 at the time of this writing), and run the bfv server executable to start the install.
The only significant configuration question is the decision to install PunkBuster, which should be allowed. PunkBuster is an anti-cheating mechanism, and in a LAN environment, cheating should be less of an issue. For Internet play, some players may resist using it. PunkBuster enforcement can be disabled from within the game server, so it may be safely installed to provide the option. It's part of the normal install and the configuration screen.
3. Launch the game server from the Windows Start Menu, under EA Games/Battlefield Vietnam Server/Run Dedicated Server. When the server launches, it presents a seven-tab configuration window. In the General tab, set a password for access to the server, if desired. The maximum number of players, also found in the General tab, should be stress-tested before being placed into production, if at all possible. But if the configuration guidelines in our Ingredients section are followed, there should be no surprises. At the bottom of the General tab, choose whether connections should be accepted from the Internet at large or only over the LAN (that is, from local IP addresses).
4. While still in the General tab, use the Bandwidth Limit step if the game will allow remote connections, and if bandwidth constraints are a potential problem. Values range from 64 Kbps to 8.2 Mbps. Conservatively estimate that each player needs about 80 Kbps for a full-speed gaming experience.
As the screen shot below shows, the Battlefield server may be throttled for constrained environments.
5. The Battlefield Vietnam server includes all of the game's standard maps and combat scenarios. Clicking on the Mods/Maps tab, you can designate which maps may be played for each of the game's four play modes: Custom Combat, Evolution, Conquest, or Cooperative. Each game type offers a different range of maps. Select Game Mode, then click the maps you wish to provide in that mode. Then click the right-arrow icon to add them to the game list. As the next screen shot shows, EA includes all of the standard Battlefield maps in the dedicated server:
6. The Gameplay and Advanced tabs both feature low-level details best configured by the game operator. The one technical item of note in the Advanced tab is the Spectator options. Spectators are users who cannot play; though they log onto the server, they can only follow the action virtually. While Spectators use less bandwidth than players, if your users are playing in a constrained environment, Spectators should be shut off to maximize performance for the participants.
Similarly, the Custom Combat tab includes many visual and rules enhancement changes a game admin may make to individualize the experience for players.
7. Click on the IP Settings tab. Here, "Detect automatically" may be left checked if the server has only one NIC, and traffic may be carried out over port 15567, the game's default port. But if the server is behind a firewall or router, the router will need to be adjusted to forward traffic over the gameplay port to the server. By unchecking Detect Automatically, you can set a different value; you can specify both the internal IP the game server should use and the port for gameplay traffic.
8. The configuration is ready. Click Start Server to begin the game. After a brief delay, the command console will appear, providing game status data. When the server is running and players are logged in, the admin may monitor game performance, as the following screen shot shows:
9. To join a Battlefield Vietnam game on your new server, install the Battlefield Vietnam gameplay client on a computer on the LAN. Then start a Multiplayer game, scanning for Local servers. The new server should automatically be detected, and the game can begin. As the next screen shot shows, Battlefield Vietnam servers can be automatically located by the game, meaning players are up and running with just a few clicks:
10. Next, we will install the Neverwinter Nights (NWN) server. Download the latest version of the dedicated server (1.65 at the time of this writing), and unzip it to a suitable hard-drive directory. There is no automated installer process for the NWN server.
11. Start the server by running nwserver.exe from the directory you just created. The management console will appear, as shown here:
12. Provide a name for the server. This will help identify the server to your players. A NWN server supports no more than 12 simultaneous players, and most of the role-playing adventures supported by NWN are designed for even smaller groups. So distinctive names will make it easier for players to distinguish between multiple servers on a network.
13. Most of the NWN server settings are best left to the game admin, such as Difficulty--which determines the types of rules and the challenge level which will be enforced--and Level, which determines how powerful characters in the game may become. Server AutoSave, measured in minutes, should only be set to a low number if the server appears unstable, as the AutoSave image allows players to recover their progress if the server should go down. A setting of 0 is disabled. A "safe" value without much disruption to gameplay would be between 15 and 30.
14. The server supports up to three different passwords: one for players to log in, one for the DM (dungeon master) to log in and referee the game, and a third for server-level configuration. In most cases, at least a server and DM password should be configured. Simply enter the password or passwords you wish to enforce in the appropriate blank.
15. By default, the NWN server uses port 5121. To use a different port, launch nwserver.exe from a command prompt window with the "port switch (as in, "nwserver.exe "port 1000" to use IP port 1000). If the port is behind a firewall or address translation, then route Port 5121, or whichever port is designated, to the game server.
16. Before a game can begin, you must load a game module or scenario. Select one from the drop-down list marked Module Name, then select Load. This launches the server, which will now listen for NWN clients. The screen shot below shows a NWN server that has loaded a scenario and has one logged-in player:
17. NWN players join the game by selecting a Multiplayer game and scanning for LAN servers. The server should automatically be detected, and a new game can begin. In the next screen shot, Neverwinter Nights has automatically located valid servers and provided details on the available scenarios.
There are literally dozens of games with free servers that can add diversity to any entertainment center's value proposition. With a properly configured and robust gaming server, all you'll need is a group of eager gamers.
JASON COMPTON is a technology writer who has covered topics ranging from 8-bit entertainment to supercomputing for more than a decade.