libretro / RetroArch

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

Opposing direction combination inputs cause glitched movements #6573

Closed ghost closed 6 years ago

ghost commented 6 years ago

Description

When pressing / quickly alternating / holding both left and right (or up and down in some games) directions at the same time, unusual behavior that can best be described as zipping occurs, and can cause the player to clip through ground / walls / etc. Needless to say, it's banned in the speedrunning community and should be disabled by default as Core Option / Input Setting.

Standalone emulators like FCEUX have an option disabled by default labeled Allow Up+Down / Left+Right. I feel it'd be best if RetroArch adopted this.

I'm going to tag @fr500 just in case he's interested due to all of his hard work on the new input mapper.

Expected behavior

Pressing left and right / up and down simultaneous is not physically possible except on a keyboard (unless the d-pad has been remapped to buttons) and shouldn't be allowed, at least by default. Standalone emulators like FCEUX have an option disabled by default labeled Allow Up+Down / Left+Right. I feel it'd be best if RetroArch adopted this.

Actual behavior

See video: https://streamable.com/9n6sz

See also: 2018-04-14--021321_1600x900

Steps to reproduce the bug

  1. Load a sidescrolling action / platform game such as Zelda II - The Adventure of Link (NES) or Bonk's Adventure (GB)
  2. Press and hold (or even quickly alternate / hold one and tap the other) left and right (on a keyboard unless you remapped d-pad left and d-pad right to actual buttons)
  3. Observe

Bisect Results

Did not bisect.

Version/Commit

Environment information

inactive123 commented 6 years ago

OK, just to be clear, this issue always happened and is not necessarily related to the new input remapping code right?

ghost commented 6 years ago

I'd like to say so given it affects even standalone emulators, I believe this is a Day 1 issue that's been simply overlooked. However, the remapping code allows for it occur via controller if one remaps the d-pad to buttons and then holds at least one while tapping or holding another.

inactive123 commented 6 years ago

Added core options to FCEUmm, snes9x git and Gambatte for this.

ghost commented 6 years ago

Can confirm options work for mentioned cores. Should I close this or leave it open in case I find other affected cores?

i30817 commented 6 years ago

Does this matter for the snes? I've seen it nes (in Zelda II too) but not on snes games? I guess it doesn't really matter though. since opposing directions is something that no game wants you to press.

i30817 commented 6 years ago

BTW, can you please test 'Die Hard (Japan).pce' in mednafen_pce_fast_libretro? If you move the movement keys here for a while tapping, you'll eventually get into a infinite cycle of spinning. Not sure if the same problem? It's easy to see just by starting the game level 1 (it starts automatically) and then messing around with the keys.

ghost commented 6 years ago

I'll look into it after I catch up with the other stuff I need to do first. Hopefully some time today.

inactive123 commented 6 years ago

OK, open new issues up in the individual core repos that need a fix.

ghost commented 6 years ago

Will do. Thanks

ghost commented 6 years ago

@i30817 Can confirm, will file an issue later. It seems to require that at least 3 different directions need to be pressed at once to trigger the infinite spinning glitch. New Adventure Island does some.... interesting things when Up+Down is held.