How BEan Builds Game Servers

Posted March 28, 2021 by Justin Benedick

Hello, I am BEan the Game Server Admin/Engineer/Guru/whatever from Laclede’s LAN. I am not one of the staff that get on the mic or at the front desk of events, I am more in the background. With everything on lockdown due to COVID-19, I figured I’d take the opportunity to talk about what I do for events and during this lockdown. In a nutshell, I set up and manage the game servers for those games where we can host such games as Counter-Strike-GO, Team Fortress 2, and others. On paper, it may sound as simple as running some software on a spare system, but when you consider running a server for a tournament or a large event, it can be a handful.

Technologies Used for Game Servers

The best way to think of a game server is that it acts as the arena and referee of the game – enforcing the game space, the rules, and making sure the game goes forward. A game server itself doesn’t require that much horsepower. Typically, all it takes a few CPU threads, a few gigs of RAM, and some disk space. You could run multiple games servers off a modern PC.

To understand how game servers are built for events, it’s best to understand the technologies we use. When first developing a game server, I rely on virtualization, specifically ESXI from VMWare. Once I am happy with the game server, we finalize it as a Docker image. Now ESXI is just a simple virtual machine system that runs on a server. Like VirtualBox or Hyper-V, you create a virtual PC, install a guest Operating System, and run it like any other computer. Docker is like running a virtual operating system; working inside of a Docker container feels just like a VM, but writing the blueprint (called an image) is a bit more demanding. The big benefit is that images work the same no matter what hardware it runs on, and uses far fewer system resources than a virtual machine. When an image is launched, it creates a container that will run the program. The best feature of Docker is that we can use the same image to create multiple game-servers simultaneously, without virtualization!

How I Build a Game Server from Scratch

I always start with basic research on the game I want to build a server for: what are its network requirements, what game modes it has, how does it use custom assets like maps, etc. Once I gather enough info, I use ESXI to create a virtual Ubuntu server. From there, I follow the server setup guides that can be found on the internet, which usually involves obtaining and copying game files, installing system packages, and building shell scripts of commands. I take notes on everything I do so that I can later turn them into instructions for a Dockerfile. I constantly connect to the server to test functionality, stability and make adjustments.

Once I am happy with the barebones server, I work with Dudsmack to create a Dockerfile. This Dockerfile is literally just a set of instructions (which files to copy, network ports to open, packages to install, and commands to execute) that will be used to create a Docker image, which can then be used to quickly spin up a game server on any computer capable of running Docker. We keep all of our Dockerfiles on GitHub, which makes it easy to collaborate on, and anyone in the world can use them or even contribute to them. If you, or any other LAN Party organization wanted to, you can use one of our base images to create your own Dockerized game server!

Once the stock game server is ready to go as a “base” game server Docker image, we create another image on top of it that will hold all of our game customizations. Depending on the game, it may have multiple configurations we might use. For the configuration layer it’s basically the same process, except we are just adding our own config files on top of the base config. We may have a configuration for a tournament server and a separate for casual play. If this was a tournament server, we would also bring in our tournament admin to make sure that what is configured on a server matches what is in the rule book. There have been several occasions when we would gather at someone’s house just to have a small LAN dedicated to testing a tournament server. When it comes to the day of the LAN, the images are updated, given one final test, and they are spun up when needed.

Other Thoughts

Volunteering my time by working on these servers has helped me out professionally and personally. I feel more comfortable with Linux, reading and writing technical documentation, and collaborating with others using GitHub. I mostly use Linux to work on raspberry pi computers that I use for 3D printing, file backups, and few other places. At work, when I come up with a new solution to a problem, it’s my job to document it as an article in a knowledge base for others to follow and understand, which I started doing for Laclede’s LAN. From the beginning to now, I had to learn Linux, how to use VM technologies, troubleshooting, networking, documentation, and more. Those skills can easily be applied to a IT professional career.

As for the COVID situation, since we cannot gather in large numbers, I can spend some tourney test time in other places. Since we have the monthly game nights, I do have to test and adjust those game server configs so that they can run on the internet. The big thing for me is that I have the chance to add in some more games I want to play. The latest one I am working on is Quake 2. It’s a true classic and it’s one of those games that laid the foundation for all FPS games that came after it. I have fond memories of playing Capture the Flag on custom maps and seeing all the custom characters. It’s a game that you can get for a few bucks on Steam, Nvidia has an enhanced port of it, plenty of maps, and pretty much the classic gameplay. I also have a few other games in mind I want to have ready at a moment’s notice. When this plague is over I will simply have more ready on the menu.

Also below is one of the tables that I have in my apartment. It’s an Ikea Coffee table that contains the servers I use. I have one server running ESXI, one running Ubuntu with Docker, and 3rd with spare parts.

BEan’s Ikea Rack

See Also

-Justin