I searched and read many articles and looked at the Apple GKTank sample (I don’t see any features of my problem, it seems to handle events as they occur), but I do not see an example or tutorial, answer the following
in a multiplayer game via bluetooth / internet (possibly), how do you synchronize the interaction of players so that the result of the game comes out taking into account the delay, etc.
eg:
Each player A and B displays one button on two separate devices connected via bluetooth.
Player A pushes a button (player A plays the game, and therefore latency is not a problem) Player B pushes a button in front of Player A, but his connection to Player A has at least 200 ms network latency.
problem: the game must know that player B is pressed first, even if the Touch Touch player first reaches the game code - that is, there is no advantage for hosting.
I know that the touch event has a timestamp, and so I could make sure that the actual press time was sent from player B to the game code ... but I'm not sure if this is the right approach, and if it is where to go from there ..
I expect that the answer will depend on some game time cycle, when touches are not processed immediately, but in the game cycle ...
any help on this or pointers to a textbook or specific source code that handles this will be appreciated.
Adam
source share