DoubleDeez / MDFramework

A multiplayer C# game framework for Godot 3.4 Mono.
https://discord.gg/UH49eHK
MIT License
77 stars 13 forks source link

Make option for manual start of synchronization #67

Closed Meister1593 closed 3 years ago

Meister1593 commented 3 years ago

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.

Beider commented 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.

Beider commented 3 years ago

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.