Jump to content
  • Advertisement
Sign in to follow this  
DW77

Rumble Feedback

This topic is 1513 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've ordered a vibration capable PC gamepad, your generic xbox 360 style layout and it should be arriving sometime next week. As far as haptic feedback goes the controller comes equipped with 2 rotary vibration motors, a highfrequency one and a low frequency one. I'm going to use SDL 2.0 and its SDL_Haptic commands to access the gamepad (as well as handling a few other features). The issue is that I've been searching for the past couple of days for a tutorial about how to create descriptive rumble feedback. I've been abe to intuitively figue out a few things like if your character swings a big heavy hammer and it hits something you can use a short pulse from the low frequency motor to help with immersion. On the other hand a short pulse from the high frequency motor might represent blocking a sword blow. On the other hand if you are playing in a game with a modern setting, a vibration pattern can compliment a your character's cellphone ringing.
The problem is that despite how much I've looked I cannot seem to find a tutorial describing a few simple effects, and I know from experience that bad rumble is worse than no rumble in just about anything other than a shooter.

So, to get to the point do any of you know where a tutorial about how to use Rumble, rather than just how to implement it?
Thank you

Share this post


Link to post
Share on other sites
Advertisement

You might be hard-pressed to find anything along the lines of a tutorial, as it's going to be pretty subjective either way. It's like finding a tutorial on "how to make a game fun." :P There might be one out there, but I would still only take it's advice with a grain of salt. I think you'd be better off playing and examining games with a rumble feature and parsing what you think works and what doesn't work (though it seems like you've already paid a good deal of attention to that already).

 

I think you're totally on the right track though. You're aware of making sure you're not overusing it, you're thinking of where the rumble feature is going to be useful/ distracting/ helpful/ etc. I think the rest is entirely creative choice and a lot of trial/error and user feedback.

 

The only thing I would add is to make sure you give your players an option to turn the feature off entirely, as there are always going to be those who simply don't want it.

Share this post


Link to post
Share on other sites

Well, I use the XBOX Pads rumble function in my current Prototype (which is kind-off a racing game), and I just did trial an error to come up with a good use for it.

 

Currently only the movement related rumble functions have been written, I also intend to use it for the battle system, to indicate hits and penetrating hits.

 

 

What I do at the moment is:

- use the high frequency alone to indicate that boost is active (not 100% this is needed, helpful or cool)

- use low frequency to show that boosting just has taken you over your normal speed limit (gradually getting stronger the faster you get. Kinda useful and cool to give you an indication of your speed without looking at the UI Element for speed)

- use both low and high frequency in parallel to indicate the vehicle hitting the terrain, or very strong suspension impacts. This now is EXTREMLY cool, as I get very accurate physics information for the hits. You can really feel the roughness of the ground, when your vehicle touches the ground again after a jump.

- also use both to give feedback on the vehicles wheels loosing traction. Also extremly useful, when the graphics are in place it will really work to improve the immersivness.

 

 

I will collect inputs from these 4 different sources in a separate classe, add the inputs for both motors up and cap them to 1, and then feed them into the motor interface classes. Easy enough to do.

 

An additional enhancement is to make sure each rumble event will "fade out" with a different decay. Strong impacts will rumble for longer (by staying in the system for 1-2 seconds, slwoly fading back to zero), light short hits on the suspension or body of the vehicle will fade out quickly and will just be noticable as a single, or very few rotations of the motors.

By making sure your rumble system can handle multiple events at the same time and adds them all together before activating the motors, you can use this to create different rumble events active at the same time.

 

You can model a lot of different feeling rumble events: different length, different strength, and activation of just one of both motors, both at the same or a different strengths will feel quite different to the player.

 

 

How you in your game should use it, nobody will be able to say. Create interface methods that are easy to call and make sure you can just plugin a new rumble source, then you can start to try and error until it feels right.

Edited by Gian-Reto

Share this post


Link to post
Share on other sites

Thank you both for responding, I appreciate it.
Misantes: I know, I hate it when there is bad rumble and I can't turn it off.
Gian-Reto: Thanks, I'll start playing around with that kind of thing tomorrow.
I just had an idea: if you are being buffeted by some force you can feed the low frequency motor a pseudorandom set of amplitudes in rapid succession Perhaps a function of the frame rate. What do you guys think?

Share this post


Link to post
Share on other sites

Just make sure you slow down the change in amplitude somehow. The rumble motors are not THAT fast, and human perception also has its limits (If you think that changing the amplitude every frame would feed the motor a new value every 1/60 of a second).

 

So if you change the amplitude every frame, you ran the chance that the felt net effect is just the average of your random function. Picking a new value every second or split-second, or coming up with a function that will give you a nice curve instead of pure random numbers might work better.

Edited by Gian-Reto

Share this post


Link to post
Share on other sites

Maybe my last comment was not clear enough... I am not saying you need to smooth out everything so you get a smooth rumble. You need to make sure that you don't just feed a random value into the motor every 1/60 second, else the inputs will most probably average over time to a smoother value.

 

I am not sure how quickly the XBOX Controllers motor reacts, might be subsecond, but there is a short delay. And I can guarantee you, if you feed it input for a single frame and let it fall to zero in the second frame, a) you will almost feel nothing and b) it will take the motor longer than a frame to stop rumbling.

 

Find out what is the "minimal beat" that is useful to you, the motor can react to and you can really feel a difference, and feed the motor random values at this frequency (every 0.5 seond, every 0.1 second... don't know, haven't tested that yet).

 

 

What I use currently is a system I can feed hit events into, or turn on constant rumbling of either motor at a given strength.

The hits, depending on their strength (the higher the strength, the longer the cooldown), have a cooldown that will gradually fade the rumble for the hit event back to zero. You can model quite sharp subsecond rumble events that way. Maybe use something similar, create a queue, enter "shake events" into the queue at random strength with a random time intervall between events. Each shake event will fade back to zero, but with 2-3 events active all the time (the one that just triggered and the ones that have not faded back to zero yet), you will get quite a chaotic rumbling without the inputs being lost.

 

You can finetune the intervalls between events, the variance in strength, experiment with different cooldown lengths. You could even make the event pick one of 3 random activation patterns: just low frequency, just high frequency, or both.

 

 

That solution might be overengineered. But you will have all the tools needed for getting just the right amount of rumble from your Pad.

 

 

 

As for frequency changes: that is a tough one. As both motors work at a set frequency AFAIK, you might need to experiment a bit. Lets say, you start with the low frequency motor for low frequencies (doh! smile.png ), and then start fading in the high frequency motor and fade the low frequency one as the virtual frequency of your rumble source goes up.

If that makes any sense.... something to try out.

Edited by Gian-Reto

Share this post


Link to post
Share on other sites

One of my favorite out-of-context quotes came from people working on adjusting and tuning the rumble features. It was back on The Godfather, on the Wii port (this was before the Wii was even released and the estimated system demographics were skewed older).  The person who had been working on it called across the office:

 

You guys have to try this. It is EXACTLY what the pulse feels like as you strangle a hooker.

 

Of course, after a few awkward moments and the realization of what that would mean, things continued.

 

 

To the OP: Tuning the rumble feedback can be a tedius process, and however else you end up implementing it, make sure you implement it as data rather than code. That way if your game ever starts to grow, or even if you are already working on a team, you can hand the tuning work to someone with nothing better to do so you can spend your time building the systems and big parts rather than fine-tuning the designer parts.

Share this post


Link to post
Share on other sites

Gian-Reto: I understand what you were trying to get to with your comment now, clear case of misunderstanding on my part.
frob: Thank you for takin the time to respond. As for How I was planning to implement it I was thinking in either a raw form or in an ADSR envelope.

As far as programming it with SDL... Unfortunately SDL 2.0 for windows does not support haptic feedback through DirectX Controllers yet. so that is stalled for now.

Share this post


Link to post
Share on other sites

As far as programming it with SDL... Unfortunately SDL 2.0 for windows does not support haptic feedback through DirectX Controllers yet. so that is stalled for now.

 

There is a community driven "plugin" for Unity 3D though ("plugin" because it is not really a plugin, seems to be low level code with some community sourced glue code AFAIK), rumble feedback works fine there.

 

No idea if this can help you with your SDL woes though. Maybe have a look at the tutorials how to set it up for Unity to see if the low level code could be reused (with just the glue code rewritten for use in SDL)?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!