Add vibrations to Hopscotch!

A feature I’d like to see in Hopscotch is:

A haptic/vibration block. I understand only iphones can vibrate so maybe there could be a variable that simply says the type of device (iPhone, iPad, Mac, or webplayer). Check out the design below

I’d use it for this type of project:

Any! It would make games feel more interactive, buttons more tangible and generally add another level of awesomeness to any project.

Here are some examples of Hopscotch code that could be improved if we had this:

Say you have game where the user has to complete a task in a certain amount of time. When the time runs out, the device could start vibrating. Another example is a maze game. When you run into a wall, the device would vibrate.

Here is an example design I’ve made:

Sorry, all the editing lowered the quality

I’ve seen something similar in another programming languages, it looks like this:

I don’t know how to do this in other languages but I’m sure there is a way.

What do you think?

Do we need this?
  • Yes!
  • No

0 voters

How often would you use this?
  • 1
  • 2
  • 3
  • 4
  • 5

0 voters

Please respond with thoughts, questions and feedback!

14 Likes

Maybe you could use this for alarms/alerts and notifications in your game?

8 Likes

It’s awesome for better feedback

4 Likes

I think it could be fun for feedback in some games, and I do wish that HS games could use more use of the hardware features of mobile devices (I’m loving the tilt sensors in particular right now).

But the fact that it is only available on the iphone means that you’d probably want some way of knowing (from within the HS game) if vibrate is available, so that some other feedback (like sound) is generated if there’s no vibrate. I worry that that would make HS, and games using vibrate, more complicated.

8 Likes

Yeah, thats what i was saying here:

Then like the example, you’d could do an if else

5 Likes

oh right. but there’s no precedent now for HS indicating what kind of device its on (though I think there have been some device guessers made, based on the game Width and Height values?), and I hope that as HS evolves things can become more rather than less unified about how games act on different devices.

but I’m curious what others think.

btw

at some other point I’ll ask you about the handwriting recognition thing you made; its amazing but mysterious to me.

7 Likes

This would definitely be useful to have!
I wouldn’t use it very often, but when I would, it would make the interaction in the game more fun.

2 Likes

Yea it would be a great idea

3 Likes

That would be cool, however not all devices are fitted with the ability of vibration/haptics (like most iPads). Although for the devices that can vibrate, this would be cool!

3 Likes

The ‘start sound’ block has a vibrate sound that I normally use, although it would be great to have a more wide range of options. It would also be nice if it had a vibrate turn-off button or a limit to the amount/time of vibrates in case someone makes a game where it just vibrates, or you just don’t want it to vibrate, like the pop-ups for spam.

4 Likes

Definitely!
There’s so much potential for it.

2 Likes

yeah, not every device have the ability to make vibrations, so it would be problematic for games that are based on this thing

3 Likes

As I said, this would require a variable that tells you the type of device

4 Likes

yep ik, but it would be problematic for games that are based on vibrations
idk if you got what im trying to explain

3 Likes

Vibration (known by some devices as “Haptic Feedback”) is caused by several imbalanced motors, a tiny device with an unbalanced weight, which only iPhones have.

Console Controllers (PS4, PS5, and Xbox, the only controllers compatible on iOS) have 2 imbalanced motors (1 in each grip handle, except for the PS5 DualSense Controllers, which have a more advanced haptic feedback function).

iPads can play buzzing sounds through the speaker to achieve a similar effect, but will only have slight (mostly unnoticeable) vibration at the source of the sound (2 speakers at the bottom, 4 speakers on some iPads)

This effect is lost when a user connects headphones to the device via the wired port or Bluetooth.

3 Likes