How to create a dungeon for each player on a dedicated server?

I am tring to make a mmo game that each player can create a dungeon belong to himself(something like World of Warcraft). He can invite friends to join him or explore it alone.
So, the questions are:
1.How can I create a dungeon(or instance) from a pre-set level for each player on a dedicated server?
2.How to carry only one player to a new map without taking other players on a dedicated server?

A couple of days ago I thought about exactly the same question :smiley:
What I came up with, although I’m not sure if it would work this way, but I wouldn’t see why not, is to let the person who creates the dungeon travel to the dungeon map and acts as a listen server so that the invited people can follow him.
Basicaly like this:

  1. Player A wants to create a dungeon
  2. Other players on the server can join / mark themselves to join the dungeon as soon as it is started
  3. Player A wants to start the dungeon and opens the dungeon level as listen server
  4. For the other players who were marked to join the dungeon the ClientTravel method in APlayerController is called with the IP-Address of Player A

A downside here is that Player A most probably has to open the corresponding port on his router, so it’s not just “start and join”.

Another option would be to start another dedicated server instance on the server and to connect the players who want to join the dungeon to that server. There it depends on your server how much instances of an dedicated server it can handle, but I think it should basically work.

Thanks for reply.
There still are some problems.
If Player A becomes a listen server, he will be disconnected from the dedicated server. So how can dedicated server know about what happened(like death of boss, pickups) in the dungeon? The Player A may have a chance to cheat.
As Plan B, I have to start a dedicated server for every player who wants to create a dungeon. This sounds too expensive.

When the dungeon is completed and the players are travelling back to the main server the former listen server might communicate everything that happened in the dungeon to the main server, but cheating there is in fact a problem I didn’t think about.

I think so too. It might be fine for two instances, maybe three but you most certainly won’t be able to allow everyone to create a dungeon and have, let’s say nine or ten dungeons running at the same time.
Unfortunately I don’t know of a way to have multiple levels/maps on a single dedicated server alive at the same time, maybe you could use a single level and seperate the main “map” and the dungeons in space but I think that’s kinda dirty and hacky and won’t work for procedurally generated worlds (which is what I am doing). Except you put them on different Z-levels, but I don’t like that one either.

I tried to add a streaming level or a normal level directly by C++ code.
But in both situations, The first one seams to work well, but when I add the second one, it does not show up.
I am trying to figure it out.
I will update the progress if I succeed.