So…this works…however…Now I have to do something that I feel like is not the right way to do it despite it now working.
Hopefully someone can give me some advice. (My game is Blueprints Only)
Relevant Plugins Enabled:
- Online Subsystem Steam
- Steam Sockets
- Advanced Steam Sessions
Relevant DefaultEngine.ini settings:
[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/SteamSockets.SteamSocketsNetDriver",DriverClassNameFallback="/Script/SteamSockets.SteamNetSocketsNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
bInitServerOnClient=true
bHasVoiceEnabled=true
PollingIntervalInMs=20
[OnlineSubsystemSteam]
bEnabled=true
bInitServerOnClient=true --I candidly have no idea wtf this does, saw in another post
bUseSteamNetworking=true --I candidly have no idea wtf this does, saw in another post
bAllowP2PPacketRelay=true --I candidly have no idea wtf this does, saw in another post
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName=OnlineSubsystemSteam.SteamNetConnection
Given all that, I have this currently working on UE5.6:
- Player A Hosts a Server
- Player B can join Player A’s server
- Player A starts the game and sends everyone that is a client to a Transition Map
- When all clients are gone, Player A does “ServerTravel” with Seamless Travel enabled to the game map, and then all clients rejoin the server.
- Game ends, and then Step 3 happens again. Clients are kicked to a Transition Map. Server Seamless Travels to the Lobby Map. Clients then rejoin the server
This was working the exact same in UE5.5 (I wasn’t using Steam Sockets), but I was using “Open Level” with “listen” (which felt cleaner), and I never used ServerTravel.
Anytime I try to use Open Level WITH or WITHOUT “listen”, the server gets kicked to the Menu:
SteamSockets API: Error Cannot create listen socket. Already have a listen socket on P2P vport 7777
Only ServerTravel seems to work in UE5.6 for my specific scenario, and ONLY if Seamless Travel is enabled. The error only kind of makes sense. Is the default code really unable to ignore the duplicate listen socket error? Does it seriously have to just crash to Menu?
I prefer that my clients are loaded to a Transition Level before the match starts, so I’m not really interested in having them all travel together to the game map.
This is just word vomit at this point, but if anyone has any alternative advice let me know.