RPC vs OnPhotonSerializeView for hp update.

Options
Hi,

I need to update the hp and mp or all my 30-50 characters in the game.
the hp and mp are updated only once per second.
For now i use an RPC call every seconds.

But i wondered: is it better to do that with RPC or with OnPhotonSerializeView ?
I am afraid to put too many things in the OnPhotonSerializeView so i would like to ask a question about Reliable delta compressed,
imagine that i must send in the stream:
varA, varB, varC.
but only varC has changed since the last update, will OnPhotonSerializeView send only VarC or all varA, varB, varC ??

thx.

Comments

  • vadim
    Options
    Hi,

    "Reliable Delta Compressed will compare each value of an update to its predecessor. Values that did not change are skipped to keep traffic low. The receiving side simply fills-in the values of previous updates. Anything you write via OnPhotonSerializeView atomatically gets checked and compressed this way. If nothing changed, OnPhotonSerializeView doesn't get called on the receiving clients. The "reliable" part here takes some toll, so for small updates, the overhead should be considered."
  • Tobias
    Options
    Also check out "Observe Options" here:
    http://doc.exitgames.com/en/pun/current ... servembpun