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.

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.

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.

(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?

(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.

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.