multiple AIs using single OnPhotonSerializeView - good idea?

Hi all, according to this post: viewtopic.php?f=17&t=1870, Tobias mentions:
I would try to steer NPCs via one script that produces only one, lean update for selected AIs (per update loop). This reduces overhead a bit.

Now should I interpret that as meaning this...

I have, say, 10 AI characters (monsters) controlled by the master client. Currently, each monster has a PhotonView used to send RPCs and it uses OnPhotonSerializeView to sync its position and angle in the world.

It occurs to me that I could have a "MonsterManager" that uses OnPhotonSerializeView to send update data for several monsters all at once, rather than individual monsters doing it themselves. The total size of the data I need to send will be the same in either case, but will I reduce overhead by doing it like this? Or should I just stick with the individual monsters doing it?

Comments

  • no it will not reduce the overhead as Photon combines the stuff into far less packets than 'distinct views' you have anyway. all it does is probably reduce the benefit of delta syncronization and make it more complicated to maintain
  • dreamora wrote:
    no it will not reduce the overhead as Photon combines the stuff into far less packets than 'distinct views' you have anyway. all it does is probably reduce the benefit of delta syncronization and make it more complicated to maintain

    Cool, thanks for the info, very helpful :)
Sign In or Register to comment.