Other Settings

Send configurations

This option allows to configuration of how many updated systems will try to send peer seconds. This option applies only to internal object update messages controlled by the system

You can control the number of update object messages peer seconds ObjectNet will send to keep the client synchronized, depending on how your game was designed this number can be greater or smaller, games like FPS or Racing may require a large number of messages to provide accuracy, although, card games, point and click and another type may require a just a few messages, this option allows a fine twin on this aspect of your game.

ObjectNet has a smart system to detect when there are no changes to decrease the send rate to Minimum update frequency saveing bandwidth

Delivery Mode

This option allows one to decide how ObjectNet will deliver object update messages.

Object Update messages can be delivered in two ways Reliable and Unreliable.

This option when combined with update frequency may provide a better and more reliable experience to the player at the same time that they reduce network costs.

Enable Encryption

ObjectNet provides an optional feature to allow the developer to encrypt data information.

Before sending data and after receiving data, ObjectNet will try to Encrypt or Decrypt data before sending by the selected transport system. Do you need to implement a script inherited from IInformationProvider ( see Providers Scripts ).

This script shall implement two methods, one to Encrypt and another to Decrypt.

You can also check the example script EncryptionProvider on examples folder. This script has a full implementation of how to encrypt and Decrypt data using provided C# classes, nonetheless, you can also implement your encryption method.

You can also check a full example scene "19 - Encryption" which has the encryption implemented.

Network Clock

ObjectNet provides one implementation of a clock designed to be more accurate than the internal unity clock where the target is multiplayer operations.

This internal clock has the same functionalities as the Unity Time class, we recommend using ObjectNet time wrapper which will decide which clock they will use.

We strongly recommend using those functions if you are starting your development :

NetworkClock.deltaTime

NetworkClock.fixedDeltaTime

NetworkClock.time

NetworkClock.deltaFrames

NetworkClock.tick

If Network Clock is enabled, ObjectNet will use its internal clock, nonetheless, if Network Clock is not enabled ObjectNet will use the Unity default clock.

To see each function in detail check ObjectNet API documentation.

Latency Tolerance

ObjectNet provides an embedded Movement Prediction system to predict object movement and mitigate latency.

Movement Prediction uses those values to calculate the predicted position of an object over the network. In this configuration you have two options :

  1. Good Latency

Good latency is the latency between 0ms and the selected value, this latency is considered a good value for players playing your game.

  1. Acceptable Latency

Acceptable latency starts on the end of good latency up to the selected value, and movement prediction will predict in a different way if latency is on the acceptable bounds.

If values exceed the acceptable value the movement prediction will use his extrapolated prediction without affecting game-play.

Movement Interpolation

Always when remote object position was received, the new received position became the current object position this may cause some teleportation or jittering on objects.

ObjectNet provide the facility to smoothly move objects during network movement to avoid jittering or flicker on game objects.

To enable internal latency measure you need to enable "Movement Interpolation" on NetworkPrefab.

Note: ObjectNet will always work to mitigate and reduce flicker and jittering, nonetheless, depending of the latency or packets lost you may experiment certain issues.

Measure Latency

ObjectNet uses a lot of measurement systems to keep peers synchronized, some of those are provided by Operational System or Unity, nonetheless, ObjectNet has a custom measurement system to get more accurate information.

One of those measure is the latency. The latency is the time that a package takes for one peer to arrive at the server.

To enable internal latency measure you need to enable "Measure Latency" on NetworkPrefab.

Now you can get the Ping through code using

int averagePing = NetworkManager.Instance().GetPingAverage();