Game Rooms/Dungeon Instances in MMO

drawmaster77
edited January 2012 in Photon Server
How would I go about creating these? I.e. like in WoW I have one big world, and players can assemble small parties and enter some dungeon instance detached from outside world. What architecture should I use for that? Should I create a new world for each dungeon for example?

Thanks!

Comments

  • no, but you will need a cluster for such stuff. But first I would care about the rest of the game. players won't go into dungeons if there is no base content to enjoy to even 'build up interest for party dungeons' and I'm sure once you worked out the details on how to handle the world with a cluster of servers (multiple servers handling one world) the dungeon handling will be a 'self answering question' basically
  • Thanks, I am just trying to see the general picture now. So dungeons are handled by separate servers? Is there some API in photon to do that? Because basically I would need to create new server everytime somebody enters a dungeon? This is alittle confusing. Perhaps I could use something like rooms in lite instead?

    Also Ive been going through MMO demo code, and I am alittle confused on the concept of Worlds. There is MmoWorldCache class that has a collection of worlds, I though there should be only one instance of world? Also MmoPeer has a OperationCreateWorld function which creates a new world and stores it in MmoWorldCache. How can a client create new world? I am not following the logic here. Shouldn't the world be already created like on server startup or something?

    Thanks again for help!
    -mike
  • In general if you have a large continous world you will host it on more than 1 server, already for the open world itself. To pick up the WoW example: each continent is handled by at least 1 distinct server, PVP battlefields are distinct servers, Dungeons are distinct servers, ...

    As such if you have the infrastructure in place for handling an open world, then handling dungeons will come for free (cause its simply a matter of Interest Area management among a few other things)
    You can naturally use the new world function to create such dungeons too (can't comment to much on that, only worked with a single world so far) and then move them around and back later, that should be rather trivial, but the server load problem, the resulting RAM requirements (game server + DB server - which you nearly granted will keep seperate so you can grow the DB to a db cluster - easily hit in at 64GB+ RAM to work performantly for a successful realtime MMO with a 4 figure CCU) and 'whole world down if one server goes down' problems don't go away with it.

    What you naturally can do is keep the continous world on one photon server and have the dungeons on another photon server on a different machine /vmachine. That would work too cause you don't need to transfer peers etc, you can make the clients reconnect during the loading screen. As all their data etc is stored in the db anyway, that goes through for 'free'


    And no, Photon MMO has no multi node scaleability, thats a thing you would need to implement yourself at the time.
  • thanks dreamore, that clarifies this abit.


    What about my other question on the MMO code?
  • Which of the questions would this be? Guess I either missed it or assume it to be covered in the answers.

    Unless you mean the world, which is fired up upon request (if there is not a single player in the world, why run it? Would be as if WoW simulated zones with no player in, which is not done. Simulation is limited to the proximity area of human players)
  • oh here its, I am just trying to understand the logic behind this:

    In MMO Demo code there is MmoWorldCache class that has a collection of worlds, I though there should be only one instance of world? Also MmoPeer has a OperationCreateWorld function which creates a new world and stores it in MmoWorldCache. How can a client create new world? I am not following the logic here. Shouldn't the world be already created like on server startup or something?

    I thought like you said above that world is only created when at least 1 player enters it, but then why is there a MmoWorldCache? Why not have it like singleton instance or something?
  • You can have more than one world if you want.

    Dungeons or instances in general might be a good idea for worlds so you don't have to manage the IA overlap problem yourself (as IAs are position based and as all instances ahre the same coordinates that would not work without manual management of IA and 'dungeon groups'). Also continents like in WoW would be different worlds cause the coordinates of the worlds must remain in the +- 50'000 range at very maximum (due to float precision limitations in unity or realtime engines in general) so all continents would be centered around 0 points.

    For that reason there is a need for the cache, cause if there is more than 1 world going on at a time, they need to be managed and reside somewhere. But a ExitGames employee might have more insight on the exact idea behind it.


    A new world is created when a client connects, you pass the world name along your connection request. When the world is not found, its created.
    So when you enter an instance of some kind you would then disconnect from the previous server and reconnect with the name (would add a server operation to provide a new name). The disconnect and reconnect is normal by the way thats what all games do. either directly or behind curtains (through server redirection behind the cluster front proxy), this reconnect is normally hidden behind the loading screen which takes 10-100 times longer than the reconnect itself.

    And no, worlds are not created at startup, if nobody is connected. As mentioned that would be a total waste of performance and system resources. You don't simulate a world that nobody is interested in at all (and nobody connected means nobody is interested), its not like the world goes on without players in at least not in all regular MMOs unhappily (they have no real persistent worlds, they have persistent player data in a temporal, prescripted world). To achieve a halfway payable MMO (hardware cost wise) the world only is simulated and execute in the area around players, the rest of the world simply ceases to exist and execute on the server, thats at least what you want to implement then.

    Keep in mind that photon offers you the networking and interest management (so only networking for your proximity and other objects proximity happens), it does not offer you the rest required for an MMO which is 90%++ of the code.
  • Hm but all of these worlds are managed by the same server.. dont they need like different proprties, items, NPCs, some special functions, etc..

    I guess I am just alittle confused how MMO sample has the OperationCreateWorld which just takes world bounds sent in by client and creates a new generic instance of a World class. Doesnt that need some more info on what kind of world, items, props etc.

    So for example if I have my dragonDungeon & undeadDungeon being completely different dungeons with different maps/monsters/etc, whats the good way to code that? Do I create derived classes from World, and player entering a new instance of one of these would execute some dungeonFactory to create a correct instance of each? Or am I misunderstanding something?
  • Right it will need more information but thats game logic you will implement.

    Photon only manages the network traffic optimization (Interest Area) the whole game logic is up to you, there is no general basic MMO backend that you can expand in details to get a fully working MMO (such technology exists, costs 5-6 figure per title and continent to license)
  • cool well thanks alot for help man. I was just asking these questions so I dont end up coding for 2 months only to find out that I completely misunderstood mmo architecture and have to re-write all of it. I plan to start with a tiny world, but that would be easy to expand code-wise if I need to add stuff like dungeons etc.