Skip to content

Add dedicated server build

Hanicef requested to merge Hanicef/SRB2:dedicated-server-build into next

this patch adds a special kind of build for SRB2 that allows hosting on headless servers without a hassle. the biggest differences between the SDL build and dedicated is that a lot of dependencies including SDL and OpenGL are removed on a dedicated build, as they are unnecessary when running a dedicated server. it also gets rid of a lot of unnecessary code that dedicated servers don't need, making the dedicated server build smaller than the SDL build.

the goal here is to make it possible to run SRB2 on a headless system without having to resort to modifications and hacky workarounds to supplement the lack of a GUI. this is a notorious issue for deploying SRB2 in a way that allows the server to run without supervision, since right now it is frustratingly hard to run the server in a managed system for auto-restart, init integrations, etc. which is what you need to do if you want a long-running, self-managed server (SRB2 is actually unique in this; all other games with dedicated servers i've played have some sort of build that doesn't need a GUI).

the build can be made by passing DEDICATED=1 as build parameters. it has been tested on Windows, Linux and FreeBSD successfully with no problems; Mac OS is untested as i don't have a Mac i can test it on.

Edited by Hanicef

Merge request reports