Hello folks
I have researched about State Synchronization in networked games, and couldn't find a material that could solve the specific requirements that I have, my goal through this discussion is to understand High Level how such an algorithm would work to accommodate my needs.
The game I'm working on is an Action/RPG built in a coop mode, I have logics such as: “Perks”, “Skills”, “Items” etc.
Currently I'm using an event-driven approach to sync the clients, whenever I get a command packet from the client I process it (without locks) and queue a task that will send the data to nearby players.
The above approach allows for race conditions between state modification - I think I should also queue up the task that modifies the state as well (what are your thoughts about this?)
And I wonder if shouldn't I create a “StateDelta” that contains all the modifications that have been performed during this tick, and then extract from it a matching “delta” for each player.