Game Development Community

How to run multiple maps simultaneously?

by Tuanlucky · in Torque Game Engine · 05/15/2006 (1:25 am) · 4 replies

Hi,

I am trying to make MMORPG game. I am thinking the way run multi servers for each map. But that is not a good idea because my game may have about 20-30 maps.

If I run multi servers. I will face some problems:
_ Do I have to open a new port for new server connection or just use existing connection created by another map?
_ How to switch between maps? Do I have to create main server that transfer a player from this server to another server?

Is it possible to has several maps running in one server?

#1
05/15/2006 (5:04 pm)
Without some major modifications, Torque really can't handle multiple maps running simultaneously. Your best bet is to just go with multiple servers, and if you are serious about an MMO, you'll need them anyway.

One of my Torque projects is an MMO, and I've dealt with what you're talking about. What I've done is have a few different types of servers in addition to the Zone servers that actually run the game. Each of these auxillary servers is a Torque instance, that's doing things pretty far removed from actual game play- it's actually a pretty easy way of doing this. Each server type has it's own set of scripts.

Check out Dreamer's MMO tutorial series (do a search on this site for it) if you really want a leg up with MMO's and Torque. His series is really geared toward a single-server solution (at least the last generation was, he just released a major revision that I haven't had a look at yet), but I was able to pretty easily adapt it into a multiple-server approach.
#2
05/16/2006 (12:35 am)
Thanks for sharing your experience.
I had tried Dreamer's MMO tutorial but these tutorials base on single-map server. It is not a RPG style that my expecting. I haven't tried his MMORPG kit yet and dont know he has supported multi-map or not.

I have to go through this big obstacle before go further otherwise my project also deads like your.

Up to now, do you know is there any modification of Torque that can run multi-map server?

I just touch TGE about 3 months ago. TGE network is still complicate for me. Anyone can suggest some guide lines to make a server run multi maps at once.
#3
05/16/2006 (9:26 am)
There's no multi-map server mod that I've found, and I doubt there will be. The problem with a single server running multiple maps is in Torque's architecture. As you probably understand by now (took me a while to wrap my head around this thing), Torque keeps all of its objects in a single comprehensive master list, which is sorted by SimGroups. The problem is that it has no way of knowing what object belongs in what simulation; basically, everything in that master list applies to whatever map you're currently running. This is normally just an issue for client and server separation, but multiple maps adds another variable into the mix. The other problem is that Torque is not threaded (although they added some considerable threading support to 1.4), which it would need to be to separately process those separate maps efficiently. You could, possibly, fix both these issues (and be a hero to the Torque world if it works right!), but for what we're doing it's just not really worth it. It's really easy to simply have separate instances of a dedicated Torque server running on the same machine if you want a single machine to host more than one map. You'll find, though, that you'll reach the hardware's maximum player capacity pretty quick without a lot of optimizations (network and collision, mainly), making the multi-map solution basically a moot point- you'll need to have a separate machine for each map in order to maximize the player count, which is the fundamental problem with Dreamer's MMOKit IMHO.

I have a pending resource submitted that can help you synchronize operations between two or more instances of Torque, PeerConnection, in case you are worried about issues like that.
#4
05/16/2006 (10:15 pm)
Minions of Mirth has a nice example of running multiple servers on one box.