Hi,
I’m trying to use the Advanced Steam Sessions plugin to make a peer to peer game which doesn’t require port forwarding.
I’ve followed the tutorials, but instead of creating a server browser, I simply join through the friends list. My friend and I have unreal installed and the same project, managed with GitHub.
We both get
LogSteamShared: Display: Loading Steam SDK 1.57
LogSteamShared: Steam SDK Loaded!
When starting the game, implying that everything works.
Creating a session is done like this (in a class inheriting “Advanced Friends Game Instance”)
And joining a session is done like this:
When testing (running as standalone, and ticking “play as listen server”; side note, is this necessary?), there is no problem creating a session (the player gets moved to the proper map and the string gets printed). However, when trying to join, we get the “Joined xxx’s session!” message, implying it worked, but the map doesn’t change. The Steam overlay works properly and allows us to invite each other in the game.
This leads me to think that the game is using the wrong net driver (IP instead of Steam), which would require a port forward to join the other player.
My DefaultEngine.ini contains the following
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemSteam.SteamNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
; If using Sessions
bInitServerOnClient=true
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
When starting the game in the editor (not in standalone) to get output logs, I get
LogNet: ReplicationDriverClass is null! Not using ReplicationDriver.
LogNet: InitBase GameNetDriver (NetDriverDefinition GameNetDriver) using replication model Generic
LogNet: Name:GameNetDriver Def:GameNetDriver IpNetDriver_0 IpNetDriver listening on port 17777
Which makes me think it’s not using the Steam net driver.
Could someone please explain what’s going wrong?
Thanks!