Hi !
Here is a guide about how to setup your home network to play with a friend. The explanation is a bit technical, but don't worry if you don't grok everything. Just follow the steps in
bold.
Above is the ideal situation: Blue is hosting the game, Green has joined, and both computers are sending and receiving data through the Internet.
Now, Blue and Green are probably in this situation:
Here is why. Blue is connected to the Internet through a router provided by his Internet Service Provider. As a consequence, the address of Blue 192.168.1.1/1805 is only valid within Blue's home. Green should be using Blue's
public address, not its private address. How can Green get Blue's public address? Blue can obtain his public address by googling "whatsmyip". That address changes from time to time so it must be checked before every game session.
Before every game session, Blue (the hosting player) googles "whatsmyip", copies his public address, and sends it as a text message to Green.
Now, Blue and Green are probably in this situation:
Green's data is received by the router at Blue's home. But Blue's router does not know what to do with the data. Blue probably owns several devices connected to the Internet. Which one is expecting this data? Blue has to tell his router to redirect any data received on port 1805 to his computer (that's the port used by ZunTzu). That can be done by accessing the administration web page of the router, and going to the "port forwarding" settings. Port forwarding can be set up independently for protocol TCP and protocol UDP. ZunTzu uses protocol UDP.
To be done once: Blue (the hosting player) accesses his router administration page and adds a port forwarding entry for port UDP/1805 to the private address of his computer (192.168.1.1 in the example), obtained by running "ipconfig" in a command line.
Note: The router will remember the port forwarding. Blue just has to set it up once. However, if the private address of Blue's computer changes, the router settings will have to be changed accordingly. Blue can make sure that doesn't happen by using a fixed address instead of a dynamic address, but this is beyond the scope of this post.
Hurray! It's working.
If your network is more complicated you may have several layers of routers (for instance a main router and a separate wifi router). Port forwarding must be set up for each router.
Jerome, ZunTzu developer.