Open DominicMaas opened 5 years ago
Would it be possible to just send the game state to the client instead of the whole save. I beleive the server should be responsable to keeping the save file and keeping the clients in sync with that save.
It's more of a starting off point, the save is only synced on first connect (too much information to sync manually), after the save is sent over, the client and server will keep each other in sync.
Lets use the branch game-load-save
as a starting off point. There's some good notes by root#0042
located here: https://github.com/DominicMaas/Tango/wiki/Development-Notes
So it's easier to understand what's happening, if you have performed some work on this feature, feel free to assign yourself to this issue.
Code changes are being tracked in https://github.com/DominicMaas/Tango/pull/140
Hello there. While playing on a shared network, I saw some issues that appear to be related to network corruption of the save game, in that it happens intermittently when loading. Is there any existing check-summing or hashing of the save game during the initial transfer process?
Introduction
When a player connects to the server, both server and client should be paused. Once paused, the server needs to grab a copy of the save game (this can be done with raw IO requests if there is no exposed method), and send it to the client (via TCP to ensure nothing is lost). Once the client receives the world, it needs to then load it (somehow) and unpause the game. To prevent the user from unpausing the game during this process, a giant loading screen will be displayed above all content.
Key Points
sync
command that updates all clients with the world. Can be used when the game starts becoming unplayable.