Open EchedelleLR opened 1 year ago
The dedicated server can be run with:
q3rally-server.x86_64 +set dedicated 2 +set sv_hostname "24/7 q3r_country01 server" +map q3r_country01
dedicated 2 will add it to the server list and must be set on the command-line. You may need to forward/open UDP port 27960. (This can be configured using +set net_port 27961
on the command-line for running multiple servers.)
sv_hostname is the name in the server list. It could be in a config file.
A map must be loaded to join. It could be in a config file. A map rotation needs to be set or else it will stay on one map. I added config files for all gametypes as q3r_*.cfg in https://github.com/Q3Rally-Team/q3rally/tree/master/baseq3r
If you download the cfg files and put them in baseq3r, you can set the gametype and map rotation using:
q3rally-server.x86_64 +set dedicated 2 +set sv_hostname "My racing server" +exec q3r_racing.cfg
Some general Quake 3 server info: https://ioquake3.org/help/sys-admin-guide/
You need to get the baseq3r assets from the Q3Rally 0.4 download. (There isn't a known way to rebuild the exact pk3 files and building it yourself will cause compatibility issues or client's trying to download it.)
The dedicated server only has standard system libraries as dependencies (libc, libm. libdl). Assuming the GLIBC requirement isn't too new for the container, you should be able to use the server binary from the 0.4 download as well.
Thank you. I will work on it during these days (maybe the weekend) and will try to come with a pull request for something automated.
This is basically standard Quake 3 behavior. There is a template for systemd service but it needs to be customize for each game server. https://github.com/ioquake/ioq3/blob/main/misc/linux/q3a.service
I'm not sure what you're planning to try to automatic in a pull request but you might want to discuss it first if it's changes in the game code. For example, I wrote auto-map rotation in another project so the question would be if it should be added, not how. If it's general engines changes unrelated to Q3Rally it may be better to go to ioquake3 first.
Sorry, I was not really this familiar with the engine and thought that every game had to be tweaked and could change the way to load.
To be exact, my idea is just to upload a dockerfile and a docker compose to make direct server deployments easily.
Yeah, a Dockerfile / compose is reasonable. There is a lot separate ioquake3 dockerfiles on GitHub. I haven't worked with it.
Q3Rally engine is ioquake3 engine with some changes. It can technically change any part of the engine but preferably it stays close to ioquake3 instead of adding various changes not necessary for Q3Rally.
A little question. All maps are embedded in the pak0.pk3 file, right?
Just to be sure that the final release should have server binary + this file + file configs.
Tagged release https://github.com/Q3Rally-Team/q3rally/blob/v0.4/engine/Makefile indicates version 0.3 in the Makefile.
Is the final built really the same as that commit?
A latest commit performs the real change.
I am building the server binary using:
BUILD_CLIENT=0 \
BUILD_SERVER=1 \
BUILD_GAME_SO=0 \
BUILD_GAME_QVM=0 \
BUILD_BASEGAME=0 \
BUILD_MISSIONPACK=0 \
BUILD_RENDERER_OPENGL2=0 \
BUILD_AUTOUPDATER=0 \
make
I am still checking to strip the architecture version of the binary and path names automatically since it forces a fixed check to copy the files later makes it arch dependent (despite ioquake3 being able to run in more than x86 and ARM).
Btw, the BUILD_DEFINES
variable is really confusing. It seems like it stores a number but if you do so, build fails. After checking a bit it seems to be dumped with an actual string later.
I got it already working in a base Docker image, I need to add now the possibility to load one of the custom games you commented or upload custom file.
https://codeberg.org/nyaaprojects/q3rally
I have to adapt it to your repo now and upload the proper pull request. This is a working sample I would use for myself and where I would work mostly.
@insellium I was expecting some kind of feedback here instead of an insta-close.
In fact, I set many doubts here still unresolved related to releases, Makefile interpretation, etc.
The idea of that feedback is for later to be able to submit a pull request to integrate my extras in this project.
oh, sorry
A little question. All maps are embedded in the pak0.pk3 file, right?
Yes
In fact, I set many doubts here still unresolved related to releases, Makefile interpretation, etc.
The release process wasn't the best and Q3Rally 0.4 binaries indeed claim to be 0.3. BUILD_DEFINES was lacking a comment as to what it is. It's not really needed so I've removed it in a19b0be7473575c6ecf1a7a0a8de5a317cb332e8.
I wasn't really planning to test or maintain Docker support. If you want to submit files for others to use, okay. Though is the standard practice to add it to Docker hub? https://hub.docker.com/search?q=quake3
Regarding https://codeberg.org/nyaaprojects/q3rally:
TCP forwarding isn't needed.
DEDICATED setting in your .env.prod.sample enables listing on master server (dedicated 2) with the comment "If the server is dedicated or not". However q3rally-server is inherently always dedicated (no client). The name/comment seems confusing. Maybe name it JOIN_SERVER_LIST?
GAME in .env.prod.sample and entrypoint.sh should probably be the whole config file name instead of q3r_$GAME.cfg so it's easier to use a custom config without requiring a specific name format.
I will implement those changes ASAP.
Sorry that there was no feedback or something. Real life is taking over sometimes and we are sometimes not on the game for working on it. :-)
It is okay, I really feel you.
I am still pending to perform those changes.
Between ADHD and life things is difficult.
I would like to know what are the steps to run a dedicated server.
Is it also able to be built without unneeded dependencies?
If I am given instructions I could create a base container image for it in order to get easy deployments. I have not seen any server being run in the server list and I am quite worried.