Can clients switch between different maps ?

Hi,

Is it possible for the clients to jump (separately) back and forth in every available levels ? (think of an mmo with different continents, or with outside world / inside buildings, etc.)

Can the server follow everything that is going on ?

What would be the best strategy to achieve that ?

So far i have tried my hands on 3 functions:

//UGameplayStatics::OpenLevel(GetWorld(), "World'/Game/maps/NightMap.NightMap'", 0, "");
//GetWorld()->GetFirstPlayerController()->ClientTravel("/Game/maps/NightMap", TRAVEL_MAX, true, FGuid());
//GetWorld()->ServerTravel("World'/Game/maps/NightMap.NightMap'");

using local calls, then client-rpc, then server-rpc, trying various values of ETravelType among the 4 available, trying references, full path and simple name for the levels.

Not sure i exactly tried every possible combinations though (some work partially, some give crash…), so maybe i missed the right one.

Also, I couldn’t test GEngine->LoadMap because i could never find a way to have it compiled. Maybe it is the one ?

The best i could come up with was this:

void AYagMenuWelcomeHUD::LoadOneMap()
{
	GetWorld()->GetFirstPlayerController()->ClientTravel("/Game/maps/WelcomeMap", TRAVEL_MAX, true, FGuid());
}
void AYagMenuWelcomeHUD::LoadOtherMap()
{
	GetWorld()->GetFirstPlayerController()->ClientTravel("/Game/maps/NightMap", TRAVEL_MAX, true, FGuid());
}

Those functions are called from within my HUD on button click for test purposes.

Clients and server can switch map, but as soon as they teleport, they loose trace of each other and i end up with several single player games.

Not sure i am using the right strategy, so any pointer is welcome.

Thanks

Cedric

yes. The client can change it’s map in mid game.

no. The server will not follow and simply disconnect the client. if he changes map

the best scenario for mmo is to either use multiple servers with different maps and clients connecting to them separately

another scenario if the world is very small is to use level streaming volumes