Hey, I was under the impression that I could use Steamworks (which has NAT-punchthrough) to gather players in a lobby, exchange IP/port, let one player host a server with Godot's High level multiplayer, and then finally connect the other players to the server. So basically just use Steam as a middleman to avoid port-forwarding, and then use Godot's nifty High level multiplayer.

The first part, creating a lobby and connecting players, works like a charm using GodotSteam. Then, I thought I could just ask Steam for the IP/port of the players in the lobby, but after googling for hours I can't find out how. Was I naive in thinking that Steam would just hand those over to me? I hope I just missed something.

Is what I'm trying to do not possible? If so, I can only think of three alternatives, none of which I like.

  • Don't use Godot's High level multiplayer and only rely on Steamworks' sendP2PPacket/readP2PPacket. Not only does that make the networking more complicated, but the entire networking is tied to steam and I can't release (one can dream) the game anywhere else.

  • Don't use Steamworks and only rely on Godot's High level multiplayer. That'd be great, but releasing a game in 2020 that requires you to enter an IP address and mess around with your router settings is laughable. Noone wants to do that.

  • Use Godot's High level multiplayer, and develop/host/pay for my own master server with NAT-punchthrough. Oh god...

Please tell me that I'm just stupid and you absolutely can use Steam as a mediator. I really don't want to completely tie my game to Steam and not use Godot's awesome High level multiplayer.

Thank you for reading :)

Welcome to the forums @Gjallar!

Perhaps GodotSteam can be modified to provide the IP addresses? I would bet the IP is stored somewhere in the plugin, so it might just be a matter of making a small modification.

I remember seeing a NAT punchthrough GDScript project, but I went looking for it and couldn’t find it. I’ll look again later though.

I’m not sure on how to establish a server list with Godot, nor how to poll a list of severs with Godot’s high level multiplayer. Using GodotSteam might be a good way to work around the sever list issue, though it still has the issue of IP addresses.


Also: Please see rule #8 on the forum rules. I removed the swear word by replacing it with a non-swear alternative.

Thank you, and sorry, I'll wash my mouth with soap.

So I found this 'Steam Matchmaking & Lobbies' paragraph on the Multiplayer Steamworks docs where it says "The lobby system is most common when you have players get together before actually starting the game session. Matchmaking and lobbies do not provide networking features, you'll want to use something like Steam Peer-to-peer Networking or Steam Game Servers, or the networking that your engine provides along side." So clearly what I'm trying to do should be possible somehow, that's a relief.

I would ask on the Steamworks developer forum but sadly that requires developer access which I do not have :/

3 years later
9 months later

Hi @Gjallar I know it has been 3 years but do you have updates on this topic?
Your last comments seems really interesting where you talk about the fact that Steamworks only does the lobby-creation-part and you have to do the netowrking yourself.
Especially with Godot 4's new Networking features this seems very doable.

    3 months later

    Ppanter I second this, would be extremely useful if possible as Godot 4's networking makes it really easy to prototype features and is a blast to use. Would be insane if it was easily usable with Steam's systems. Keep me updated!