Load an individual map for each player in a multiplayer game

Hello, i’m trying to load an individual map for each player in a multiplayer game and it’s not entirely clear how to do it, at first I just used the “Open Level (by Name)” node it works, but at the same time the client-player becomes the server-player himself.
Can someone tell me how to do it better?
I need a joint game, but I don’t need one player to see the other, but I need data exchange between them.
Thanks.

Hi there,
Not sure if I understood correctly, but if each client calls the Open Level node, they will create difference game sessions, thus they won’t co-exist in the same game instance. Perhaps you want to spawn each player far away from each other in a large level. That way, you have the same game session running.

But he can use 4 “maps” in same Level, so simply Players are separated by empty space instead of different Levels - I am not sure if it’s possible to open a different Level and still exist in the same session

Especially because your Client Controller is gone from your Level

But I cannot tell as I simply don’t know that I just assume that’s not really possible at least for the Host-Server, maybe someone will expand my thought - f.ex. if it would make a difference for a Dedicated Server where you run a file that is the Server and it operates everything and maintain all existing Players? Probably yes

So if nobody will be able to give a hint for Host-Server for your matter - go for my workaround instead where you will place them on the same Level but in different spots

You can also make so called Level Streaming and stream in only the Level the Player was spawned to respectively for everyone, for the sound matter - Sound Base Mix and some more related BP’s in that section will help you prevent hearing certain sounds from desired area

1 Like

No, there are several rooms in the game where players do not see each other and are not in the same room at the same time, but they can change something in it for all other players. I want all the changes in the room to be saved in variables on the server, and when another player went there, these variables were loaded.

Looks like you want a session played at the same level. Each room can be a sublevel, but this is a different story, as part of level streaming logic.

3 Likes

So you would just need one level put all your rooms there and teleport the players in / out and if some of the rooms are visible for others while a player should be inside just hide the actor for them. No need for separate levels I guess. Hope that helps.

Yes, I understood the logic, although I hoped that there were some more global links in multiplayer, because if the rooms are large enough and there are a lot of them, why load all this to one map?

Yeah that’s true, in that case, go with level streaming or make the rooms as blueprint actors and spawn them when needed this way the map would be as small as it can be :slight_smile:

But Level Streaming would still be the best solution :slight_smile:

2 Likes

Exactly what @SevenOperation said above

Level Streaming also gives you the possibility to quickly load new map and later other things instead of “all at once” and get the long freeze

This can be further used to make a Loading Screen as well :sparkles:

2 Likes