There's lots of games on Steam nowadays (Table Top Simulator, SpeedRunners) that allows people to host their own online multiplayer matches/games without the need for port forwarding.
One thing I thought of of how they do it is they simply have one server that processes all the matches as separate threads.
But then I'm starting to wonder about getting bottle necked.
I then heard these games simply somehow allow TCP to be holepunched through their NAT, getting past the need for port forwarding.
But how in say, C++ using winsock, would one do this? Or GameMaker: Studio? Or just any game in general? How do you allow people to play without port forwarding? What's the process?
I see so many games on Steam do it nowadays it must not be too complicated.
As this question is explicitely related to steam, I think it's worth mentioning the steamworks API, especially SteamNetworking. It allows peer-to-peer connection relaying through steam servers:
https://partner.steamgames.com/doc/api/ISteamNetworking
bool AllowP2PPacketRelay( bool bAllow );
Allow or disallow P2P connections to fall back to being relayed through the Steam servers if a direct connection or NAT-traversal cannot be established.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With