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
148 stars 16 forks source link

Add vibration support #4

Closed MrStahlfelge closed 4 years ago

MrStahlfelge commented 4 years ago

There should be configurable vibration support both for touch input and for game controllers.

Different vibration length should be available for:

Further suggestions appreciated.

MrStahlfelge commented 4 years ago

Most is implemented in 1126af7, still a TODO left: https://github.com/MrStahlfelge/lightblocks/blob/86ec283e296c772eab020e224b51d2c13bb9d566/core/src/de/golfgl/lightblocks/input/PlayKeyboardInput.java#L121

Reference to issue #5 was a mistake.

MrStahlfelge commented 4 years ago

So far it looks like it does not work on Android 9, despite I had tested it successfully last year (and so did the original code author). It is still an issue on the AOSP issue tracker, so probably very few controllers will vibrate.

Need to decide if the feature should be hidden on Android and iOS, or if we should just use device vibration if controller does not support vibration and "only on gamepad" option is not set.