What are the options here?
Let me first say that the new networking tools are great. It is remarkablely easy to setup a multiplayer game. Syncvars, commands, RPC calls and everything else makes development so accessible, it is truly amazing work!
However… Unity Relay servers are complete crap - in Melbourne, Australia, our games have 350 ping. The nearest server being Singapore.
There is only 3 server locations - Singapore, Europe and America. This is no where near enough coverage, and it means that many of our players will be experiencing unplayable latency. I honestly do not understand how the Unity team thought this would be a viable option at all? x_x Me and a friend play together on our 4G connection sitting right next to one another and we are hit with 350 ping. This just won’t work. For comparison, I have 100 ping in World of Tanks blitz on my mobile connection.
So, the other option which would solve a lot of issues is to connect clients directly to one another - peer to peer. (And ensuring people are only matched against players in the same region). This is easy to do when the clients are on the same network, or if neither of them are behind a router. But if they are behind a router and on different networks (almost everyone), we need to perform NAT punchthrough and figure out how to get the clients to connect to one another.
I don’t mind paying for a service - from what I understand, some NAT punchthrough techniques require a server to sit in between the 2 clients to facilitate the punchthrough (after which the clients can connect p2p).
The problem is, all the libraries I’ve found to do this do not work with Unity and/or Unity Android+iOS. (Open.NAT, Mono.Net, Nat Traversal (unity plugin))
Seems like there is no ‘hassle free’ way to make a multiplayer game on Android + iOS with Unity. I would have to write my own NAT punchthrough library from scratch. I mean, the process seems straight forward enough, but there is hundreds of different types of routers in the wild with hundreds of things that could go wrong - it would be unreasonable to think that I could write my own robust library.
Any suggestions/ideas?
To summarise, I would like 2 mobile clients to connect to one another peer to peer and make use of UNets HLAPI.