Over the last years I have been working on and off (well, admittedly more off then on) on some functionality that I call HopServer. What does it do? Well pretty much as it says on the label: it lets you hop from server to server. And before you say that you can already do that through the server list, let me clarify: it hops you from one server to another when you touch an invisible entity on the first server. Completely automatic.
How is it supposed to work? There is a central MySQL server that has a record for all of the players, servers, maps and links. The servers are running specialized (or adapted) maps that feature several small trigger entities, each with its own number. If your character touches these entities the server will connect (in a separate thread as not to interupt gameplay) to the MySQL server, look-up what server that link connects to and update the player data in the MySQL server. Then the server informs the client and the client will disconnect and connect to the new server. The new server will contact the MySQL server and retrieve the player data and spawn the player at the corresponding point on the map for that link.
What works right now? At the moment connections to the MySQL server in a separate thread work, but only for linux. I haven’t been able to compile the required libraries into the project under windows. Informing the client works as well. The client disconnect and connects to the second server, but sometimes in the past there have been “snapshot” errors. I think this happens because I try to “hop” too fast after joining/spawning on my very small test map. The second server doesn’t yet retrieve the player data and spawn the player correspondingly. That should be next.
The problem is, as usual, there are so many other fun things to do as well. As it is I haven’t looked at it for about 7 months. And instead of having it sit on my computer I thought I’d post here and put the code up at github for people to look at and maybe do something with it. I thought it might motivate me to pick it up again myself. The problem is that I don’t know if I’m allowed by the SDK license to put the source code up at gitweb. The Doom3 engine is now open source, so I don’t think that it would be a major problem, but doesn anyone know?
Anyway, any feedback would be much appreciated!
/RedFox