Gamepad rumble

Greetings!

If I’m not mistaken Defold does not support gamepad rumble as it depends on GLFW for input and well, this library does not support it, sadly. Is there a native extension that supports it? I’m rolling my own with the Gamepad API for HTML5 and SDL 2 for anything else after searching around but just checking.

Thank you!

Correct. Discussion here: Support for haptic feedback (vibration, rumble) · Issue #57 · glfw/glfw · GitHub

Thank you for the reply and the link.

I think I have read this discussion before.

So, what do you mean exactly? Are you suggesting to fix this upstream on GLFW?

It would be great if that was the case yes. I think there’s even a PR that we could merge. I don’t want to maintain a branch though so it would be better to work to get it merged to the main repo.

But that is only half of the work. You then also need to add support in Defold. So maybe in the short term it’s faster to make a native extension?

I agree, that would be ideal. I assume you mean this PR: Gamepad rumble effects by MDZhB · Pull Request #1678 · glfw/glfw · GitHub

However, it hasn’t been merged in more than 5 years, and based on GLFW’s release history and the reported progress state of 3.5, it seems unlikely that it will make it into a stable release any time soon. Maintaining a dedicated fork just for this feature would not be worth it indeed.

I think it is, yes. I have a WIP already.

Would you like that I submit it to the Asset Portal once it’s ready for testing (and hopefully community contributions)?

I agree. I wonder why it hasn’t been merged and if the maintainers wanted a different solution, or maybe it should not be part of glfw at all?

Yes, that would be great!