Multiplayer with World Composition not working?

Trying to make a multiplayer game work using World Composition.

I am stuck unable to load the parts of the map, or terrain, the that clients want to experience.

I am testing the game using “Play → New Editor Window”, “Number of Players: 3” and “Net Mode Play as Listen Server”.

I am using Steam for the host/client connectivity.

If I play my game level, Level1, the terrain loads fine. See below:

If I run my game with my Intro map, MainMenu map and Lobby map I happily get to the ready to play the game as shown below:

Pressing “Start Game” does the following:

image

The result I get is as follows where the host is the top left and the bottom and right are clients:

What did I do wrong???

My “World” settings are as follows:

My world is broken up into 8x8 slices as shown below:

Recommendations as to how I get past this issue???

World Composition doesn’t work very well in PIE mode, try running the clients as standalone. Also tick Client Side Level Streaming Volumes in world composition settings.

Yeah so “Client Side Level Streaming Volumes” did not help in PIE mode.

Running the game as standalone does not have this issue.

So it appears whatever I have done, PIE doesn’t like it…

Some more info… …in regards to the “Play”, “New Editor Window (PIE)”, “Net Mode”, the outcome is the same regardless of what I set for “Net Mode” in that the images in the original post still occur.

I noticed that all Level1 persistent objects/actors load; however, both the terrain and level streaming levels are not loading. Could this be a clue?

Also, when I move around from a client perspective I am “walking” on the current terrain; however, the client cannot see it. This would imply that the server is aware of the terrain; however, the client isn’t. Yes??? Another clue???

Same is true for my “StartingPoint” level in that objects, a barrel for example, can collide into the Client’s pawn; however, it is not visible/seen from the client’s perspective.

Thoughts?

OK. So I claim Multiplayer, where the Host is the server, is broken with respect to level streaming with World Composure given 4.26.2.

What happens is that when the clients enter a level that is not loaded by the host/server the client loads the level; however, the server does not. Thus, if this is your terrain, the client, or clients, fall thru because the server “is king”. In addition, if there are things like houses, and the such, which show on the client; however, are not loaded on the server, the clients can just walk thru them because, on the server, they do not exist.

So… …luckily, you can assign each level to “On Demand” which turns off the built-in level streaming such that you can write your own.

Now… …writing my own level streamer… …I thought this would fix this issue since I am in control of the levels loading, or not; however, it didn’t???

Kind-of shocked, I dug deeper and discover that in PEI, for some reason, the level name on the host/server cannot be found on the PIE clients?!?!?

For example…

LogBlueprintUserMessages: [MyGameStateBase_C_0] Server: Player:0; X=-42912.734 Y=-28903.049 Z=-13666.859
LogBlueprintUserMessages: [MyGameStateBase_C_0] Server: Player:1; X=2062.312 Y=-9475.986 Z=-15572.517
LogLevel: ActivateLevel /Game/Maps/Level1/UEDPIE_1_Encounter2And4 1 1 1
LogStreaming: Display: ULevelStreaming::RequestLevel(/Game/Maps/Level1/UEDPIE_1_Encounter2And4) is flushing async loading
LogStreaming: Display: FlushAsyncLoading: 1 QueuedPackages, 0 AsyncPackages
LogLevel: Warning: Failed to find streaming level object associated with ‘Encounter2And4’
LogBlueprintUserMessages: [MyGameStateBase_C_0] Client 0: MulticastLoadStreamingLevel:Encounter2And4; GetStreamingLevel is NONE?!?!?
LogBlueprintUserMessages: [MyGameStateBase_C_0] Server: MulticastLoadStreamingLevel:Encounter2And4; loaded=true
LogBlueprintUserMessages: [MyGameStateBase_C_0] Server: Player:0; X=-42912.734 Y=-28903.049 Z=-13666.859
LogBlueprintUserMessages: [MyGameStateBase_C_0] Server: Player:1; X=2062.312 Y=-9475.986 Z=-15572.517

What?!??!

If I run the game in standalone, it works fine in that the clients and the host/server seem to be loading levels correctly.

So how are the streaming level names changed from the client’s perspective?

If I could figure this mapping out, I most likely can solve my issue.

I solved my issue!

My “solution” is two fold…

…background… …multiplayer, world composition, listener server with one of the 4 players as the host/server., 4.26.2…

  1. I had to write my own level streamer. Disabled the world composition level streaming by setting each level to “OnDemand”. The new level streamer checks all players, clients and hosts, for levels that should be loaded and loads them. In addition, the new level streamer checks to see if any given level has nobody (clients and host) wanting to load that level and if loaded, it unloads that level.

  2. Turns out PIE NEEDS at least one (tested 4) fully qualified path to some level stream for “Load StreamLevel (by Name)” to work for the clients. I claim, in addition to the built in level streaming not working for multiplayer, that the levels tab for world composition is also broken with respect to PIE in that all of the identified levels tab are not fully qualified. Given this, not only do you need your own level streamer but you need to specify your streaming levels using fully qualified paths for PIE to work correctly.

Note, I found a random web link which suggests that specifying the fully qualified path is faster than not since it doesn’t have to search the hard drive for the actual location of the streaming level file. Unverified but seems reasonable…