Photon Warning

Options
Hey there,

I'm making a multiplayer TPS, using Photon Cloud service with Unity3D.
As in most shooter players kill other players. I get a warning from photon when a player kills another, almost always:

"Had to lookup view that wasn't in dict: View "X" on Play".

I think I understand why it comes up, the attacker sends an extra request to hit the victim player, but the victim was killed before it was recieved.

My question is, is it a big problem in the long run, cause it doesn't seem to break the game.
And is there a way to avoid this warning. Note: Seldom I get an error for recieved RPC's also.

I'm basically using the master client as an authoriative server to check the actions the other clients do.
I also sync all information across all clients in case a master client leaves, idk how stable that is yet, but I hope it can work like that.

Thanks ahead,
Michael.

Comments

  • Tobias
    Options
    It's not an error but means PUN is using bady-performing lookup instead of finding the target in our cached list of PhotonViews.

    This happens when a player was killed and the GO was destroyed?
    Maybe you don't have to destroy the GOs but instead just hide them when killed? Players do respawn anyways.

    Using the Master Client to check stuff is a good idea. You should keep in mind that the Master Client could leave at any time though and if he does due to a disconnect, some messages won't reach this timing-out master client and no one else took over yet. So in worst case, there is no Master Client for a while.
  • StarKist
    Options
    Thanks for the answer. I might implement the hide solution. I think I can manage the master client thing, at least so I hope.
    At any rate I was wondering if there was any other solution that is worth trying, just to get to know photon and network coding better for the future?

    Thanks ahead,
    Michael.
  • Tobias
    Options
    Sorry for the late reply.
    There are always a lot of ways to implement any feature and workflow. In PUN, you should make sure you don't call RPCs for objects that get destroyed (before the RPCs reached it's destination). The warning isn't that bad. You could remove that and be happy despite the occasional lookup. You could also implement RPC calling in a different way or ... or ...
  • StarKist
    Options
    Hey there, I actually implemented what you suggested + destruction, I just w8 around 5 secs before destroying, until then the player is hidden, that fixes all the late RPC problems, and doesnt require any change on my spawning system that relies on re-instantiating the player.

    Thanks.