ID:151886
 
I just had an idea of how to manage multiple worlds for games that have a lot of people.

You divide the map of your game into various sections and then there would be a server hosting each one of those sections.

The actual code is the same, but the only thing that is different are the maps. (And the code for the turfs in the map.)

So suppose you went to a boundary at the end of one section that leads to another section, the player would be transferred from one server to another. You would probably need something to fill in the screen while this is being done.

And each world would consist of many different sections.

Given all that and the fact that the servers are being run on good computers with fast connections, would this be a feasible and almost lagless idea for any efficiently programmed game to use?
I had this exact same idea a while ago, and I've been working off it's theory.

The thing is, you wouldn't do this for a small game, because link() isn't exactly a fantastic method to transfer people from one server to the next. It's far from seamless and very noticeable. And particularly useless if people decide to have the prompt telling them they're moving and they opt not too.

Further more, in order to keep everything smooth, you'd have to make sure every version that is being hosted, points to the same RSC file, containing the files necessary for all servers. Just to save time on downloads between servers. preload_rsc IIRC.

Finally, you'd want to keep your files extremely organised, or else a lot of confusion could be brought about.
In response to Tiberath (#1)
Yeah this would not be hard especially if you had really nice servers hooked up to a really fast connection. I think the hardest part would be to actually get over 1000 people to join a game, right now that is about a 1/5 of all the people online and a bunch of those are probably just hosting games. I bet if you made a killer anime game you could pull it off, but who wants to do that.

In response to Soldierman (#2)
I am not expecting to create a game with that many players, but I am just speculating a possible solution to the problem of allowing that many people to play a game at the same time.

I think i might set up a few test environments and have a few people help me out and host different servers and see how it plays out.

Perhaps I can suggest a feature to allow smoother transfer to another server?
In response to Kakashi24142 (#3)
I have been thinking about that exact same idea for a while now.

That's what World of Wrcraft does, right?

And, yeah, I believe it would be fairly easy and satisfying to do/use.

Exact same game hosted in 4 servers-- the only difference being the map being hosted.

Savefiles could get tricky, though.
In response to Totally Unexpected (#4)
Totally Unexpected wrote:
Savefiles could get tricky, though.

Depends how you do it.

My plan is to add another slice to my server, and run four or so DreamDaemon instances off that. So in theory, the game itself is four different .dmb files in the same directory. As such, all the save files are in the same location for every DreamDaemon instance.

If that's not your cake, there's always the option of a MySQL database that's externally accessible from other servers, client side savefiles or a generic save server, which converses with your game servers and handles the savefile stuff itself.
In response to Totally Unexpected (#4)
Totally Unexpected wrote:
That's what World of Wrcraft does, right?

They have three different servers, one for Kalimdor, Eastern Kingdoms, and Outland. It's possible for Kalimdor to crash and boot everyone there while people in the other two regions go about their business.
If I recall correctly, Alathon had actually created something a lot like this. Infact, I've tested it with him.

If you try to contact him maybe he can help you understand this process further.

Haywire
In response to Haywire (#7)
Cool, I'll try that.

As for savefiles, I suggest you have a "tag" for each server and the first part of the tag should contain the map section and the second should contain the world number. Then, when logging into the world (which is really a server that doesn't really have any of the game code, but just redirects to an invisible server which contains the game based on the tag in the savefile, if the savefile exists).
In response to Kakashi24142 (#8)
even simpler is to store the player info in a centralized (or distributed/mirrored) database that all servers running that particular game can access. this also creates the possibility of a player moving from server-to-server, a feature that Alathon's multi-server demo does fairly well.
In response to Haywire (#7)
Thats correct.

The system is designed to be multi-purpose and to work in the same way that an MMORPG works:

Any number of computers can host up to any number of 'game instances', which start and stop as maps are needed / deemed 'idle'.

A single DD instance is responsible for recieving and resolving requests to access a specific map (Basically a map queue) address

The system expects a login server to be the central entrypoint, which then redirects players to their respective map when they load their character. Attempts to log directly into a game instance are rejected.

All data is stored in a MySQL DB for this to work properly: Where clients are, what maps can be loaded, what computers are active, all mobs/objs currently in the game, the map layouts, etc.

All of this works and has been tested pretty thoroughly. Right now I'm working on rewriting a part of it to make it more friendly to implement, as well as writing an administrative tool to manage the system with an easy, wizard-style setup to boot.

For a situation where all maps are always up or there are very few maps / you only have a desire to split a game into, say, 2 or so instances - This is overkill. However, for something larger you'll need to design something to keep track of things such as this system.
This comes up pretty much every day. The fact that you are just now realizing this kind of framework is weird because I'd expect someone I've seen on the forums before to know about it.

Perfectly possible and quite efficient. Regarding smooth transitions from one server to another, I don't know, but it shouldn't be much of a problem or inconvenience.
In response to CaptFalcon33035 (#11)
Lol, I only thought about it now because I was just thinking of how they manage those big MMORPGs.