Closed Meister1593 closed 3 years ago
I think as part of this cleaning up the game synchrnoizer a bit and maybe adding a new player object and state.
Right now the game synchronizer just reacts to events such as player join / leave and it also contains a bunch of seperate lists containing information about each player. These lists should be combined into one and rather add some sort of player information object that contains the data. If possible most of the logic could be moved into this player information class and the synchronizer could function in a similar manner as the MDReplicator where these info objects just use the game synchronizer to pass messages. While the actual handling of the messages happens within the object.
So what I would like to see is something like,
I think this would really help make the GameSynchronizer and the logic within more readable and easier to understand. This will also make this feature easier to implement.
I have completed the refactoring mentioned above, the pull request for this has been filed. This does not fix this issue but it should make it easier to fix this issue.
Would be a good idea to add option for non-automatic synchronization trigger. For example: Host sits on server, another joins. When it joined, now it would automatically start synchronization. With that feature, i can launch synchronization when i want. This needed for example when you have to do local stuff before actual synching and you need to make sure that you are actually connected to server right now.