Setting up a game server on a headless FreeBSD machine

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
FreeBSDguy
Private
Private
Posts: 3
Joined: Wed Dec 23, 2015 6:08 pm

Setting up a game server on a headless FreeBSD machine

Post by FreeBSDguy »

Hi all, a newby here.

Me and my family had a quick run of BZFlag on a FreeBSD desktop machine, and I got to say I am really impressed. This machine is old, only got a gig of ram, and a decent video card and the game performed very well. I installed the game using the FreeBSD ports tree. Easy peesy.

I see that we can start our own server by selecting the option, and we tried that and that worked well too. What I would like to do is install the gamer server on a headless machine for private LAN parties. (Maybe some day I might consider hosting a public server, but that is a long way yet.) I had a quick search but of course a lot of threads come up.

So my questions are: (1) can you point me to great discussion threads about setting up server on a headless machine, (2) any idea of how large the BSD community is using BZFlag, and (3) how would I go about getting game server ported to the the FreeBSD ports tree.

Any and all help very much appreciated.

Thanks,
FreeBSDguy
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Setting up a game server on a headless FreeBSD machine

Post by blast »

If you were able to start a server from the in-game menu, then you already have the game server, which is called 'bzfs' (and the binary is also named as such). If you're trying to just install bzfs on a different system, then I'm not familiar enough with BSD ports to know if you can tweak that. I don't think there are many that use BSD for BZFlag. For servers, I think there's only one or two hosts that use BSD, and the rest are Linux (with maybe a Mac OS X machine from time to time).

Anyways, the game server doesn't require anything too special. Doesn't need graphics as it's just a command line program. We provide man pages ('man bzfs' if that works for you) as well as help on the command line ('bzfs -help'). Setting up a bzfs instance on BSD should be like any other platform, so the information you find here on the forums should generally apply to BSD as well.

At the simplest configuration, just running 'bzfs' will start a non-public server on port 5154 listening on all interfaces running a randomly generated FFA world with 1 shot, no ricochet, no jumping, no team limits (and little to no debug output).
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
FreeBSDguy
Private
Private
Posts: 3
Joined: Wed Dec 23, 2015 6:08 pm

Re: Setting up a game server on a headless FreeBSD machine

Post by FreeBSDguy »

Yeah I know that I can launch server from the graphical game menu, but that is on a machine with a graphical desktop installed. I want to install 'server only' (no graphics) on a FreeBSD server that is headless, meaning no graphical desktop installed. But I see what you are saying. The FreeBSD ports tree looks like it only includes the graphical version, not the 'bzfs only' version.

I'll fart around, and maybe reach out to the FreeBSD porter and see if the 'server only' version can be ported. Yeah, I realize FreeBSD is not as popular as Linux, but its an awesome OS, even on the desktop side, but especially so on the server side. Heck Sony PS3, PS4, and NetFlix are built on it so it must be heavy duty rock solid. :D

Thanks.
User avatar
alfa1
Private First Class
Private First Class
Posts: 168
Joined: Tue Dec 04, 2012 10:21 pm

Re: Setting up a game server on a headless FreeBSD machine

Post by alfa1 »

I did a quick search but FreeBSD seemed too complex to understand easily (I am user of GNU/Linux mostly). But, what I suppose, is that together with the 'graphical version', as you say, comes the entire directory tree (all the files) which are into every BZFlag release (bzflag, bzfs, bzadmin, plugins, etc.). If you are able to find those files into your system, or if are able to download any source code version, then, you will able to run only the server, or to compile all of them manually, if necessary.

About porting: https://github.com/BZFlag-Dev/bzflag/blob/2.4/PORTING
It says about BSD: "The BSD socket API may cause some trouble if you're not porting to some flavor of UNIX. Encapsulating network code is on the to do list."

But, yes, if at the end you are not able to, then, talking with the FreeBSD porter is the final solution.
FreeBSDguy
Private
Private
Posts: 3
Joined: Wed Dec 23, 2015 6:08 pm

Re: Setting up a game server on a headless FreeBSD machine

Post by FreeBSDguy »

A FreeBSD port for BZFlag server is now available on the FreeBSD ports tree. I have not tested it yet, but intend on doing so soon.

For more info please reference:
https://www.freshports.org/games/bzflag-server/

For those interested in the server and client combo all in one port then please reference this:
https://www.freshports.org/games/bzflag/


BZFlag run really well on FreeBSD. The two seem right at home to each other. :D
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Setting up a game server on a headless FreeBSD machine

Post by blast »

2.4.4 came out yesterday and includes a good number of important fixes.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
Post Reply