1. Looking for the largest Project M tournament of the summer? Register for CEO 2014 today and get in on the action! Featuring both Project M and Super Smash Brothers Melee, CEO 2014 will be one of the three largest tournaments of the summer!

  2. Looking for the perfect gift for that Smasher in your life? Maybe even yourself? Use the Smashboards Store to get any awesome Smash accessories, like a Nintendo White Controller! Please check out the inventory in our store and support Smashboards with your purchase today!

Guide Desynchronization: In-depth analysis on causes and how to fix them

Discussion in 'Smash 64 Discussion' started by JaimeHR, Mar 5, 2011.

  1. JaimeHR

    JaimeHR Smash Ace

    Joined:
    Oct 25, 2005
    Messages:
    893
    Location:
    Mexicali, Baja California, Mexico
    Brawl Friend Code:
    3308-4828-5913
    There's no doubt that one of our main problems playing online Super Smash Bros. besides frame delay and lag is probably in-game desynchronization. A problem so common yet so unknown that even today there's no sure way or guide on how to get rid of it, perhaps we just have learned to live with it?.

    I think this problem needs serious discussion and further research in order to know how to avoid desynchronization in our games, it may not be possible to find a 100% fix due to Kaillera's nature but we could at least make it into a rare issue.

    What is it?
    In netplay, desynchronization (also known as desynch or ds) is when 2 or more player's Kaillera enabled emulators get out of synch (Project64k or Mupen64k in this case), so what you're pressing is not what the other person is seeing, that's why you see your friends jumping off the stage for no apparent reason or pausing the game and moving the pause camera. It's an unfortunate reality using Kaillera, because making an emulator play over the Internet when that's not what it was originally intended to do is technically very difficult. Fast stable Internet connections for all players seems to be the best prevention but there's still many other factors that can make the game to desynch and those are related to the emulator itself.

    What causes it?
    There is a lot of things that cause desynch, it is well known that playing at full screen will trigger it but sometimes random elements of the game such as Hyrule Temple's tornado and the wind on Dreamland will also make the game to desynch, adding a CPU player or picking Random stage are also at fault, oddly enough, items don't seem to cause it most of the time.

    Here's a (Hopefully) growing list of well know causes of desynchronization:

    - Playing at full screen during netplay
    - Add a CPU player or picking Random.
    - Using different plugins in netplay. the default plugins for Project64k are:
    *Jabo's Direct3D7 1.40 [Video]
    *Azimer's Audio v0.30 (Old Driver) [Audio]
    *Jabo's DirectInput7 1.40 [Input controls]
    - Adjusting Azimer's Audio v0.30 "buffer size" to other than the default value and disabling "audio fix".
    - Using Custom Textures on netplay.
    - Playing on a slow computer (OFFLINE Smash running at lower than 60 FPS so check that first before playing Online)
    - Having a different or corrupted SSB ROM (I used to have a ROM that would freeze the screen whenever DK did a Back throw)
    - Not resetting(disable then enable again) Gameshark codes in old servers. EmulinkerSF and Emulinker X no longer need this but may still desynch if there's no "cheat reset".
    - Activating certain cheats before you're supposed to (e.g. some cheats require you to start them during the match or on the 1p screen)

    How do I fix it?
    In order to fix desynchronization it is important to know exactly what's causing it, for example, if you usually play full screen and it desynch a lot then you should play in windowed mode, if you recently changed your plugins and it started to desynch try rolling back any changes. Also check on your friends for the same issues as it may be them the ones encouraging the desynch.

    Playing on P2P has better chances to keep you synched longer so try that for 1v1 instead of servers whenever is possible.

    The AQZ NetPlay v0.12 plugin for "4 player P2P" seems to have a very low "desynch ratio" however it doesn't work well for everyone. Also it can be used on any n64 emulator so you can experiment with it.
    -------------------------------------------------------------------------------------------
    Discuss?

    Please help expand this guide so we can enjoy online smash better!

    Contributors

    - B Link
  2. B Link

    B Link Smash Lord

    Joined:
    Sep 26, 2007
    Messages:
    1,482
    Location:
    Toronto, Ontario
    Well one obvious thing that you didn't include as causes for desync: cheats.

    This includes:
    - not resetting cheats (sometimes)
    - activating certain cheats before you're supposed to (e.g. some cheats require you to start them during the match or on the 1p screen)
  3. SilentSlayers

    SilentSlayers Smash Journeyman

    Joined:
    Aug 16, 2009
    Messages:
    328
    Who cares about DS, Project 1.7 never DSes. n00bs
  4. Peek~

    Peek~ Smash Lord

    Joined:
    Dec 9, 2007
    Messages:
    1,281
    Location:
    (`ω´ )
    Doesn't wireless desynch alot?

    Also playing on LAN desynchs much more than playing on Good, at least from what I've seen
  5. ciaza

    ciaza Smash Prodigy

    • Premium
    Joined:
    Aug 12, 2009
    Messages:
    2,692
    Location:
    Australia
    I play wireless and I rarely desynch. Certainly less that other people I have played against.

    Good guide Jaime.
  6. SuPeRbOoM

    SuPeRbOoM Smash Master

    Joined:
    Oct 27, 2005
    Messages:
    4,313
    Location:
    Fredericton, New Brunswick
    HolyQuebec desynced from the rest of us on Mario party 2 10 turns in. That was gay as ****.
  7. ciaza

    ciaza Smash Prodigy

    • Premium
    Joined:
    Aug 12, 2009
    Messages:
    2,692
    Location:
    Australia
    ^That's why you set the settings to save after every turn, then once you DS (it's inevitable in Mario Party), you make a new game and join in the same order you did the first time. The game should of kept the save data and you can play from where you left off.
  8. Fynal

    Fynal Smash Journeyman

    Joined:
    May 6, 2010
    Messages:
    240
    at one point i was convinced that playing LAN made you DS more than exc, and it sort of makes logical sense, more packets = more ds, but honestly looking back to old galaxy it really doesn't feel that way. new galaxy is 20 ping closer to me, which might help though
  9. blaze3927

    blaze3927 Smash Ace

    Joined:
    Aug 12, 2009
    Messages:
    821
    Location:
    Canberra
    PACKET LOSS nubs

    TROUBLESHOOT:

    ping 175.107.148.37 -t
    tracert 175.107.148.37
  10. SuPeRbOoM

    SuPeRbOoM Smash Master

    Joined:
    Oct 27, 2005
    Messages:
    4,313
    Location:
    Fredericton, New Brunswick
    no

    This only happened when HolyQuebec joined us for the first time. Other times we played for 3 hours with no ds.
  11. SilentSlayers

    SilentSlayers Smash Journeyman

    Joined:
    Aug 16, 2009
    Messages:
    328
    Better 10 turns in, then 15 huh? :D

    Anyway, that's just an outlier, it rarely DSes.
  12. Surri-Sama

    Surri-Sama Smash Hero

    Joined:
    Apr 6, 2005
    Messages:
    5,450
    Location:
    Newfoundland, Canada!
    LAN definitely causes more dropped packets thus more DSs then EXC
  13. Sraigux

    Sraigux Smash Journeyman

    Joined:
    Jun 26, 2007
    Messages:
    302
    Location:
    Edmonton, AB
    Normally, when I desynch, pj64k crashes. Like 90% of the time. Any ideas?

    I have noticed the switch to LAN has a lot more DSes. A LOT MORE
  14. Battlecow

    Battlecow Play to Win

    Joined:
    May 19, 2009
    Messages:
    8,666
    Location:
    Chicago (school year), Champaign (summer)
    Should be twice as many exactly, right?

    Still definitely worth it.
  15. Dragoon Fighter

    Dragoon Fighter Smash Debater

    Joined:
    May 23, 2010
    Messages:
    1,881
    Location:
    I still love my ponies.
    I wish to vote this guide for a sticky.
  16. Surri-Sama

    Surri-Sama Smash Hero

    Joined:
    Apr 6, 2005
    Messages:
    5,450
    Location:
    Newfoundland, Canada!
    Or the index...the same as most threads that people think should be stickied
  17. NixxxoN

    NixxxoN Smash Master

    Joined:
    Jun 16, 2008
    Messages:
    3,726
    Location:
    Barcelona
    As far as I know, Online PJ64k uses UDP protocol.

    There is nothing that can be done to prevent some eventual desynchs as long as the UDP protocol is there. It's just how it is. UDP has no error checking for data packets, making it a fast way for data transfering, but not very secure. thats why the DS'es exist.

    [​IMG]
    [​IMG]
  18. JaimeHR

    JaimeHR Smash Ace

    Joined:
    Oct 25, 2005
    Messages:
    893
    Location:
    Mexicali, Baja California, Mexico
    Brawl Friend Code:
    3308-4828-5913
    I really think there's a huge missconception about desynchronization, connection time out and package dropping (Network protocol issue) they are not the same thing.

    I'm not sure if the "package loss" error should be considered as desynchronization since that's more likely to be a network problem and stable connections will rarelly drop packages. Also... Server's can't really detect a desynchronization.

    I have just tested this with nova, I timed out my connection on porpoise by pausing emulation on my side, which causes to pause nova's emulator as well, after a 15 seconds pause, once I unpause emulation the server's "Desynch" message appears:

    <Desynch Detected!> JaimeHR, you are lagged from the rest of the people in the game.

    So to this point it seems pausing emulation on one side causes the game to desynch, but then I tried something different, now with 4 players, I paused and unpaused my emulator every 2 seconds, causing a "lag spike" effect... As expected everyone else's emulator paused along with mine and the game was still synched.

    Now I proceed to cause a real desynch to the game on porpoise by adding a CPU, while in my end I saw Captain Falcon CPU, everyone else had different characters as my CPU slot on their screens which meant the game was really desynched, however, there was no message at all alerting this.

    Now I just need to trigger this "package dropping" thing so I can keep testing this stuff and probably clear this desynch = connection time out/package lost missconception. (then update it to the guide)
  19. blaze3927

    blaze3927 Smash Ace

    Joined:
    Aug 12, 2009
    Messages:
    821
    Location:
    Canberra
    ill try a few p2p gamesw with a ping running to the same ip, see the packet loss %.
  20. firo

    firo Smash Journeyman

    Joined:
    Jul 27, 2008
    Messages:
    498
    Location:
    Champaign, Illinois
    This is all very useful information to me. Trying to figure out all of this looking at the netcode is a fruitless task. Maybe we'll finally pin down what causes the random pause and desynched detected message for some players (including me) after a few matches in a row.

    Yes, kaillera uses UDP, but that's by design - UDP is faster than TCP. Eventual desynchs are not unavoidable, either. I'm not exactly clear on how the p2p protocol works, but continuous play on that is possible and uses UDP.

    What kaillera does do, however, is send about the last five instructions whenever it relays information to another player. The client checks to see if it missed any messages, and if it has, it reads the last instruction or two (like a keypress) and executes it. There is some timeout value that the server allocates until it stops waiting for an instruction packet and declares that the game is desynched (lag out in this case, the "Desynched Dected!" message is a bit misleading).

    Of course kaillera has no overhead to detect actual desynchs, so even though the clients may be receiving correct instructions, kaillera has no way to determine if what is happening on your screen is happening on the other players' screens.

    When an actual desynch occurs, you can sometimes figure it out if something happens in a game that seems extraordinarily close or out of the ordinary, if a move hits you when you hit the very edge of a hitbox, or someone makes a recovery that looked really close to the edge, for example. In this case, desynchs are occurring due to what I would think to be unstable emulation. The constant stops and starts means that emulators might handle things a little differently (also explains why different emulators have different desynch rates) and events that depend on randomness can be effected by the very small difference from when you press the key on your emulator and the emulator of your opponent gets it.
  21. Korrupshen

    Korrupshen Smash Ace

    Joined:
    Apr 4, 2010
    Messages:
    518
    Location:
    dat place
    If Mupen is better and desyncs less, why won't you just have everybody switch over on Galaxy like we did when switching everyone over from Excellent to LAN.

    If its possible and if its not too much work you should just let the server allow Mupen emulators to be hosted.

    To see how much better Mupen64k is to PJ64K, have everyone play on Mupen64k for a day. [If this hasn't been done already]
  22. Surri-Sama

    Surri-Sama Smash Hero

    Joined:
    Apr 6, 2005
    Messages:
    5,450
    Location:
    Newfoundland, Canada!
    some people cant play on mupen, plus it takes more resources.

    It also lies about fps rate to make you think it's your friend.
  23. Skrlx

    Skrlx Smash Champion

    Joined:
    Jan 18, 2008
    Messages:
    2,487
    if your terribad opponent picks CPU's or "random" on stage selection and your game desynchs you can always reset the game via pausing to get back in sync

    TRY IT OUT
  24. Korrupshen

    Korrupshen Smash Ace

    Joined:
    Apr 4, 2010
    Messages:
    518
    Location:
    dat place
    Is TCP Turbo faster than UDP, because my router has that option. Though I'm still not allowed to get into it.....
  25. dandan

    dandan Smash Lord

    Joined:
    Feb 11, 2009
    Messages:
    1,372
    the aqz plugin works with tcp, and shows promising results.
    the main problem with it is that it always enforces the highest delay from host to one of the players to all.
    that is why the host should always be in the middle and they should not be far apart.
    maybe i or someone like firo should look at the netcode of aqz and look into changing that option.
  26. Battlecow

    Battlecow Play to Win

    Joined:
    May 19, 2009
    Messages:
    8,666
    Location:
    Chicago (school year), Champaign (summer)
    Mupen basically takes a lot more to run, so we'd have a bunch more LAGGERS running around, and that's the last thing we need.
  27. Fynal

    Fynal Smash Journeyman

    Joined:
    May 6, 2010
    Messages:
    240
    switching to LAN took a forced several weeks of no exc, and was against the better part of the community, probably because people were too lazy/didnt think others would (same reason why we stay on LAN now)

    I've tried to run Mupen on one of my home computers thats lag free 99% of the time and it had low fps in freeking 1player

    probably not a good way to, well, improve the community
  28. firo

    firo Smash Journeyman

    Joined:
    Jul 27, 2008
    Messages:
    498
    Location:
    Champaign, Illinois
    Forcing mupen wouldn't work out too well, especially since it doesn't run well for some people. It also is a much bigger change than just changing one item on a menu. Trying to hook kaillera into mupen64plus would be an interesting project as it is stable and open source (and has just recently been ported to android!)

    Resetting the match to try and resynch only works sometimes for me, as the game often desynchs a bit later. If a different cpu is picked and you tell your opponent where the cpu button is on your screen, he can move to it, press a to pretend and grab it and move it to its right location. It can be used to show people combos online in training mode. That seems to keep things synched, for me at least.

    A cool option would be using kaillera in addition to the aqz plugin. I have no idea what happens if you run both at the same time, but you could make a game, close off the number of users, and start just by clicking the rom and connecting to your opponent using the aqz plugin. That way you can still chat and have presence in the community.

    The aqz plugin is not open source, and I do not think the author is planning to make it so. The reason why it enforces the highest delay is because the host is essentially hosting a server, and therefore the host must wait for everyone to send and receive their packets.

    Korruption, the "Turbo TCP" option just sets a priority on your router for TCP packets, meaning that if your bandwidth is clogged the router will always send out those packets first. It might improve speed on your end, but the TCP protocol is still inherently slower that UDP.
  29. Dragoon Fighter

    Dragoon Fighter Smash Debater

    Joined:
    May 23, 2010
    Messages:
    1,881
    Location:
    I still love my ponies.
    Why is LAN better then excellent?
  30. DMoogle

    DMoogle A$

    Joined:
    Jan 28, 2008
    Messages:
    2,365
    Location:
    Northern VA, USA
    Brawl Friend Code:
    3566-1363-8674
    Lower delay. LAN can get as low as 1 frame, whereas Excellent can only get as low as 3 frames. IIRC as ping goes up, the gap between the two becomes wider.
  31. Sraigux

    Sraigux Smash Journeyman

    Joined:
    Jun 26, 2007
    Messages:
    302
    Location:
    Edmonton, AB
    Would switching to project 64k 0.17 help with desynch issues?
  32. DMoogle

    DMoogle A$

    Joined:
    Jan 28, 2008
    Messages:
    2,365
    Location:
    Northern VA, USA
    Brawl Friend Code:
    3566-1363-8674
    There is no such thing as project 64k 0.17. 0.13 core 0.14 is the latest version.
  33. SuPeRbOoM

    SuPeRbOoM Smash Master

    Joined:
    Oct 27, 2005
    Messages:
    4,313
    Location:
    Fredericton, New Brunswick
    A$ has been living under a rock.
  34. DMoogle

    DMoogle A$

    Joined:
    Jan 28, 2008
    Messages:
    2,365
    Location:
    Northern VA, USA
    Brawl Friend Code:
    3566-1363-8674
    There's a Project 64 0.17 (and a non-kaillera online plugin to go with it), but no Project 64k (which implies it uses kaillera) 0.17.

    I'm not sure what you're referring to.
  35. SuPeRbOoM

    SuPeRbOoM Smash Master

    Joined:
    Oct 27, 2005
    Messages:
    4,313
    Location:
    Fredericton, New Brunswick
    Instead of dmoogle giving you the right information but not informing you right, I'll just tell you.

    Project 64 1.7 online with the AQZ plugin has far less desync problems compared to regular Project64k.

  36. DMoogle

    DMoogle A$

    Joined:
    Jan 28, 2008
    Messages:
    2,365
    Location:
    Northern VA, USA
    Brawl Friend Code:
    3566-1363-8674
    JERK. But I'm not wrong.

    I need to get started on using the 1.7 client, I've heard it's awesome. Isn't it basically just a better P2P?
  37. Sangoku

    Sangoku Moderator

    • Moderator
    Joined:
    Apr 25, 2010
    Messages:
    3,280
    Location:
    Geneva, Switzerland
    It's a kind of better p2p I guess, except you can have more than 2 players. And the player in the center will be the server so that the delay is the lowest.

    Some say it's great (including myself, I get one frame less against dandan with no lag at all), but others say it's laggy.

    One thing for sure it ds a lot less. Even when you pick random stages/CPU.
  38. SuPeRbOoM

    SuPeRbOoM Smash Master

    Joined:
    Oct 27, 2005
    Messages:
    4,313
    Location:
    Fredericton, New Brunswick
    I play Mario party games frequently on Project 1.7 without desync.
  39. Sangoku

    Sangoku Moderator

    • Moderator
    Joined:
    Apr 25, 2010
    Messages:
    3,280
    Location:
    Geneva, Switzerland
    Yeah I don't remember having dsed not even once. Except one time I tried (by mistake) with pj 1.6 and the AQZ plugin with someone who had pj 1.7 and that didn't work right.

    I don't understand why most people don't want to play with 1.7 though.
  40. Surri-Sama

    Surri-Sama Smash Hero

    Joined:
    Apr 6, 2005
    Messages:
    5,450
    Location:
    Newfoundland, Canada!
    I'd assume it has something to do with the distribution of it, along with the fact that it's annoying to set-up...some what.

Share This Page

Users Viewing Thread (Users: 0, Guests: 0)

We know you don't like ads
Why not buy Premium?