1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Multiplayer Stability Thread

Discussion in 'Community Patch Project' started by pza, May 4, 2018.

  1. pza

    pza Chieftain

    Joined:
    Oct 20, 2017
    Messages:
    314
    I think G (edit: and @davenye, @raphaell666) is doing a good effort to make multiplayer playable, so i thought it's due that we gather feedback on this topic. We can discuss used settings, maps, modpacks and configurations.

    Please report your findings and provide as much additional relevant information as possible.
     
    Last edited: May 4, 2018
  2. Moi Magnus

    Moi Magnus Warlord

    Joined:
    Mar 1, 2015
    Messages:
    1,324
    Note that the next version should have significant reduction of desync (possibly at a cost of some performance), thanks to yet another wonderful fix from davenye (see the associated GitHub pull request for more informations)
     
  3. Gazebo

    Gazebo Lord of the Community Patch

    Joined:
    Sep 26, 2010
    Messages:
    15,402
    Location:
    Aquidneck Island
    Don’t credit me. @davenye, @raphaell666 and others are the drivers of this. I just merged their work.

    G
     
  4. wistak

    wistak Chieftain

    Joined:
    Oct 16, 2015
    Messages:
    73
    Gender:
    Male
    Location:
    Warsaw
    I was thinking that this was already implemented in 4-30, wasn't it?
     
  5. pza

    pza Chieftain

    Joined:
    Oct 20, 2017
    Messages:
    314
    I think with "just" he meant "only" and not "right now".

    BTW there's not much improvement in the late game, starting industrial, yet, but I've got just one game in so far, I still need to analyze it better.
     
  6. Hosannah

    Hosannah Chieftain

    Joined:
    Jul 19, 2016
    Messages:
    82
    Gender:
    Male
    Location:
    Germany
    Can anybody explain to me, in layman's terms, what exactly it is that was done on a technical level to improve multiplayer stability? I tried to find out but I couldn't find the right thread.
     
  7. raphaell666

    raphaell666 Chieftain

    Joined:
    Mar 27, 2018
    Messages:
    62
    Gender:
    Male
    Summoning @davenye to answer this as he is the responsible for most recent fixes, but meanwhile I will try. The issues in multiplayer that do not exist in single-player are "desyncs" or in other words desynchronization between game clients. The way I understand it is that basically a copy of the game is run on each computer, that tries communicating as little as possible between clients and host. This means that for example random elements with RNG need to be seeded and synchronized between games and have the same result independently, AI (including barbarians) need to have the exact same decisions in every client, and the automatic procedures in all players' clients needs to be the same and occur in the same order, otherwise desynchronizations will occur. Also, all human player actions will have to be communicated. Network instability when communicating will also cause errors, but there is not much that we can do as we do not have access to the netcode. You can find more information on the project's GitHub.

    @davenye and @Gazebo have a deeper understanding and can improve my explanation or correct me if I misunderstood.

    There are other issues related to the saving mechanisms of the game but we are not sure what is going on with those yet. One tip that I have to avoid desyncs is to be sure that always when you are loading an existing game, it has the AI replaying their last turn before the players. This is the same as loading an autosave. The default save of multiplayer is simply copying/renaming the last autosave and this is the safest option. If when loading a MP game you notice that the AI does not replay their turn before yours, issues will probably arise as this was a "dirty" forced save which can be caused by saving twice and overwriting the same save. I am not sure why saving twice by default causes these forced saves, nor the reason why forced saves cause desyncs, but it is what I have observed.

    What do you mean? I have played ~5 games that got to turns 300+ with the fixes and have only gotten desyncs in a few specific cases that we are already looking into, but when playing normally you should see very few desyncs provided you are using the autosaves and not the forced saves as I mentioned above.
     
    Hosannah likes this.
  8. Hosannah

    Hosannah Chieftain

    Joined:
    Jul 19, 2016
    Messages:
    82
    Gender:
    Male
    Location:
    Germany
     
  9. davenye

    davenye Chieftain

    Joined:
    May 3, 2018
    Messages:
    1
    Hi all, to clarify things here is a list of improvements and fixes I have made to better the MP experience over the last few months, unless otherwise noted they are incorporated into the 4-30 version:

    - Added code to get Events working in MP
    - Added new game option to hide details of unmet civs in the Staging Room when loading MP games

    - Fixed bug where the humans players would have their turns skipped in the first turn after loading a game (Thanks to raphaell666 for testing and improvements)
    - Fixed bug where the humans players would have their turns skipped in the first turn after loading a game, if not present when Pitboss host starts. [next version]

    - Fixed bug in Save Dialog that allowed (potentially buggy) save games when overwriting existing files. This bug was being exploited to avoid the turn skip bug (aka double turn bug) but this should no longer be desired as the issue is resolved.

    - Fixed potential desyncs from trade route cache being out of sync
    - Fixed desyncs from creating a trade route - routes could have different paths (I feel this was a major cause of desyncs). There still exists a potential for desyncs due to things that occur when opening the create trade route popup, I have a potential/partial fix but have yet to try it.

    - Fixed desyncs from auto-exploring (this would have been a major issue for people who auto-explore) [next version]

    - Fixed potential desyncs from some turn state not being reset (would affect Simultaneous MP with no AI)

    - Changed updating of the tactical map in an attempt to reduce desyncs, although I am not convinced this really helps but AI may be working a little better as a result (need to do some more testing as I still have a suspicion)

    - Fixed a number of errors in deal valuation code where the active player was incorrectly being used as a party in the deal. This meant that deals were being both valued incorrectly and also differently on each machine, causing desyncs.
    - Fixed desync after non-host human had war declared on them after giving a "mean" response to AI
    - Fixed desyncs from sharing opinion with AI


    - Fixed CTD when accepting deals
    - Fixed erroneous "counter offer" notification accepting human-human deals
    - Fixed lack of notification when proposing human-human deals
    - Fixed unnecessary withdrawals of proposed deals by AI (due to error in logic)
    - Reduced withdrawals of proposed deals by AI by allowing them to change the proposed deal instead of just withdrawing
    - Fixed blank name in deal withdrawal notifications
    - Fixed orange background on proposed deal notifications - now has proper background of proposing civ [next version]

    - Fixed wrong or missing civ icons in MP Staging Room after loading other games
    - Fixed runtime error in in-game MP player list when observer present, causing the list to not be displayed
     
    Last edited: May 10, 2018
    Babri, hokath, HalfEmptyMug and 10 others like this.
  10. raphaell666

    raphaell666 Chieftain

    Joined:
    Mar 27, 2018
    Messages:
    62
    Gender:
    Male
    This has been fixed in the latest versions of the VP mod, and does not happen anymore. You can safely load autosaves during wars now.
     
    Hosannah likes this.
  11. ElliotS

    ElliotS Warmonger

    Joined:
    Jun 13, 2013
    Messages:
    2,509
    Gender:
    Male
    Location:
    Chicago
    That's so cool! I love you guys!
     
  12. Misaka

    Misaka Chieftain

    Joined:
    Apr 15, 2017
    Messages:
    40
    Gender:
    Male
    Hello, im inactive some time, xD, the last version more stable (multiplayer) i know its 7-20-17, before its all 2-3 turn desync barbarians, and 15-30 turn without barbarian, i can upload logs and tests with 2 friends and i. We don't play trogether a long time ago because well the latest version i know don't work in mp. But we still plaing sp. If somebody can, i ask if this its a experimental stable version mp, please upload de mp_modpack, update the old. https://forums.civfanatics.com/threads/dlc-modpack-and-43-civ-version-repository.609278/
    For 2 reason, for player its dificult to create de modpack, and for player can't create the modpack. Thanks
    I search if somebody upload any with 4-30, but not ;/ i will test and upload anything you want just like time before. Bye
     
  13. pza

    pza Chieftain

    Joined:
    Oct 20, 2017
    Messages:
    314
  14. Hosannah

    Hosannah Chieftain

    Joined:
    Jul 19, 2016
    Messages:
    82
    Gender:
    Male
    Location:
    Germany
    @davenye, @raphaell666 that's a lot of great fixes, especially the annoying turn skip bug! And it makes sense that I haven't really noticed some of these since I have yet to start a game with the 4-30 version. That's great work, well done and thanks a lot for putting in the time and effort!
     
    pza likes this.
  15. Misaka

    Misaka Chieftain

    Joined:
    Apr 15, 2017
    Messages:
    40
    Gender:
    Male
    Thanks!
     
  16. Voker57

    Voker57 Chieftain

    Joined:
    Nov 21, 2016
    Messages:
    135
    Location:
    Finland
    Played 4-30 with 3 players, with events and barbarians on, and in 100+ turns got only couple stray desyncs, great job!
     
  17. wistak

    wistak Chieftain

    Joined:
    Oct 16, 2015
    Messages:
    73
    Gender:
    Male
    Location:
    Warsaw
    3 players newest version (4-30-4?)
    First desync after 57 later 2 before 100 an maybe each 25 turns another one
    Barbarians and events
    thanks
     
  18. kevytmaito11

    kevytmaito11 Chieftain

    Joined:
    Jan 16, 2011
    Messages:
    49
    After 4-30-4 version the mod was working very well with the multiplayer. Now after the latest release (5-20-3) desyncs are back again. It is desyncing constantly like once per 5 turns or something. 5-20-2 version was still working ok.
     
    Voker57 likes this.
  19. pza

    pza Chieftain

    Joined:
    Oct 20, 2017
    Messages:
    314
    I've managed to play to turn ~80 or so with only few desyncs with a friend... After that desyncs got much worse. Which would be bad, if it wasn't for the fact that he was on 5-20-2 and i was on 5-20-3. I never thought that was possible at all. No wonder the desyncs!
     
  20. tu_79

    tu_79 Warlord

    Joined:
    Feb 11, 2016
    Messages:
    5,017
    Location:
    Malaga (Spain)
    I never played MP, so this may sound silly. If the seeding is the same, AI logic should always give same results, shouldn't it? Bad connection issues I don't know if can be solved, but can't it be double checked? Like when you download a file, getting also the MD5 sum. (If clients can request something different that it is already coded to server, that is).
    I assume seeding is the same, so no new seed on reload, but can reseeding happen unexpectedly?
     

Share This Page

Ebates: Get Paid to Shop