


An example of this is where animations are synchronized. There is plenty of opportunity for creativity in designing the game so that the state appears to be the same on all clients even though it may not be, strictly. The benefit of delta compression thus depends on how much the state changes and in which properties. If the state is exactly the same then nothing is sent. However, the data is also delta compressed which means only the differences between the last state and the current state are transmitted. Although this ensures that transmitted data is received correctly, the waiting and retransmission tend to increase bandwidth usage. If packets are lost then they get retransmitted and if they arrive out of order, they will be buffered until all packets in the sequence have arrived. In Reliable Delta Compressed mode, the data is guaranteed to be sent reliably and arrive in the right order. You can reduce the bandwidth consumption considerably by lowering the frequency of updates, but the default value of 15 is about right for a game where the action moves quickly.
#Unity networkview bandwidth update
If the server is running with eight clients and using the default update frequency then it will receive 4,320 KBytes/s (8*36*15) or 34.6Kbits/s and transmit 30.2 KBytes/s (8*7*36*15) or 242Kbits/s. For example, synchronizing a Transform involves transmitting nine float values (three Vector3s with three floats each), which equates to 36 Bytes per update. However, you should bear in mind the amount of data that might be sent during each update. This is often the best synchronization mode to use when objects change state very frequently and the effect of a missed update is very short-lived. Unreliable mode ensures frequent updates but any dropped or delayed packets will simply be ignored. The frequency of this update is determined by the value of ndRate, which is set to 15 updates per second by default. In Unreliable mode, the whole of the object being synchronized will be transmitted on each iteration of the network update loop. The amount of network bandwidth used depends heavily on whether you use the Unreliable or the Reliable Delta Compression mode to synchronize data (the mode is set from the Network View component). It is therefore very important to consider how much data you are exchanging and how frequently the exchanges take place. Since network communication is potentially slow compared to other aspects of a game, it is important to reduce it to a minimum. This information is for legacy projects using the old networking system.) (For new projects, you should use the new networking system introduced in 5.1.
