Unity Networking – Big Game Project
|
Last week I had to do a lot of research about networking in unity and that’s what I spent most of my time on. I have never programmed something involving networking so the whole subject was a bit foreign to me. Fortunately, there are many great tutorials online and very good documentation provided by Unity Technologies for me to study. I was actually able to implement a system where players can create servers where two players may join. These players can then press space to send message to each other using “RPC’s”. This was just to try out if I could make one action visible for the other player to find out if they were actually connected. The concept of RPC’s (Remote Procedure Calls) is something I had trouble grasping at first, but it turned out it wasn’t that hard to understand after all. They are almost the same as normals functions but with a few minor but important differences. They need one more extra parameter to know on what machines to run the functions on and the more parameters an RPC needs , the more network bandwidth involved will be used. I’m now trying to create a master server so players are able to find public servers without having to know the IP address for the player who created the server. There are different services available for this but I’m not quite sure what I should use. Unity is able to provide a master server for testing purposes, but I have also found a great guide online where I can learn some more about different ways to set up a stable master server. |