Server doesn't open to game in UE 4.26

I can’t move on in the course because the server command runs, but doesn’t open a window to the game. Only the client opens a playable game and it doesn’t show a character representing the server as shown in the “Meet the Client-Server Model” video. These are the commands I’m using:

"D:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64\UE4Editor.exe" "D:\Users\sam\Documents\GitHub\puzzle-platforms\PuzzlePlatforms.uproject" /Game/ThirdPersonCPP/Maps/ThirdPersonExampleMap?listen -server -log

"D:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64\UE4Editor.exe" "D:\Users\sam\Documents\GitHub\puzzle-platforms\PuzzlePlatforms.uproject" 192.168.0.20 -game

Hi there Reticulan, Welcome to the community.
Just want to check a few things here.
When you launch the server, check the console and confirm the port and IP address it is using. It shows somewhere in the log. Sometimes you have to specify the port number for joining the server too. I believe the default is 7777.

Also, do you have VR Enabled? if you have had a VR headset connected, even if currently disconnect, this will cause UE to add the SteamVR Plugin into your project and this can interfere with launching multiple windows, and shuts down the one that is open. If so, in the editor disable both SteamVR and Oculus plugins and try agian.

Give those a try and see how you get on.

I checked the VR plugins and noticed that Oculus VR and Steam VR were enabled even though I’ve never used VR. I disabled them and restarted the editor. I also tried including the port. When I launch the listen server, the console log says:

GameNetDriver IpNetDriver_0 IpNetDriver listening on port 7777

so I use the following command to attempt to launch a client:

"D:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64\UE4Editor.exe" "D:\Users\sam\Documents\GitHub\puzzle-platforms\PuzzlePlatforms.uproject" 192.168.0.20:7777 -game

At this point, I have the same result as before. The server command opens a log but not a game. The client command opens a game and there is only one character in the scene.

Then it’s working. -server is a dedicated server.

the game then launches and joins a server. You can launch a second instance with -game and it will also connect and you should see 2 players

So is there no way to have a playable server like when you select “Play as Listen Server” under Multiplayer Options > Net Mode? I was under the impression that adding ?listen to the end of the map name would do that.

1 Like

The ?listen does this but not with the -server switch which creates a dedicated server.

I understand now. Thanks for the help!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.