Client Bad Network


I am using authoritative multiplayer. It is turn based game.

How should I overcome bad network on player side.
For example if the server sent message to the player and the player was disconnected for 5 seconds due to bad wifi (lost signal). Is the player going to get that message when he come back online?

I am asking this question because I designed my game is such way that players should receive all messages and update the game with less data sent from server to game. so for example if player A has 10 items then I received message that he used 2 items then
I will update the items count 10-2 = 8

but if I lost the internet for 5 seconds and the server sent the message and I did not receive it the count of items will be wrong.
server side it will be 8
client side it will be 10

Messages that were not delivered due to client disconnect are not automatically retried by the server when they reconnect. Out of the box Nakama can’t know enough about your game logic to know if it’s safe to retransmit or if it would cause issues in your game.

The most common pattern for handling this is to fully sync game state when a player reconnects. This is usually the same logic as a new player joining to a match for the first time where they need to be given current match state/players present/timing and turn data etc, but adjusted to allow the player to “resume” where they left off rather than be treated as a fresh entry into the match.