Instances - How to create them?
by Kiyaku · in Technical Issues · 10/14/2008 (1:06 am) · 2 replies
Hi there,
i was somehow wondering about how instances work. The easiest way would be to start a new zone for every group of player that enter the instance so they can play in this zone on thereself. But somehow i can't believe that this is the way to do it. If there are 30 groups going to the same instance, the server would have to create 30 zones (which are 30 dedicated servers as far as i know). This sounds kinda too much.
Also there are not only group instances with bosses and such. In Tabula Rasa for example you can enter rooms where you are all alone. Or in Everquest 2 you can have houses where you are all alone too.
How would you archive something like that? I can't find a good way to do so.
I'm not requesting a code, just trying to find a way how instances work in general.
Thanks in advance.
i was somehow wondering about how instances work. The easiest way would be to start a new zone for every group of player that enter the instance so they can play in this zone on thereself. But somehow i can't believe that this is the way to do it. If there are 30 groups going to the same instance, the server would have to create 30 zones (which are 30 dedicated servers as far as i know). This sounds kinda too much.
Also there are not only group instances with bosses and such. In Tabula Rasa for example you can enter rooms where you are all alone. Or in Everquest 2 you can have houses where you are all alone too.
How would you archive something like that? I can't find a good way to do so.
I'm not requesting a code, just trying to find a way how instances work in general.
Thanks in advance.
#2
You pretty much nailed it on the head. Basically in the back end you are spawning a copy of the zone for managing each instance. It may sound like a lot of overhead, but that's how it's done.
Perhaps there have been changes in the concepts over the past couple of years that makes it more efficient, but instancing has it's computational benefits too... Having 10 instances keeping track 100 players each generates considerably less network messages than 1 instance tracking 1000 players...
Keep in mind that the instance servers for most MMO's are large farms and not one box and that's per shard/realm...
10/30/2008 (8:40 am)
Kiyaku,You pretty much nailed it on the head. Basically in the back end you are spawning a copy of the zone for managing each instance. It may sound like a lot of overhead, but that's how it's done.
Perhaps there have been changes in the concepts over the past couple of years that makes it more efficient, but instancing has it's computational benefits too... Having 10 instances keeping track 100 players each generates considerably less network messages than 1 instance tracking 1000 players...
Keep in mind that the instance servers for most MMO's are large farms and not one box and that's per shard/realm...
Torque Owner TheMartian
Conundrum Studios
lets say that public area fills up (say 100 people) the system might spawn another public map (like city of heroes) or just get slower and lagged out (like most of the mmo games that create hotspots like that).
on the flip side you might have private instances that are spawned just for you or your group.
a small instance like that does not necessarily mean a single machine, often times you can run
a bunch of small instances on the same physical box.
this is typically done for private missions/quests or group missions.
it is common that once players leave that private mission/quest the instance is shutdown to free up
resources.
so these private instances are coming and going as needed and the public ones are left up and running.
thats a very broad, high level view, there are lots of details, different implementations, reasons for to spawn an instance, etc, but thats pretty much the jist of it.
if your going to have lots of instances and private areas, they generally need to be small and cpu/memory efficient coupled with a dynamic system to spawn and shut them down as needed to keep from
overloading your available hardware.
game play needs to try and keep everyone from needing to all be in a public map or all spread out into private rooms, usually because you have fat dedicated hardware for the public areas and a pool
of hardware for the dynamically spawned instances.
in a typical design if you overload either one (public or private instances) you run out of hardware and things run badly. (different designs and resource utilization cause your results to vary).
for houses its common to handle them as small private instances that are spawned when you decide to go visit your house (other designs like swg and uo tried to put them in public areas which caused tons of problems). a private instance is easier to manage and can be more efficient in terms of hardware utilization.
anyway, hopefully that gives you an overview of a few things/ways that instancing is used/handled.