Unity Networking using Proxy Server.

I’m trying to make a simple turn based board game on Unity that is playable online. However, NAT punchthrough doesn’t seem to work in most cases while trying to connect players. The documentation seen here - http://docs.unity3d.com/Documentation/ScriptReference/Network-useProxy.html - talks about using a proxy server to connect players. How effective is this solution? Does it guarantee at least 95% connection success? And also, I would appreciate it if someone could guide me in setting up the proxy server correctly for use with Unity.

Unity provides a proxy server here http://unity3d.com/master-server … then you just have to add…

	Network.proxyIP = PROXYIPADDRESS;
        Network.proxyPort = PORTNUMBER;
	Network.useProxy=true;

Does this solution ensure connectivity between users most of the time? Or are they still required to port forward? What are the limitations of taking this approach?

I haven’t used it, but I would imagine it gives near 100% connectivity.

However, the cost of hosting a Unity proxy server is almost certainly going to be significantly higher than the cost of hosting a scriptable web server. Your game’s communications probably boil down to at most a dozen message types, all with simple payloads, so the effort involved in coding the web-based server and the Unity interface to it will be minimal. You can probably pick up something cheap on the asset store too.

With all the tests I’ve done using Unitys master server, as long as you put !Network.HavePublicAddress() when you initialize a server, it always works when registering in Unitys master.

It always does register on the masterserver, yes. But when you PollHostList() on client and try to join one of the registered games, it almost always fails to achieve NAT punchthrough without proper port forwarding being done! I’m going to try setting up the proxy server today. Will get back after trying it out.

Hmmm… I will look at the asset store. From what I’ve seen most people seem to be using smartfox/photon. But at a starting price of 800euro for unlimited users, its a bit on the expensive side for our budget!

eanvith:
In case of Photon you don’t have to buy a unlimited license right away. Start with a lower license and upgrade when you got the players and some income. Get in touch with us if you want to test with unlimited users.
Actually, for up to 100 concurrent users, you would only need the hosting.