An intern has no name An intern has no name - 24 days ago 8
HTTP Question

Forward a port using TCP (or anything else) in Gamemaker Studio

I'm trying to make a global multiplayer game in Gamemaker Studio. But I need to automatically forward ports of the client PC to the router. The only way to do it in Gamemaker I can imagine is by using TCP/HTTP to tell the router to forward the ports. But I don't have any clue on how to do it and wasn't able to find an answer on google.

Is this possible ? And if yes, what messages to send ?

Answer

The protocol that is usually used for automatic port forwarding with consumer routers is UPNP.

There is a Game Maker extension called Faucet Forwarding which uses the miniupnp library to provide forwarding functions. Look into the "library" subdirectory to find the actual extension. However, it was developed for Game Maker 8 and will only work for Windows games. Also, UPNP implementations in cheap consumer routers are often buggy, so it might not work for some of your players.