I want to develop a mobile multiplayer game. (P2P - clients will communicate directly).
There won't be much data sent from one player to the other, but when there will, I'd like the change to appear in the devices at exactly the same time.
If player 1 presses a button, I thought to change his game state only after player 2 received and confirmed that he received the data, but then player 2's will be updated before player 1's...
Is there a way to get the state to change at exactly the same time?