I thought I understood how networking worked, but clearly that was wrong. I had been testing my relatively simple game using PIE and 2 players (one as listen-server) for the longest time and having no problems. Recently I decided to create a “ready up” process that allows the user to set some client side properties and hit ready (sending the properties to the server in primitives). This process worked just fine, but I didn’t like how the “ready” location was the same location as the actual game, so I created a second level. After moving the ready functions to the new level and adding a ServerTravel call to the game world, I learned that ServerTravel doesn’t function in PIE. I tested the game in standalone and sure enough the ServerTravel works but it’s almost as if the client is disconnected from the server. It no longer prints out the AddOnScreenDebugMessage calls from the server (and vice versa for the server printing the clients messages) and after the ServerTravel the PostSeamlessTravel function is called for both playercontrollers on the server (but information set by the client is not sent to the server like it’s supposed to be) but not for the playercontroller on the client. The client does travel to the new map though, which is good.
As a result my game does not function as expected on the client (it functions fine on the server). I expect the majority of my problems stem from the playercontroller not properly carrying over in the server travel, since a lot of my variables are stored there, but they are set to default values in the client’s game instead of what they were set to in the ready part. Also, when I close the game on the server, the client resets back to the ready stage. Previously, if I closed the game on the server, it would close the game on the client as well. In fact, the client becomes a listen server and functions normally. Lastly, I tried to test the game in PIE like I used to (just to see if the debugs would print like I expect) but for some reason the server loads the game in PIE like expected while the client loads the game in standalone mode still. Debug messages are still not printing as I expect them to.
If anyone has any insight on how to debug this, I would appreciate it. It almost feels like it’s a problem in my project settings rather than the code itself, but I have no clue. I’m not sure what to look for in the log files as far as ensuring the client/server are properly connecting and figuring out why the client’s playercontroller is not travelling when the client travels from the ServerTravel call.