Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Concurrent pick up

$
0
0
Hello there. As you already figured out I want to implement concurrent picking up in my game (with 4 players max).
I have already checked the demo, but I don't really understand why it is concurrent, and how it prevents the situation when two players trying to pick up the same object.

As far as I can see, in the demo we doing the next.

When a player picks up an object, we check, whether it's our player or not, and if it is, then we send an RPC to all players, via server. When the RPC is called via server, we check if this call of RPC was performed by us, and if it is, then we add score.

But what will happen if on the other client another player picks up the same object at the same time? Then it will call the same RPC twice, but for different players, and when it come via server then two players get a score, right?

Please, tell me if I'm right or not, and if I am, how to deal with the problem.

Viewing all articles
Browse latest Browse all 15755

Trending Articles