Hi guys, I’m new in unity. I have been using unity since 4 months ago.
Currently I’m developing multiplayer FPS game using unity 3.0.
For supporting large number of player and trying to minimize cheating, I plan to combine Authoritative and Non-Authoritative Server type.
And also to reduce the bandwidth consumption, the server will send clients only the relevant sets of data (for example: other player’s avatar position that in the range of visibility of player avatar). But for now it seems only can be done with RPC synchronization, not with the State Synchronization component. As I know RPC use TCP to send the data, so it won’t be good if there are a lot of packet drop on some clients because the server will try again to send the same data. Is there other way to send the relevant sets with UDP in unity ?
And for cluster server support, does anyone ever try to use FoxServer or Darkstar Project ?
Thanks!
Try using NetworkView.SetScope for the relevant sets.
I asked about RPC calls on unityanswers, but noone had a good idea.
http://answers.unity3d.com/questions/25223/how-to-make-unreliable-rpc-calls-as-opposed-to-reliable-delta-compressed
I don’t know about server support
Thanks for the answer.
I have implemented the sending and receiving data using udp protocol based on following post
http://forum.unity3d.com/threads/15900-simple-udp-implementation-(send-read-via-mono-c-)
The easiest thing is when each client send only the user’s avatar data to the server, the hardest thing is when the server tried to send some avatar datas to particular client in one “shot” since it contain more complex data structure, in my case i tried to use “List” of struct that contain each of avatar position, rotation, etc. since i couldn’t send it as “List” i tried to send it as Object that contain that “List”, it also couldn’t help because i couldnt not marked the unity data structure for example position (Vector3) as “serializable”. So in the end i just send avatar’s datas one by one.