libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.3k stars 1.84k forks source link

Netplay issue. Player 2 has no inputs when connecting via Direct Connect but has inputs when using Relay Server. #13012

Open Clutz450 opened 3 years ago

Clutz450 commented 3 years ago

Description

When myself and a friend try to play games online via Netplay, when using the relay server, the Player 1 and Player 2 controller inputs work as expected. When using direct connect, the host connects as Player 1 and his inputs are fine. When Player 2 tries to join, it says he joined as Player 2 but none of his inputs work. However, if Player 2 plugs in a second controller so that it shows the second controller connected as Port 2, he can play just fine using that second controller.

Expected behavior

I expect for the Host and for the person joining to both be able to use their controllers without any additional setup or workarounds while using Direct Connection Netplay

Actual behavior

When using Direct Connection NetPlay, when Player 2 connects they don't have any input controls. Input controls work correctly when using Relay Server though.

Steps to reproduce the bug

  1. Start up RetroArch and load up the Final Burn Neo Core (that's the one we were using but I would assume the same thing happens on other cores. Sorry I didn't think about testing other cores at the time).
  2. Load up any multiplayer Final Burn Neo game (we were using TMNT and The Simpsons).
  3. Connect to each other via Direct Connect Netplay (Player 2 will not be able to control anything). 3a. (Optional) Have Player 2 plug in a second controller and see that this second controller can now control Player 2's in game controls.
  4. Exit Netplay
  5. Restart Netplay using the Relay Server (you will see that Player 2 can now control in game without needing a second controller plugged in)

Bisect Results

I do not know when this started happening. I always use Relay Server because I cannot forward ports. But my friend was noticing too much stutter through the relay server which is why he wanted to try Direct Connect and this is when we discovered these issues.

Version/Commit

You can find this information under Information/System Information

Environment information

andres-asm commented 3 years ago

can't reproduce here

Clutz450 commented 3 years ago

Radius over in Discord was kind enough to help me test out NetPlay and troubleshoot this. In the end, we were able to connect and play just fine without me changing anything on my end. It's just weird because it wasn't just me it was happening to but my 2 other friends said they were experiencing the same thing independently of me. I will continue troubleshooting with them when they become available and report back here what I found. Thank you.

Clutz450 commented 3 years ago

Sorry it's been like a month but I haven't had time myself or been able to find a friend with time to troubleshoot this further. But tonight I did and I am still having this issue. This time we tested what would happen if I was hosting a game and someone tried to spectate and as soon as someone joined I lost all controls from my controller. I was still able to move with my keyboard though.

If anyone would like to help me troubleshoot this, I plan on streaming me and a friend troubleshooting this in one of the voice chat channels in the RetroArch discord server tomorrow (October 18th) at 6pm eastern time. Any help would be greatly appreciated. Either way, I intend to update this issue with my findings when done. Thank you.

Clutz450 commented 3 years ago

So after some testing last night, my friend and I tried connecting via Direct Connect Netplay just to verify that we were still having the problem and we did.

We then both downloaded a fresh install of RetroArch Windows 64bit to a separate folder and tested with all the default settings and we connected fine and our controllers worked no issue.

So we then updated our main RetroArch folder with 1.9.11 (we were currently on 1.9.9) and tried connecting again. We had the same issue of player 2 had no inputs from their controller.

Next we decided to move our retroarch.cfg file out and let RetroArch use all the default settings. This time everything worked as expected.

So it seems like it boils down to a settings issue but I cant figure out which one. Nor can I understand why it would work fine via relay server but not when direct connecting. My friend and I didn't have much time to troubleshoot but we definitely intend to troubleshoot this more. I'll report back my results.

MGislv commented 3 years ago

Me and a friend are encountering the same issue (I'm on linux and he's using windows). I started using netplay on 1.9.11, and I had this problem right away, only a config reset fixed it. A couple of days later we both updated to 1.9.12 and it broke again. We tested a bunch of cores and all have exibit the same behaviour, it's probably a general netplay bug.

Clutz450 commented 3 years ago

Thanks for your report. I noticed the same thing. Would you be up for doing some testing with me sometime to see if we can figure out exactly what is causing this? That's the hardest part for me right now is finding people to test with. You can find me on Discord as Clutz450#5167 if interested.

MGislv commented 3 years ago

I'll see if I can find some spare time this week.

ghost commented 3 years ago

If this happens again can you post the config that doesnt work and the config that does work it easy enough to do a diff on the configs and see whats different.

MGislv commented 3 years ago

Old (broken) config retroarch.cfg.txt New, working, config new.cfg.txt

Diff: diff.txt

MGislv commented 3 years ago

Found the line that was causing problems: input_libretro_device_p1 = "5" Setting it to "1", like the default cfg, fixes the problem. I don't know how updating could break that, well at least we have something.

ghost commented 2 years ago

Yea it reproducible should help in narrowing it down good work tracking it down!

OGDojo commented 2 years ago

okay so why is my retroarch in a different language and seem so weird now all i did was copy the contents of the txt file and used it to replace the contents of the Retroarch.cfg file. was that wrong? please help

MGislv commented 2 years ago

okay so why is my retroarch in a different language and seem so weird now all i did was copy the contents of the txt file and used it to replace the contents of the Retroarch.cfg file. was that wrong? please help

You're meant to change only input_libretro_device_p* lines back to "1" in your old(broken) config. That's what fixed it for me

LibretroAdmin commented 2 years ago

@Cthulhu-throwaway Can we close this or does this remain a relevant issue?

ghost commented 2 years ago

Not a bug and netplay->config_devices can't force all devices to retropad (1) because some cores require device(s)/port(s) other than retropad.

Clutz450 commented 2 years ago

@Cthulhu-throwaway Can we close this or does this remain a relevant issue?

I was the one that originally reported this issue. From what I remember, the general gist was that with a clean install of some version (can't remember which one) everything worked fine. But once we updated to the next version up, we experienced this issue.

And the weird thing to me and my friends that I tried troubleshooting with was that if we used the relay server, both of us had inputs working as expected. But if we connected via direct connect (I think that's what it's called) only the host would have control of controller 1. The person that was tying to connect as player 2 wouldn't have any inputs. But if that player connected a second controller to his computer, he would be have player 2 inputs on that second controller.

It was just really bizarre that none of this happened when using the relay server. We discovered that a clean install of the latest version corrected this so I was thinking that maybe some setting from an old version clashed with the new version when being updated vice a clean install and that's why this happened. I wanted to do further testing and find out exactly where that was but never did.

If you guys are curious to know exactly what this was and if it truly was fixed, I wouldn't mind redownloading this older version and attempt to make happen again. Otherwise I'll try to do a quick test with both the relay server and direct connect and make sure that everything with the latest version works as expected before you close it.