I am currently working in a real time multiplayer game involving two players only. In every level the user sends update to the peer and recieves update from him/her before going to next level. Both these events occur asynchronously. if the user recieves update before his update acknowledgement the he updates then he moves to next level from sendUpdateDone method and if he recieves acknowledgement before peer update then from updatePeersRecieved method. Most of the time the updatePeerRecieved is not getting invoked thats why one device goes to the next level while the other remains in the same level and the game hangs.
Please help me solve this problem.
closed with the note:
solution found. no synchronization problem but the problem with my interpretation of updates