We are making a 2 player game, using a Client/Server architecture and need a way to connect over the internet.
Connecting in the same network is no problem and works flawlessly. Will it be a lot of work to implement a way to connect online, that players can use (so nothing where they need access to the router settings)? And how would it be done?
I couldn't find a single tutorial or thread talking about this. They all just connected to the localhost.
(using gamemaker studio 2 and it's built in tcp networking functions)
The server regularly sends broadcast packages to all ip's, while the client reads their origin ip and can then connect to said ip. They both are on the same subnet so the adrress is 192.168.0.xx.
I also have a way to get the public ip (95.xxx.xxx.xx) using a http get from ipv4bot.whatismyipaddress.com. But when trying to connect to the server, using the public one, I't won't connect (doesn't matter if both are on the same network).