Controller Rumble Support?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Controller Rumble Support?

Re: Controller Rumble Support?

by McDoogle138 » Thu Apr 24, 2025 10:08 pm

I know that the developers of Selaco were able to implement controller rumble into GZDoom, and I found links to their code, but I am not experienced enough to figure out how to implement it into GZDoom. If anyone can figure out how, please let me know. I could die happy if I was able to play GZDoom with controller rumble.

https://steamcommunity.com/app/1592280/ ... 944658245/

https://codeberg.org/sag/pancake-engine ... xinput.cpp

Re: Controller Rumble Support?

by Muusi » Mon Apr 12, 2021 10:43 am

Nash wrote:Point me to the source code of QuestZDoom and I'll take a look. I will only be able to implement it for XInput because it's all the gear I have, but hopefully the foundation will be reusable for anyone else who wants to add it for non-XInput controllers.
https://github.com/DrBeef/QuestZDoom/tr ... mgw_mobile

Hope this helps and already a massive thank you! Xinput is probably used by almost everyone who uses a controller these days so it's obviously the most important one :)

EDIT: Just remembered there was also a GZDoom build with some Xinput rumble functionality made by Edward850 but sadly the link was already dead :(

Re: Controller Rumble Support?

by Nash » Sun Apr 11, 2021 9:29 pm

Ursula Bittingstadge wrote:Let's resurrect this one. Anyone else interested in force feedback in 2021? Just asking. There exists something called QuestZDoom that claims to have haptic feedback as a feature, and is running a version of LZDoom. Anyone have the hardware to test this one? Maybe it could be a help in showing how force feedback could be implemented?
Point me to the source code of QuestZDoom and I'll take a look. I will only be able to implement it for XInput because it's all the gear I have, but hopefully the foundation will be reusable for anyone else who wants to add it for non-XInput controllers.

Re: Controller Rumble Support?

by Guest » Sun Apr 11, 2021 5:01 pm

Let's resurrect this one. Anyone else interested in force feedback in 2021? Just asking. There exists something called QuestZDoom that claims to have haptic feedback as a feature, and is running a version of LZDoom. Anyone have the hardware to test this one? Maybe it could be a help in showing how force feedback could be implemented?

Re: Controller Rumble Support?

by nazakomu » Fri Nov 17, 2017 7:31 am

Well, I think for one, we should definitely leave it to the modder to have as much flexibility as possible, therefore not hardcoding any specific actions to automatically make the controller rumble (unless there are some chosen defaults that can be altered in the options, which are talked about later).

It would most definitely be tremendously cool to have something very in-depth such as both the duration and intensity of the rumble for the action function.

Another thing that comes to my mind as an idea is something far more vague, which is rumble intensity based on distance! So if you have an explosion nearby, it will be a small shake, but then when there is an explosion that is very close to the player, then it will viciously rumble. Though again, the modder should have complete control over the intensity/duration, and such.

In conclusion, I feel as if all of this can be split up in two, so that there is a virtual action function attached to the player, to make certain actors trigger the rumble (such as the idea of distance-based stuff), and then the action function can be for weapons and items (just call it in the states). I suppose the virtual function can have defaults, such as pre-existing ones, and then the user can choose intensity within the options.

Re: Controller Rumble Support?

by Drake Raider » Thu Nov 16, 2017 3:08 pm

A_Rumble is probs the best place to start. However, how about use a default setting of whenever the player moves but is not input based. that would cover damage, earthquake, and other external sources, as well as other obvious ones like A_recoil.

Re: Controller Rumble Support?

by Xaser » Wed Nov 08, 2017 6:57 pm

Add an A_Rumble and let folks opt into it as they please. Someone will create a patch for the original weapons, and while it's not quite native support, I dunno what can be done about that without entering bad-assumption-ville.

Re: Controller Rumble Support?

by Rachael » Wed Nov 08, 2017 5:13 pm

UUUUGH! Yeah, sure, a damage requirement check can be added for this, but that's just one more thing in the long list of exceptions it will check for. It's becoming less and less worth it.

Re: Controller Rumble Support?

by Enjay » Wed Nov 08, 2017 4:47 pm

wildweasel wrote:A_FireBullets is a safe bet (you can assume users aren't using it for anything but bullets)
Have people not used it to create flashlights, laser sights and maybe other stuff (custom puff with light attached)?

Re: Controller Rumble Support?

by Graf Zahl » Wed Nov 08, 2017 4:28 pm

GZDoom uses SDL only on Linux. Any kind of controller support will have to be platform specific. If you want to try, be my guest, but as you may have noticed the developers here have little to no interest in this feature.

Re: Controller Rumble Support?

by enderandrew » Wed Nov 08, 2017 2:15 pm

I'm assuming GZdoom uses SDL for joystick support. SDL does allow for force feedback.

https://wiki.libsdl.org/CategoryForceFeedback

I know that rumble functionality is pretty easy to implement with XInput, but that is platform dependent and aimed primarily just at XBox controllers (though 3rd party controllers can pretend to be an XBox controller and latch onto XInput)

https://msdn.microsoft.com/en-us/librar ... s.85).aspx

As for when to rumble, a small kickback from firing a rocket launcher, chain gun or SSG might be nice, but I could also see force feedback when your chainsaw connects with an enemy, or when you're hit. Perhaps the intensity of the rumble could relate to the amount of damage you take when hit.

I'm not sure it would make sense to include all damage (such as lava), rather just when an enemy hits you.

Re: Controller Rumble Support?

by ZzZombo » Wed Sep 20, 2017 7:18 pm

...make it configurable by some means on per weapon basis?

Re: Controller Rumble Support?

by wildweasel » Mon Sep 18, 2017 8:30 am

The chaingun I'd anticipate being a little strange - assuming a quick burst of rumble, and only triggering on the first attack function, it'd only rumble once for every two shots. I suppose there'd be some fudging going on with duration and intensity though.

Re: Controller Rumble Support?

by Rachael » Mon Sep 18, 2017 8:13 am

It can simply rumble on the first actual attack/projectile spawning function after the initial fire or refire check. Which would give it the functionality of a delayed rumble for the BFG, but instant fire for the other weapons, and somewhat constant rumble for the chainsaw and chaingun.

Re: Controller Rumble Support?

by wildweasel » Mon Sep 18, 2017 8:10 am

I'd think the problem here is, which weapon functions would trigger a rumble?

A_FireBullets is a safe bet (you can assume users aren't using it for anything but bullets), but projectiles are a blurrier line. A_FireCustomMissile is sometimes used for smoke and bullet casing effects, which would trigger a rumble during, for example, reloads. Then in that case, why not whenever the Flash state is triggered via A_GunFlash? Except there are weapons that used the Flash state for things other than weapons firing, at least one of which does this during the weapon's Ready state, meaning the controller would be constantly shaking whenever that weapon is selected at all.

Top