Controller Rumble Support?

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Controller Rumble Support?

Postby Outtagum » Sun Sep 17, 2017 5:58 am

I know this was rejected a few years ago but I thought I'd bring it up again now that things have changed.

Doom Retro has nice rumble support for controllers and it really does add to the immersive feel when 'couch' gaming.

Could something similar be added to ZDoom?
User avatar
Outtagum
 
Joined: 16 Aug 2017

Re: Controller Rumble Support?

Postby Graf Zahl » Sun Sep 17, 2017 6:13 am

Only if you find a developer with a controller that supports such a feature and is willing to do the work.
I don't think you are in luck with this but let's hear from the others first.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Controller Rumble Support?

Postby Rachael » Sun Sep 17, 2017 7:21 am

I do have a controller, but not sure if it supports rumble (I think it does).

Point me to a controller API similar to what ZDoom uses where this can easily be added.

Also - what events should trigger a rumble?
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Controller Rumble Support?

Postby Outtagum » Sun Sep 17, 2017 11:28 am

Sorry, being completely code illiterate I've no idea what API ZDoom uses let alone where to find a similar one for your use... *embarrassed*

As far as events go, I'd suggest the same as Doom Retro (namely, weapon fire and player damage from enemy fire).

I've no idea if Doom Retro is any good as a starting point code-wise but here's a link to the homepage:

http://www.doomretro.com/

I'm sorry I'm too ignorant to offer more than the original suggestion... :(
User avatar
Outtagum
 
Joined: 16 Aug 2017

Re: Controller Rumble Support?

Postby Nash » Sun Sep 17, 2017 4:58 pm

I'd suggest attaching the rumble behavior to the lowest level where the weapon firing functions are called, player being hurt, player falling down (oof), earthquake radii, and maybe some custom A_Rumble(amount) functions for modders.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Controller Rumble Support?

Postby Rachael » Sun Sep 17, 2017 5:11 pm

Nash wrote:I'd suggest attaching the rumble behavior to the lowest level where the weapon firing functions are called, player being hurt, player falling down (oof), earthquake radii, and maybe some custom A_Rumble(amount) functions for modders.

Thank you, this is a lot more descriptive and helpful than just saying "do it like Doom Retro does it."
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Controller Rumble Support?

Postby Outtagum » Mon Sep 18, 2017 3:40 am

Thank you, Nash, for explaining in a clearer manner than I could.

Rachael, sorry for being so vague. I didn't mean to irk you. I just don't have the game code vocabulary to clarify other than saying "when shooty stick go bang-bang!". I'll try to be better in future.
User avatar
Outtagum
 
Joined: 16 Aug 2017

Re: Controller Rumble Support?

Postby 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.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Controller Rumble Support?

Postby 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.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Controller Rumble Support?

Postby 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.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Controller Rumble Support?

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

...make it configurable by some means on per weapon basis?
ZzZombo
 
Joined: 16 Jul 2012

Re: Controller Rumble Support?

Postby 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 ... on(v=vs.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.
enderandrew
 
Joined: 12 Dec 2016

Re: Controller Rumble Support?

Postby 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Controller Rumble Support?

Postby 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)?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Controller Rumble Support?

Postby 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.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Next

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests