RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

Clients can't connect without matching content or connect without reloading when a game is underway

Open andres-asm opened this issue 9 years ago • 6 comments

Description

The current content matching system depends entirely on playlists which makes it impossible for people to play content that can't be scanned or for people who don't use playlists to join a game.

Proposal

All these should be done:

  1. Allow it to work like before, ie, setup the netplay connection and try to connect on content load
  2. If the proper content is already loaded don't trigger a reload, just setup the connection.
  3. Add a fallback scanning method that uses a dir_list. It would have to do the following:
  • Look for all the roms (including archives) in rgui browser dir.
  • If the matches are archives, peek inside the files to check if it's a supported extension for the core (otherwise it might end up loading Super Street Fighter II (USA).md when trying to load the SNES version

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

andres-asm avatar Feb 02 '17 18:02 andres-asm

For 1, it should be enough to add: command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); at https://github.com/libretro/RetroArch/blob/master/tasks/task_netplay_find_content.c#L62

And update the message to tell the user to load content manually.

Then a user should then be able to connect like this:

  • Connect to lobby, the message would tell him content wasn't found
  • Ask the user to load content manually

andres-asm avatar Feb 02 '17 18:02 andres-asm

Actually it might be better to put whole command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); before this: https://github.com/libretro/RetroArch/blob/master/tasks/task_netplay_find_content.c#L215

andres-asm avatar Feb 02 '17 19:02 andres-asm

For 2, it's only possible when the core doesn't have any serialization quirks so I think it's a waste of time... reinitializing seems always the better solution.

In case anyone wants to test, you could validate the client core name, core version and current game crc/filename before these line: https://github.com/libretro/RetroArch/blob/master/tasks/task_netplay_find_content.c#L62

If everything matches then do a normal netplay connect (not deferred)

Edit: I guess the hoster could advertise the quirks and then suggestion 2 would be possible in a few cases.

andres-asm avatar Feb 02 '17 19:02 andres-asm

For 3, it's a lot more complex, a file based scanner would have to be implemented here:

https://github.com/libretro/RetroArch/blob/master/tasks/task_netplay_find_content.c#L214

I think what it should do is something like what @bparker06 implemented for the scanner, look at all the possible files in the browser directory, then look for filename matches and finally check the CRCs of the file inside the zip.

andres-asm avatar Feb 02 '17 19:02 andres-asm

As coordinated over irc, https://github.com/libretro/RetroArch/pull/4554

JuanVCS avatar Feb 02 '17 19:02 JuanVCS

Also see the Alternative Scanning Method issue #2033.

RobLoach avatar Apr 11 '18 14:04 RobLoach