b3dgs / lionheart-remake

Java remake of Lionheart amiga game
https://lionheart.b3dgs.com
GNU General Public License v3.0
78 stars 7 forks source link

Joypad Jump-Right Direction Conflict #357

Closed Commodusaurel closed 10 months ago

Commodusaurel commented 1 year ago

After some playing time (but still in the first level) there is a conflict of the jump and right direction function. If you press Jump, you cannot jump to the right, or it gets stuck. But my X-Box 360 controller is perfectly fine.

Specifications

Commodusaurel commented 1 year ago

The problem must be X-Box Controller 360 specific. At a certain point, the game will require the controller to be in its home position before you can move left or right. This error does not occur with a joypad without analog control (Sega Mega Drive USB Pad).

DjThunder commented 1 year ago

Thanks a lot for this analysis, I will check what can be done (but I will need to reproduce it, or check with you to ensures it is fixed).

No problem at the beginning ? Only after few times ?

Commodusaurel commented 1 year ago

I tested the game with 2 Xbox360 controllers. Both are 100 percent ok. In both cases, the control error occurs after a short time in the first level. If I press "Jump+Right" he only jumps up but not to the right. As a result, Lionheart always falls into abysses. I think there is some conflict there. It is likely that both analog sticks and the directional pad should not be occupied. The strange thing is that it works fine initially. Everything works perfectly with my Sega Mega Drive-USB Controller.

DjThunder commented 1 year ago

I think I found and fixed it. I reproduced the same bug, and noticed that even outside my game, the controller is completely buggy (even from window device panel, the analog stick is stuck on down-left). So to fix it I changed the way of listening to theses events, and it works now. I will send you a beta test when you will have free time.