Syncing Buffs Across the Network
Options
Our MOBA has around 30 network objects in game at any given time. They can be affected by buffs and debuffs. I’m fairly certain this means i need to sync the current active buffs across the network for all 30 units. The question is how?
My first thought was to use customProperties(). But scene network objects don’t support customProperties…
I guess if we assume that all changes to the buffs starts from the isMine client, we could use OnPhotonSerializeView() and pass in the changes somehow.
Does this sound like the most efficient approach? Where would i find an example of serializing/deserializing a list of complex objects like this?
My first thought was to use customProperties(). But scene network objects don’t support customProperties…
I guess if we assume that all changes to the buffs starts from the isMine client, we could use OnPhotonSerializeView() and pass in the changes somehow.
Does this sound like the most efficient approach? Where would i find an example of serializing/deserializing a list of complex objects like this?
0
Comments
-
Hi,
If you want to tackle complex data serialization you may want to look into your own set of data:
http://doc.photonengine.com/en-us/pun/current/reference/serialization-in-photon ( check the "custom serialization" section)
also, A member last week expressed the same problem, where 30+ network object will require a lot of messages which will likely have to consider investing in a higher plan to allow for more messaging per room. He claims he got a solution around this, I think it would be very good if you get in touch with him and ask about this technic. From what I understood, he already shared some code on this:
http://forum.photonengine.com/discussion/comment/31176/#Comment_31176
Bye,
Jean0