🚀
Netick
HomeDownloadDiscord
  • Understanding Client-Server Model
  • Core Concepts
  • Network State
  • Change Callback
  • Remote Procedure Calls (RPCs)
  • RPCs vs Properties
  • Listening to Network Events
  • Understanding Client-Side Prediction
    • Writing Client-Side Prediction code
  • Interpolation
  • Lag Compensation
  • Network Object Instantiation and Destruction
    • Network Prefab Pool
  • Parenting
  • Managing Netick
  • Script Execution Order
Powered by GitBook
On this page

Was this helpful?

RPCs vs Properties

PreviousRemote Procedure Calls (RPCs)NextListening to Network Events

Last updated 1 year ago

Was this helpful?

RPCs are usually used to replicate non-critical (often visual/cosmetic) events. In contrast, Network Properties are used to replicate critical gameplay state.

Network Properties are best when you have a variable that is constantly changing and whose exact value matters for the duration of the game, because properties will eventually replicate to everyone.

Example: a health property.

On the other hand, RPCs are only relevant at the time of their execution, meaning anyone joining after that will never know anything about any RPCs before it.

Example: a damage effect event.

If an event happens infrequently and is merely visual (doesn’t affect gameplay, for example, a sound effect event) it might be more appropriate to use a Remote Procedure Call (RPC) for it.

Often you can evade using RPCs even for events, and that’s by using a using [OnChanged] attribute.

change callback