Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read scenario and merge with it before saving, that way adding compatibility for multiplayer shared scenarios #259

Open
Neouni opened this issue Jun 16, 2014 · 2 comments

Comments

@Neouni
Copy link

Neouni commented Jun 16, 2014

Currently the trick in Dark Multiplayer is symlinking scenario files to share kethane data between players, but this would work more flawlessly if the mods actually read back the scenario data before saving so they append to it instead of just wiping it clean with their copy

@Majiir
Copy link
Owner

Majiir commented Jun 16, 2014

I don't see how this could be done. Kethane doesn't do any change-tracking, so it doesn't make any sense to "merge" different scenario states. Presumably the issue here is that if two multiplayer clients modify state (i.e. by scanning) then only one of the new states is preserved. My stance on this remains unchanged from when the KMP folks asked me about it: the multiplayer mod should provide a proper API. Merging scan states could work, but merging deposit states doesn't unless you're willing to accept overextraction of deposits. The whole thing breaks if any individual user uses the debug tools, although that's a fairly minor issue.

However, the fundamental problem I see here is that DMP is treating scenarios as deltas from one saved state to another, and that's not how the game models them. How should I treat deltas from a quicksave to a present time? There's no good way for the ScenarioModule to find a prior state from which to anchor a merge.

@Neouni
Copy link
Author

Neouni commented Jun 16, 2014

Presumably the issue here is that if two multiplayer clients modify state (i.e. by scanning) then only one of the new states is preserved.
That is true, but I have the impression that if kethane would read back what was in the file before writing to it, you wouldn't have the problem when player A and B are scanning a different planet, and player B writes to save last, only the results from player B would get saved.
And player A loses all progress, and player B never saw players A progress unless he quit and joined the server.

There is offcourse also a plugin for dmp being developed, where other mods can piggyback on the server communication to the other players, but that requires a lot more code.
https://github.com/godarklight/DMPPluginTest

Overextraction of deposits, it could happen with different subspaces etc just not from the same ship.
Since you have "this vessel changed in the future", which basically disallows control till you sync up to the one further along.
That's a tricky one unless you know more about the state of the players.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants