Reputation: 39
I've created a 2 player Unity3D game on which I implemented a Server/Client model (using TCP sockets) in order to make it playable by 2 people. By opening 2 instances of the game on the same machine and setting IP to localhost it works just fine (well actually it does not, the game freezes randomly at some point) but if I try connecting 2 machines which are on the same WLAN (and have the same IP addesss according to wheresmyip.org) it does not work. Should I be changing some setting in my router (similar to port forwarding and such?). Thanks!
Upvotes: 0
Views: 84
Reputation: 48
for the "freeze" you must lower the number of query sent each sec for the ip you must set the local ip, to get it you have to: start -> cmd -> ipconfig and then you'll have an ip with something like 192.168.X.XX or 10.33.XX.XX
on the client post you must set the ip of the server and not the public ip
About the router setting it's only if you whant to have your game accessible from "outside"
Upvotes: 1