bunfan / beat-banger-public

3 stars 1 forks source link

Vibration with controller on hitting note #258

Open ProtoArts opened 7 months ago

ProtoArts commented 7 months ago

Discord Tag

@proto_arts

Describe the feature you would like

When hitting the notes the controller receives a force feedback (vibration), "Perfect" will be in full power vibration (100%) and "Meh" will be low power (50%).

if HitNote == "Perfect":
   Vibration = 1.0
else:
   if HotNote == "Meh":
      Vibration = 0.5
    else: Vibration = 0.7

Maybe it would be a good thing to add an interpolation that smooths the vibration from [hit note value]% to 0%

void loop() {
   Vibration = (std::clamp((Vibration-0.01), 0.0, 1.0))
}

Additional context

I think that will be more immersive

komdog commented 7 months ago

I think this is a good idea, but the switch from Python to C++ in your snippets gave me whiplash

ProtoArts commented 7 months ago

Sorry for the confusion...

I studied Python and C++ in two separate classes, but I'm trying to figure them out. However, I can program with Unreal Engine in visual scripting. I don't know the normal scripting so well but I can understand the logic.

Il giorno mer 21 feb 2024 alle ore 16:01 KomDog @.***> ha scritto:

I think this is a good idea, but the switch from Python to C++ in your snippets gave me whiplash

— Reply to this email directly, view it on GitHub https://github.com/bunfan/beat-banger-public/issues/258#issuecomment-1956850687, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5U75USQTWYYWWFUSSIZCMDYUYD3FAVCNFSM6AAAAABDR5WLB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWHA2TANRYG4 . You are receiving this because you authored the thread.Message ID: @.***>

dude98 commented 6 months ago

knowing what some people will do with controllers if you add vibration/rumble like this, there's two other things that should probably be done on top of this:

  1. Add the Ability to Force a Specific Button Icon Set (outside of console's "ctype" command) and Don't lock the Keyboard Remap Screen for keyboard players so they can have a controller connected just for the Vibration/Rumble
  2. Send Vibration/Rumble data to multiple controllers and disable button inputs from Controller 2 onwards or set the "active" controller (the one that can send inputs and not just receive rumble data)

Sidenote: The people with wii remotes are gonna have a fun time if this gets added since you can send rumble data to them using WiinUSoft (An Xbox Controller Emulator for Wii and Wii U Controllers) or if they have joycons since those work with steam input on their own.