Headless Server
#1
I would like to build a headless linux server that will run d1x-rebirth and d2x-rebirth.  I am looking for any instructions anyone might have.  I already have a debian game server running and have installed both packages of rebirth.  Now I am looking for the command structure to automatically start a game and then register it with the tracker.  Thanks in advance.
Reply
#2
The code for the tracker can be found here: https://github.com/Mako88/dxx-tracker

The packet info is documented there (although that's going to change at some point in the future).

For game-to-game packet info, you'd have to comb through the Rebirth source: https://github.com/dxx-rebirth/dxx-rebirth
Reply
#3
Does the code track games or does it create a game?  I want to be able to have a server running at all times that has a level I (and my boys) jump into and play. Once someone has hit the self destruct and the level ends, a new one automatically begins.
Reply
#4
Based on the title, I think he wants to run a game-hosting service without actually personally playing in the hosted games. This is not supported in the current code. The host must configure and join the game. There is no facility for automating game setup or startup. However, once the game is started, it would register with the tracker automatically (unless prohibited by user configuration).

Beware that the game-to-game protocol may change between releases. The handshake exchanges version numbers so that compatibility can be tracked, but there is no guarantee that the same opcode will be used for a given message in different releases, nor that the format of messages will remain the same.
Reply
#5
Gotcha.  Thanks for the reply.
Reply
#6
(11-23-2017, 05:20 AM)Kp Wrote: Based on the title, I think he wants to run a game-hosting service without actually personally playing in the hosted games.  This is not supported in the current code.  The host must configure and join the game.  There is no facility for automating game setup or startup.  However, once the game is started, it would register with the tracker automatically (unless prohibited by user configuration).

What would be required to get that going? Is it just a matter of providing the neccessary config via a file instead of going through the dialogues? Or is there also no way of hosting a game without having the host have a ship in the map as well?
Reply
#7
I’m not sure. This would be a developer question. Anyone in the forum have an answer?
Reply
#8
(02-13-2018, 10:49 AM)Toumal Wrote: What would be required to get that going? Is it just a matter of providing the neccessary config via a file instead of going through the dialogues? Or is there also no way of hosting a game without having the host have a ship in the map as well?

There is currently no way to have a host that is not a ship in the game. AFAIK it would take a pretty significant amount of effort to implement this in the code.
Reply
#9
The simplest implementation (which is still not trivial) would probably be to reserve player #0 to be the host (as usual), but immediately switch the host to be dead, so as to minimize regular level objects attempting to interact with it. This would cost you one game slot, preventing the game from hosting as many active players as when the host participates normally. If this were not done, you would at the very least have a stall at the end of every level while the game waits for the host to rush for the exit. In robot-enabled games, robots would attempt to attack a non-ghost host.

I have not thought at all about how to eliminate the then-unnecessary rendering the host would attempt to do. As far as I know, Descent was never designed for headless hosting, nor has anyone made any serious attempts at patching it to support that.

As a related point, even if this could be made to work, there are currently far too many disorganized global variables for the host to manage more than one game at once. You would need to run one instance of the program for each group of players that wanted their own game. I would say "patches welcome" for this (and technically, they are), but doing this right is such a huge project that I doubt you want to work on it.
Reply
#10
Here is an idea. Add 1 more player that shares the same initial spawn as player 0, and then never even spawn player 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)