deathkiller / jazz2-native

🎮 · Jazz² Resurrection: Native C++ reimplementation of Jazz Jackrabbit 2
https://deat.tk/jazz2/
GNU General Public License v3.0
552 stars 37 forks source link

Haptic feedback for Xinput devices? #72

Closed theolux closed 3 months ago

theolux commented 4 months ago

Jazz² Resurrection version

2.7.0

Problem or limitation

Would be cool for this sweet jazz2 to have vibration / rumble support : )

Proposed solution

Adding it?

deathkiller commented 4 months ago

Vibration/rumble support is already there, but not used in the game, mainly because I haven't figured out which rumble effects to add and to which actions. So do you have any concrete ideas about this so we can discuss it? Otherwise, it's a really difficult thing to implement because I'm currently out of ideas.

theolux commented 4 months ago

Ah cool! yeah, I'd do it this way: getting hit by enemies - weak-medium short buzz getting hit by bombs - medium-strong short buzz touching red springs - weak short buzz breaking blocks - slight very short buzz ear propellers - weak buzz as long as active death - medium strength long buzz

deathkiller commented 3 months ago

I implemented some haptic feedback in the latest commit. Following actions were included:

Only SDL2 backend is supported for now (GLFW don't have gamepad rumble API, and Android and UWP backend support will be added later). All effects should be decent. Tested on Xbox controller. Effect for ear propellers is not included, because it was a bit annoying. Let me know what do you think.

theolux commented 3 months ago

I implemented some haptic feedback in the latest commit. Following actions were included:

  • Breaking block
  • Hurt
  • Die
  • Land (after falling)
  • Spring
  • Shooting
  • Warping
  • Camera shake (earthquake)

Only SDL2 backend is supported for now (GLFW don't have gamepad rumble API, and Android and UWP backend support will be added later). All effects should be decent. Tested on Xbox controller. Effect for ear propellers is not included, because it was a bit annoying. Let me know what do you think.

Aye looks like you got it right! Figured ear propellers might've been overkill ':D Thanks!