Is there any API for vibration? (DEF-2066)

I have not been able to find any documentation or forum threads about vibrating the phone. Is there any api for this at the moment?

2 Likes

Not yet, there isn’t. I’ll add it to the backlog though.

1 Like

It’ll be great to have vibration

3 Likes

Hi, just wondering if this feature has been added yet. Also, is it possible to view the backlog to see when items like this are scheduled for.

No it has not been added yet I’m afraid. I’m fairly sure we will share our roadmap after the summer vacations. Am I right @Oleg_The_Evangelist?

Note: The full backlog is located in our internal issue tracking system shared by many teams at King, and we cannot share even the Defold part externally. Sorry.

OK, yeah - I understand about the backlog. The roadmap would be nice to see though.

Cheers
Brian

I’ve created a native extension for this on iOS. https://github.com/adamwestman/extension-vibrate/

Enjoy!

10 Likes

@Adam_Westman: Please add this to the Asset Portal.

3 Likes

Sure thing, unless someone @sven already has one that support Android also?

I don’t think he has. I’ve made a note to create a PR for Android support. Expect it in your repo next week!

2 Likes

Sounds like a plan!

You could add gamepad rumble support to it too. It’s on my list of things I wanted to do but haven’t yet. Gamepad+mobile device vibrate in the same place makes sense to me.

3 Likes

Better late than never! @Adam_Westman, PR for Android support submitted!

5 Likes

You can now vibrate with patterns on Android https://github.com/subsoap/vibrate

I don’t have enough test devices for iOS handy right now so I can’t make patterns work for iOS. AFAIK there are at least 3 ways to vibrate on iOS depending on what version the device is on which all have to be handled.

5 Likes

Has vibration support been added to Defold engine yet?
I can see the question was first asked 6 years ago, but I can’t seem to find any documentation in Defold for vibration.

1 Like

Defold is designed to have minimal built in core functionality, and the expectation is for users to pick and choose extensions to supply additional functionality. Vibration is an example of functionality that resides in an extension:

8 Likes

Yep, Alex is right. Our design decision is to have a minimal engine core and let users pick the extras they need. This way everyone is guaranteed a small and performant engine without things they may not need. And since we apply this design principle to all platforms Defold will run in places where other engines will struggle.

And when it comes to the plugins (or extensions as we call them) the Defold Foundation provides a large number of officially supported extensions for ads, analytics, game services and much more. And on top of that there’s plenty of community developed extensions, such as the vibration extension.

Most extensions can be found in the asset portal: https://defold.com/assets

4 Likes