Today I had planned to do something else what I ended up doing: I spent whole day figuring out how to deal with the NAT problems (big thanks for Tim for helping me out so far). So far I understand in theory what should be done: we need an introducer.
NAT problems occur when both (I think) the server and client are behind a router/firewall that messes up the IP addresses and ports. And that means players cannot play the game. It’s like a mailman who tries to deliver a package to John Doe, when suddenly he realizes that John moved to somewhere.
There are good resources that have shed some light into this issue. Here are some of them:
- Peer-to-Peer Communication Across Network Address Translators – This article explains in great detail what NAT problems are.
- NAT Traversal Solutions for Independent Developers – Nice idea, but I at the moment I don’t know how to deal with the problem.
- How to communicate peer-to-peer through NAT (Network Address Translation) firewalls
- Indiegamer thread about network programming in games – has general information about multiplayer network programming.
Something good in this adversity
There’s something good in this crappy situation. Big studios also have this problem – and so does every online multiplayer game (excluding games that have servers with public IPs, such as most MMO games). You can also see that not everybody is willing to deal with this problem (even world’s largest gaming companies such as EA might not be willing to make it work 100% properly).
And since it’s a big problem (and something not everybody is even going to solve) it means an opportunity. It means that those who make playing smooth and tackle NAT problems will get access to larger player pool. We are definitely working on this problem, and finding a solution for it.
I’m open to ideas and suggestions in this matter – even willing to pay some $$$ for somebody to solve this problem. We need to get an application that can be run on an external server: something that will make sure our UDP traffic goes where it should. If you have an idea, feel free to contact me.