• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

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

JaimeHR

Smash Ace
Joined
Oct 25, 2005
Messages
912
Location
Mexicali, Baja California, Mexico
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
 

B Link

Smash Lord
Joined
Sep 26, 2007
Messages
1,579
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)
 

Peek~

Smash Lord
Joined
Dec 9, 2007
Messages
1,284
Location
˙͜ >˙
Doesn't wireless desynch alot?

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

ciaza

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

Good guide Jaime.
 

ciaza

Smash Prodigy
Premium
Joined
Aug 12, 2009
Messages
2,759
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.
 

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
 

Surri-Sama

Smash Hero
Joined
Apr 6, 2005
Messages
5,454
Location
Newfoundland, Canada!
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
LAN definitely causes more dropped packets thus more DSs then EXC
 

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.


 

JaimeHR

Smash Ace
Joined
Oct 25, 2005
Messages
912
Location
Mexicali, Baja California, Mexico
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)
 

firo

Smash Ace
Joined
Jul 27, 2008
Messages
600
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.
 

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]
 

Skrlx

Smash Champion
Joined
Jan 18, 2008
Messages
2,673
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
 

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.....
 

dandan

Smash Lord
Joined
Feb 11, 2009
Messages
1,373
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.
 

Battlecow

Play to Win
Joined
May 19, 2009
Messages
8,746
Location
Chicago
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.
 

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
 

firo

Smash Ace
Joined
Jul 27, 2008
Messages
600
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.
 

DMoogle

A$
Joined
Jan 28, 2008
Messages
2,366
Location
Northern VA, USA
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.
 

SuPeRbOoM

Smash Master
Joined
Oct 27, 2005
Messages
4,509
Location
Edmonton, Alberta
Would switching to project 64k 0.17 help with desynch issues?
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.

IM PURPOSELY BEING A JERK
 

Sangoku

Smash Master
Joined
Apr 25, 2010
Messages
3,931
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.
 

Sangoku

Smash Master
Joined
Apr 25, 2010
Messages
3,931
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.
 
Top Bottom