LordTocs / CastMate

CastMate is an all-in-one Broadcaster Automation Suite for Twitch. It allows you to build compelling interactive stream setups using without writing any code. It features simple click and drag automations and overlays.
https://www.castmate.io/
GNU Affero General Public License v3.0
66 stars 7 forks source link

Simulate input of controller #163

Open Akashic101 opened 2 years ago

Akashic101 commented 2 years ago

While you can already emulate keyboard and mouse-clicks it would be amazing if you would also able to simulate controller-inputs. This could also be extended, but optional, to wheel or joysticks for cars and planes.

Akashic101 commented 2 years ago

To add to that, my idea was that a viewer can redeem 1 point to press "B" on my controller so while playing Stray the cat meows. Trying to do the same with keyboard-input does not seem to work in-game, by changing the meow-button in the game to R and letting CastMaste emulate that button nothing happens, yet when I try the same in a text-file the letter "r" does appear. Is there a limitation I do not know of? Or is this a bug?

LordTocs commented 2 years ago

So controller input is definitely on my list of things to implement. Sadly it's a bit more involved than mouse and keyboard. Mouse and keyboard input go through Window's messaging system, but controllers go through DirectInput and XInput which don't have the same easy access as windows messages.

Some have also requested allowing castmate to disable controller input from the streamer's controller. Which I'm also trying to implement.

I was having similar keyboard input problems prior to version 0.2.3. For 0.2.3 I completely rewrote the mouse and keyboard input simulation. I just downloaded Stray to try to reproduce this. I bound the meow key to R, set CastMate to send an R key input, and used a controller to play the game. It seems to meow just fine with 0.2.3, are you completely updated?

Akashic101 commented 2 years ago

The problem seems to have fixed itself after a complete restart, problably Windows being Windows :D The idea of disabling controller-input sounds like a great idea, same with keyboard would also work great (disabling reload comes to mind). I am looking forward to seeing those features implemented, CastMaste is an amazing program and it will surely only get better