MrStahlfelge / lightblocks

Falling Lightblocks. Falling block game for Android (Mobile and TV), iOS, Web browsers. Works on desktops, too.
https://www.golfgl.de/lightblocks/
Other
140 stars 15 forks source link

8bitdo zero 2 dpad works in setup, not in game on iOS #21

Closed fprimex closed 3 years ago

fprimex commented 3 years ago

The 8bitdo zero 2 in MacOS mode shows up to iOS as a Dualshock 4 controller. The d-pad cross is sent to the OS as 8 input directions for the analog stick. I tested this with an app from the app store.

During controller setup, when the inputs for right & down are requested, the inputs from the d-pad for right & down are recognized. However, once in game the directional controls are totally absent.

The chosen button presses for spins, hard drop, etc all work as configured.

iPhone XS Max MT622LL/A on 14.2, Falling Lightbricks 1.5.2009.

Let me know if I can help in some way. This was the first game I tested & am most excited to play with my new mini controller.

MrStahlfelge commented 3 years ago

Sorry to hear you have some problems with the game. Thanks for your offer to help. Are you skilled in building and testing something on your device yourself to track down the problem?

fprimex commented 3 years ago

I am, yes. I can give it a shot. I have not worked with Java in a very, very long time.

MrStahlfelge commented 3 years ago

Great to hear. You won't have to debug anything in Java as there is a dedicated test application for the controller integration I use. The more difficult thing is to get something to run from source on an hardware iOS device. Did you already run something you've made from xcode on your device? If not, we are better off when I try to get the controller to test with myself.

fprimex commented 3 years ago

Hi, I have some good news (I think?). The issue does not appear to be specific to the 8bitdo zero 2 controller, but rather with, at least, the Dualshock 4's analog stick handling.

I paired another controller that identifies as a Dualshock 4 (a TERIOS; highly recommended)).

When Falling Lightbricks configures this controller with the d-pad there is no issue. However, when the controller is configured using the analog stick for right and down, the left/right/soft drop motions are ignored in-game. Additionally, up cannot be used for hard drop.

The d-pad for the 8bitdo is sending analog stick signals as it has no separate analog stick, and the stick is what most games use for movement controls.

For anyone coming here from a google search - one workaround is to pair the 8bitdo zero 2 as a keyboard and use it that way. Should work fine.

I believe you will be able to diagnose this more quickly than I will be able to get around to getting a build to load onto my hardware set up. I can if you want, but hopefully the above helps to sufficiently narrow down the issue.

Cheers.

MrStahlfelge commented 3 years ago

Yep, looks like it is just an issue with analog stick input. I only have an Xbox controller to check with, but I hope i can reconstruct the problem using that controller, too. I must confess I used its d-pad only to test. :D

MrStahlfelge commented 3 years ago

I am happy to confirm the problem with the analog sticks and I was able to track down the two causes. I will be able to fix this for the next release. Thank you for the hint and the tests.

fprimex commented 3 years ago

That's great, thank you! One request - while addressing this, could you see if "up" on the analog stick can be used as hard drop? I would never play with analog either but in the case of the 8bitdo zero 2 that's how it presents itself.

MrStahlfelge commented 3 years ago

Yes, that problem will be fixed, too.

MrStahlfelge commented 3 years ago

Tested successfully, analog stick is now working in-game and for hard drop on up, too.

The fix will be included in the next release. Thanks again.

fprimex commented 3 years ago

Thank you!

fprimex commented 3 years ago

Not to be pushy, but when do you think the release with this fix will be available as an update in iOS?

MrStahlfelge commented 3 years ago

No problem, I am glad you are still interested in getting the fix.

Because releasing on iOS is some more complicated, I usually release new versions to Android Beta channel at first. When no negative feedback or crash reports indicate problems, I begin a staged rollout to Android and if everything is fine after some days, I submit the iOS version to Apple for review. The latest version with the fix is on beta at the moment and I will start the staged rollout on Android next week. So I would expect the iOS version to roll out in around 10 days.

I know this is quite some time from reporting the error until getting the fix, but I hope for your understanding. :-)

MrStahlfelge commented 3 years ago

v1.5.2103 with the fix is rolling out on iOS now