[WiP] Proof-of-Concept: HopServer functionality


(-RedFox-) #1

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


(light_sh4v0r) #2

Cool idea, but I don’t really see a useful application for that?


(maggol) #3

i think it will be useful, if there is a mod that have some sort of branching campaign. Where the team that win will continue to next map while the losing team will stay in the map. Like BRINK but more advanced, i think if this Hop Server is fully works


(-RedFox-) #4

Well, the original idea was to create a “world” by hooking several maps together. Other player data can be passed from server to server while a player hops, like health etc.

On the other hand, in line with maggol’s suggestion, you could easily make something where one server acts as a sort of “lounge” where you can just hang out in a waiting area and different “corridors” (or whatever) lead to different servers. These servers wouldn’t even need to be running the same mod, they would just see connecting players like they would normally.


(taw_m0nsta) #5

Interesting for tournaments with lots of teams (with random/auto-join players?) and no organization/planning/schedule.

These days there are only a few clans that have 2 or more servers. If you look at the active player (pub) numbers and the active (Promod) tournaments/competition you should understand this idea is way too minimal and and 4 years too late to make any sense.

Also, creating a new world would require you download custom content, which is a little pain in the ass (game needs a restart 2 or 3 times)

Maybe useful for a mod that becomes extremely popular in the future, but I highly doubt thats ever going to happen.


(.Chris.) #6

It’s a proof of concept that can be applied to other games.

With a “network” of servers running such a mod and a series of maps using this idea you could create a very interesting dynamic campaign mode.


(taw_m0nsta) #7

I understand, and if am correct this is how (sort of) MMO’s work. Instead you get a scoreboard and ‘loading next campaign’ screen, you notice 1 tiny lag meaning you are moved a few miles further big world, or you do get a loading screen meaning you are portaled to another sector which is part of the big world (server instance). I know promoting another game isn’t quite charming, but i am looking forward to check out PS2, a FPSMMO, 64sqkm x 3 (6000 players, 1 server (well probably its a huge rack).


(-RedFox-) #8

Yes, that is basically what my original idea was. But it shouldn’t be too hard to implement some kind of HopServer functionality that is based on the outcome of a map.

Still no word on whether I can upload the SDK source to gitweb though…


(Susefreak) #9

It’s feely available, I guess they won’t make a fuss about it


(-RedFox-) #10