-
Notifications
You must be signed in to change notification settings - Fork 8
Multiplayer desynchronization after last update #245
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
Comments
I believe that the fact of using the same city after the update should have an influence, but the topic will be open for thorough investigation |
Thank you for the detailed report! I have not had time to dive deeper into those problems, and during a recent multiplayer event we didn't encounter any issues. I'll keep this issue open for reference when we encounter more multiplayer desync issues. |
@LUISDASARTIMANHAS hi! i didn't test multiplayer yet, but will dig deep into any issues to fix it! |
We had another report on the forums, but I have no idea how to investigate that yet: https://mods.factorio.com/mod/tycoon/discussion/65ecdf2b3bf3f8cc70917770 |
@bahrmichael hmm, i couldn't reproduce any desyncs, yet. maybe it needs 2nd player to trigger that +? future test case: playing multiplayer with 3 players on different OSes for 10-20 minutes my thoughtsdon't know how to debug a Factorio desync correctly, so i can't find what line/variable caused it. here are some points:
my tests:i've joined a LAN dedicated server (linux-linux) with
all constructions were built fine, so i suppose even notes:
|
ok, using
but then i ran by the client-2 and clicked on town hall, then couple of tabs there to see stats... and finally got desync!
logs
3rd desync happened on
i have no idea know what all of this means, yet. it looks like there is something bad happening after gui click also (might be another issue, though), but it's not always because of it and needs some ticks to pass... |
PR #288 |
okay, found another issue, which could be additional or the root cause. needs testing w/o gui event fixes just compared -<entity-data name=tycoon-excavation-pit-2>
+<entity-data name=tycoon-excavation-pit-15> as per Gangsir#Use_local_variables_that_are_not_final_outside_of_event_hooks, this is sooo bad: Lines 633 to 671 in fbbe87d
so, if any function from this block is called - it will modify these locals for any instance of this require . idk how Lua handles multiple imports, but in mp these will definitely not be synced, unless moved into global table!maybe 2 require() s named differently can confirm such cases in a single client...
also, it's bad to hard-code total number of prototypes here -- it should be rebuilt in some way or taken from data-prototypes, like we did with resources (probable desync there, too :P) to fix this i propose using simply |
…michael#245) 1. remove non-final local variables. 2. simplify multiple functions into 1 table and 1 function 3. use city.generator() to randomize building names instead of iterating
…michael#245) 1. remove non-final local variables. 2. simplify multiple functions into 1 table and 1 function 3. use city.generator() to randomize building names instead of iterating
|
That code is from when I didn't know about entity variants yet. Maybe we can use them instead to have randomized pictures for houses, instead of this "randomization" code. |
1. remove non-final local variables. 2. simplify multiple functions into 1 table and 1 function 3. use city.generator() to randomize building names instead of iterating
Uh oh!
There was an error while loading. Please reload this page.
Multiplayer desynchronization after last update
After that bug I updated the mod on the server and continued with the save.
After a few minutes, players began to disconnect due to desynchronization and infinite map variant saves.
The ways that were tested were:
1-use only the tycoon mod (showed errors)
2-use the tycoon mod with other mods (showed errors)
3-use other mods without the tycoon mod (no errors)
4-use no mod just vanilla (no errors)
See the attached images below with the map variants saved by the game and the server
GOOGLE DRIVE
The text was updated successfully, but these errors were encountered: