Insprill / dv-multiplayer

A Derail Valley mod adding multiplayer to the game.
Apache License 2.0
33 stars 16 forks source link

Sync weather and time #5

Closed Insprill closed 1 year ago

Insprill commented 1 year ago

Weather and time should be synced between the server and all clients. Theoretically, it should be as simple as syncing all parameters that WeatherDriver#GetSaveData/LoadSaveData uses when a client joins, then leaving further weather processing up to the client. If this proves to be unreliable over a longer period of time, we can re-sync it once every so often. To ensure time doesn't desync, sleeping will have to be disabled, and changes from the weather editor will have to be sent to all clients.