1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

What causes Multiplayer Desyncs?

Discussion in 'Triggers & Scripts' started by Daethz, Apr 25, 2019.

  1. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Tons of people are having de-sync problems with my game, LoaP Ascension.
    I have gone through the triggers, fixed countless leaks, improved countless triggers to work cleaner and more efficiently, Just this month I removed like 50 useless 0.01 second wait timers pruning them from all triggers in the game.

    Someone claimed my trigger command to allow players to change their player color to unused slot colors caused instant desyncs, so I disabled it.

    But there's a underlying desync and mouse clicking glitch which i suspect is a curser desync issue.
    It only happens in multiplayer

    I have posted about it before and people told me several things that caused de-syncs yet my game had none of those in its triggers, anywhere.

    My game is also protected with "5.0wc3map optimizer", even with all optimization settings turned off, only the three map protection ones enabled, still does not help.

    At the moment I suspect the map protector is the cause, as it has not been updated for years.


    -----------------

    I have one trigger in the game that goes off any time a boss is attacked, waits 1 second and goes through a directory of if/than/elses based on their mana % and forces them to cast spells, could this be the issue, every time it goes off it causes a 2 second wait timer.

    Without that wait timer bosses would try to force cast spells every time they are hit and be glitched in a never ending half-spell cast every time they get shot again.
    Edit: And without that trigger bosses don't like to cast their spells.

    --------------
    The only other one I can think of is the camera that triggers every 0.1 seconds resetting their camera to the integer amount each player set, or its default amount, without this the camera resets every time you hit the scroll button.
    --> and i recently went back into this trigger, improved it to only select players who are actually playing, where as before it would do everyone regardless, didn't effect the issue in the end.
     
  2. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    This issue is really damaging the playability of my game, and its by far the most elusive issue i have ever had.
     
  3. Clanzion

    Clanzion

    Joined:
    Jul 4, 2016
    Messages:
    391
    Resources:
    0
    Resources:
    0
    is the wait a polled wait/wait game time seconds?
     
  4. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    For the boss trigger its wait game time seconds
     
  5. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Would it be better to switch it to a regular wait timer?
     
  6. Clanzion

    Clanzion

    Joined:
    Jul 4, 2016
    Messages:
    391
    Resources:
    0
    Resources:
    0
    It would be best to use timers but if you don't know how to use timers, then yes, it would be better to switch to standard waits for desync avoidance purposes.
     
  7. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Don't know how to use timers, from what i have seen creating a timer requires a whole mess of things, and I would need like 20 of them at least.
     
  8. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I have tons of respawn triggers that use "Wait 120 seconds" "create blah unit at position"
    I did make all respawn positions in the game use a preset point variable though to kill leaks.
     
  9. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    2,900
    Resources:
    1
    Spells:
    1
    Resources:
    1
    GUI timers are total ass. They just don't make the functionality easy.
    In general this sort of trigger can probably be run off of a periodic event every 120 seconds.
     
  10. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,095
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Neither wait game time nor the normal wait causes desync. I still don't know where people make up these assumptions.
    Anyway if you want true accuracy, lets say, the waiting time to be precisely e.g. 0.2s or 0.5s or 1s-2s then yes use timers. Using several waits beyond that value is not worth it, since the waiting time of wait actions gets better accuracy the longer it is.
     
  11. Clanzion

    Clanzion

    Joined:
    Jul 4, 2016
    Messages:
    391
    Resources:
    0
    Resources:
    0
    There was some evidence of it on discord, a guy switched his wait game time to normal waits, and his map desynced significantly less.
     
  12. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,095
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    I'm sure that still doesn't fix the origin of the actual desync.
     
  13. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    That was the only non-normal wait in my game.
    I switched it.

    I do doubt that will fix it though, i think people have desynced without fighting bosses.

    Im thinking of tackling the respawn system, i dont know how much of a impact removing two dozen respawn wait timers for a single reoccuring event would have

    That said, if 100 mobs spawn at the same moment it could actually make it Worst.
     
  14. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Checked my entire map for any instances of "GetLocalPlayer()" thanks to a .j converter, theres zero.
     
  15. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    None of my wait timers need to be that accurate, they are just respawn timers or wait timers for things where its perfectly fine if its off by an entire second.
     
  16. TheLordOfChaos201

    TheLordOfChaos201

    Joined:
    Jul 2, 2011
    Messages:
    1,723
    Resources:
    0
    Resources:
    0
    As everyone else has already said

    de-sync is caused by one computer running at a different time frame as another computer, essentially they are no longer synchronising the same events in game.

    You can use the, 'wait in game time' trigger instead of the wait function

    and you could try basically nothing else :|

    good luck
     
  17. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Would replacing all Wait timers with actual timers that start the moment a boss die help?
     
  18. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    2,900
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Yes, timing everything with timers is better than using waits.
     
  19. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,095
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Good luck on making 123456 GUI timers to replace all waits.
    This turned into a discussion between if timers are better than waits rather what causes desyncs.
    It's already been said 123456 times waits don't have anything to do with desync, use them when you don't need true accuracy, else if you're a math timer maniac go ahead and use an numerous amount of timers for every moment which is time consuming and absurd in GUI.
     
  20. Daethz

    Daethz

    Joined:
    Mar 25, 2008
    Messages:
    198
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Well there seems to be no reason for desyncs then because people report them at completely random times in my game.
    Im thinking its all blizzards fault and they broke something bad internally.