Raspberry Pi + OpenArena Server = ?

No Comments

That's right, the Raspberry Pi, is perfect for running an OpenArena server. If you are unfamiliar with the Raspberry Pi, the amazing $35 credit-card-sized computer, here's a bit of information about it.

Using hardware taken from low-end smartphones, the Raspberry Pi (RPi or Pi, for short) is a fully-functioning computer with the stuff you'd expect from one, such as:

  • 100mbit/s Ethernet port
  • Four USB 2.0 ports
  • An HDMI port for both audio and video
  • 3.5mm headphone jack for attaching headphones or speakers
  • RCA analog video out for interfacing with most TVs
  • Hardware-accelerated media decoding and encoding, capable of playing full HD video without issue

And other stuff that you wouldn't normally see on a desktop computer, like:

  • General-purpose IO pins to give your electronics projects a bit more computing power
  • DSI connector for direct connections with embeddable LCD screens
  • Camera connector for directly interfacing with a camera module built for the Pi
  • Powered by a standard USB Micro B charger, the same one most phones use

The hardware on the Pi is intended to keep the price as low as possible while still being remotely usable as a computer, so with that in mind, here's what's under the hood: A Broadcom BCM2835 SoC (system on a chip) which packs a single-core 700MHz 32-bit ARMv6 CPU, a Broadcom VideoCore IV GPU, 512MB of memory, and a bundle of hardware-accelerated encoders and decoders for various things such as recording or playing back 1080p (full HD) video. Performance-wise, it's about like an Xbox gaming console but with better graphics abilities.

Now, on to OpenArena, the open-source flavor of Quake 3 Arena. OpenArena is an attempt to take id Software's now-open-source Tech 3 game engine and marry it with all GPL'd content. When id Software released the source code to their Tech 3 engine, they only released the engine's code itself, without releasing any content from games such as Return To Castle Wolfenstein or Quake 3 Arena.
OpenArena, using the community fork of Tech 3, ioquake3, tries to capture the original Quake 3 Arena feel that so many gamers from the early 2000's remember with the typical fast-paced, close-quarters shooting action. The game is intended to run on just about anything hardware-wise, and has been ported to many operating systems, including Windows, OS X, and Linux. This makes it the perfect candidate for the Rasbperry Pi!

If you are running Raspbian Linux on your Pi, installing it is a breeze. You can find it in the Pi Store as a one-click download or you can install it through command line if that's your thing, the package name in the repository is simply "openarena" for the game client. The Pi runs OpenArena very well, given its low cost, and when paired with a stable internet connection and a proper keyboard and mouse, it can successfully kill many hours of your day.

However, this isn't about the OpenArena game client, this is about running a dedicated game server for OpenArena. The dedicated server software isn't as one-step-setup as the game client, and this isn't intended to be a guide on how to properly run an OpenArena server. I recommend running Raspbian Linux on your Pi for this, not only because Debian-based Linux distributions are my favorite, but also because it's the recommended OS by the Raspberry Pi Foundation due to its extensive software collection and overall polish. Any shell commands found here will be assuming you are running Raspbian.

To install the game server, first be sure that you've got enough space, the server will take about 500MB.
If you've got 500MB or more free, start by issuing this:

sudo apt-get install openarena-server

This will download, install, and then start the OpenArena server. You can stop the server using:

sudo service openarena-server stop

To configure the server, you can find its configuration file here: /etc/openarena-server/server.cfg
This configuration file can accept the standard stuff you'd find in a Quake 3 Arena configuration, so if you've got maps, mods, and configs from Quake 3 Arena that you wanted to rock, it's pretty straight-forward to plug them into this OpenArena server.

When you're all done configuring your server, you can start it back up with your newly-configured settings using:

sudo service openarena-server start

If you'd rather not have it run as a system service, you can run it directly using openarena-server. When running it directly, it will use ~/.openarena/baseoa as its base directory for configs, mods, and maps. Running it directly will also require you to specify whether you want it to run as unlisted (suitable for LAN play) or if it should report to the master server to appear in the public server list. Specifying this is easy, just add "+set dedicated 2" to the end of your openarena-server command if you wish your server to show up in the public server list. Not supplying that option will make it default to "1", or a non-public server that can only be joined if the players know the server's IP address or domain name.
So if you would like the server to be completely open to the public and you do not want to run it as a service, you should use:

openarena-server +set dedicated 2

For my particular Pi-powered OpenArena server, it will be running as close to 24/7 as possible, barring any program crashes that could happen. You can find it in the public server list as "RaspberryPi FFA | Stock Maps!". For now, while I continue to get everything set up exactly how I want it, it lives in my home, using my home Internet connection. Once it is set up exactly how I'd like it to be, it will be sharing space with many other Raspberry Pis in a nearby datacenter, on a reliable low-latency connection. During my stress testing, the Pi handles it well. I've seen six players on the server with very little resource usage and no complaints of server-side lag, so this leads me to believe that it could handle much more than six players at once. The only time server-side lag is noticeable is for one or two seconds after adding a computer (bot) player, while it loads the bot file.

For more information about the Raspberry Pi, check out: raspberrypi.org

For more information about OpenArena, check out: openarena.ws

"Raspberry Pi" is a trademark of the Raspberry Pi Foundation.