# Notes on ioquake3

ioquake3 is pretty much the reference implementation of Q3A these days, and despite my lack of time for FPS gaming, I like to remember the days when I ran a dedicated gaming service and revisit how to get a dedicated server going.

## Synology DS411j ARM Build

Compiling the dedicated server on an ARM box is mostly a matter of checking out the sources from the official SVN or the unofficial Github repo and creating a Makefile.local file with:

# Skip the client build
BUILD_CLIENT=0
CC=gcc
# For Synology with Optware, this enables getaddrinfo() properly
SERVER_CFLAGS=-I/opt/include -D_GNU_SOURCE
BUILD_GAME_QVM=1
BUILD_GAME_SO=1
COPYDIR=/opt/ioquake3


I initially had issues with floating point math in the game engine having a distressing habit of placing spawn points outside the game map, but fixed it by editing the main Makefile and commenting out the line:

  OPTIMIZE = \$(OPTIMIZEVM) -ffast-math


Without -ffast-math, everything went smoothly. gcc has always had an issue with this kind of thing, but it’s been quite a while since it bit me that way. Your mileage may vary slightly depending on your specific CPU and compiler version.

## Running OSP

Most of the servers I maintained back around the turn of the century ran the excellent Orange Smoothie Project mod (which made it trivial to manage servers and let users do all kinds of nifty management of game modes), and it runs fine on ARM as well - just grab it, unpack it as usual, and let rip with something like:

/opt/ioquake3/ioq3ded.armv5tel +set fs_game osp +set vm_game 2 +exec ffa.cfg


## Niceties

You might want to tweak your server configuration file to include the lines:

set sv_dlRate 8192
set fs_basepath /opt/ioquake3


To allow for faster map downloads (you can also redirect users to a web server, but I find it fastidious to set up).

I’ve been trying to find one of my daemon/logging/monitoring wrappers from years gone by, and will post it here when I do (or re-do it).