theCapypara / GMnet-ENGINE

A multiplayer/networking engine for Game Maker Studio
https://gmnet-engine.org/
Other
77 stars 21 forks source link

Two devices connected to same wi-fi router cannot connect through UDPHP #36

Closed tspvivek closed 8 years ago

tspvivek commented 8 years ago

I tested the demo project and when my devices (server and client) are connected to internet through different router, the online lobby is working perfectly fine. But when my devices are connected to same router, then the client is unable to communicate with server. Please help me with this issue.

The-any-Key commented 8 years ago

You need upnp or port forward for this. Upnp will be working in the future in this engine.

But if you are on the same router you can use the LAN lobby that work in the current engine.

tspvivek commented 8 years ago

LAN is working fine. Good to know that Upnp port forwarding is coming in future. Is there a way i could fix this by configuring my router? Just for my knowledge :)

The-any-Key commented 8 years ago

You can manually port forward the server port (6510) to the computer that got the game server running. Try accessing the router via chrome or explorer. You need your router's IP. Not the external IP. Some router's got 192.168.1.1 or 192.168.0.1.

You can also try this program that use upnp to port forward on your router. Start the program on the computer that will host the game and connect with your router and add TCP and UDP 6510. https://sourceforge.net/projects/upnp-portmapper/files/latest/download

tspvivek commented 8 years ago

Thanks, I configured DMZ settings in my router to forward all packets with unknown port to my server's IP and works well now. I am now able to run two instances of my game in same PC and use them as client and sever.