« Generating Terrain in Realtime; Really This Time | Main | Networking in Unity: Back to Basics »

The Trials of Networking

Networking is something that's great when it works, but can be really hard to debug. With a server running on a linux VM we've faced several challenges. The first being, how do you connect the VM and the host to the same network? Well, there's a connection mode in the VMware player, called Host-Only mode, which allows the VM to connect directly to the host. This seemed like the ideal option, but on Nate's windows computer the VM failed to ever get a packet through.
Next, when we tried in on my computer, the VM could talk to the host just fine, but since we haven't written the client dll to work on a mac yet, that didn't help us very much. Eventually we managed to connect Nate's computer to my VM, and then the real networking could begin.

Once all the "physical" connections were made the software connections came easier, though not without their own issues. The client can connect to the server, and receive information back, but at this point is unable to properly pass the information from the plugin to the client. Going from the c++ char[] to the c# byte[] has so far been quite a problem.
The bigger issue on the client side, however, is the persistence, or lack there of, of the connection to the server. Due to the way Unity interfaces with the dll we haven't figured out a good solution for the dll to maintain a persistent connection with the server. Hopefully we'll figure all this out in the next week or so.