Project

General

Profile

Actions

Emulator Issues #9451

closed

Different Input Devices cause Netplay Desync (again!)

Added by JMC4789 about 9 years ago. Updated about 9 years ago.

Status:
Fixed
Priority:
High
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Using the Wii U Adapter and a different Input device on netplay will cause a desync when an input is done on the wii u gc adapter

If one person uses a Wii U adapter on netplay and the other uses a Standard controller it desyncs.

Actions #1

Updated by Fog about 9 years ago

Is there a reliable bisect for this?

Actions #2

Updated by mimimi about 9 years ago

How does the controller input work with netplay anyways?

I'd think it would work like this:

  • Every player sets the input we wants to use, to what he wants.
  • All other inputs are set to disabled by the players
  • If 2 players want to use the same slot, refuse to start
  • Internally set all remote inputs to a dummy input, that only receves via netplay. This dummy input doesn't know what the actual input is on the other side, nor does it matter.
  • Internally set all other inputs to disabled

Now, if netplay with the wii u adapter and emulated gamecube controllers works seperately, there's no reason to not work in a mixed setup. At least i fail to see how that could be possible.

Actions #3

Updated by mathieui about 9 years ago

mimimi wrote:

How does the controller input work with netplay anyways?

I'd think it would work like this:

  • Every player sets the input we wants to use, to what he wants.
  • All other inputs are set to disabled by the players
  • If 2 players want to use the same slot, refuse to start
  • Internally set all remote inputs to a dummy input, that only receves via netplay. This dummy input doesn't know what the actual input is on the other side, nor does it matter.
  • Internally set all other inputs to disabled

That's how it should work (except for making player select the pad number beforehand which is terrible for usability),

My take on how it currently works is:

  • Every player sets the N-first inputs to the N number of controller(s) they want to use
  • In the netplay UI, the host selects the number of controllers and how each user:pad is assigned
  • Internally all enabled inputs except the N first are set to Standard GC controllers, and a static var in the netplay client keeps track of the mapping
  • In-game, netplay functions are called on local controller poll event (Netplay_InGamePadToLocalPad, Netplay_GetInput), the first one one will be used to detect which controller it should output the rumble to (which fails with different input devices since it calls the rumble for standard controller, and not the other such as the adapter) ; the second one sends the local input if the controller is a local one (mapped with LocalPadToInGamePad) and buffers them for the relevant in-game controller as well, then read the buffered input for the current controller (the one at that position in-game).

And now my head hurts thanks to this mapping, once again.

@Fog: the bisect is most likely when HdkR cleaned up the way adapters are handled, like all of the other adapter/netplay issues

Actions #4

Updated by Fog about 9 years ago

Actions #5

Updated by JMC4789 about 9 years ago

  • Status changed from New to Fix pending
Actions #6

Updated by Fog about 9 years ago

  • Status changed from Fix pending to Fixed

Merged in latest master, will provide link when buildbot is working again.

Actions

Also available in: Atom PDF