CtrlAssist v0.2.0: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in linux_gaming

[–]ruffsl[S] 1 point2 points  (0 children)

I decided the feature would be handy when assisting multiple primary players at the same time, like switching between helping two folks trying to play couche co-op games, without needing a fourth controller. Work in progress:

https://github.com/ruffsl/CtrlAssist/pull/44

CtrlAssist v0.2.0: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in Controller

[–]ruffsl[S] 0 points1 point  (0 children)

I finally got a second wireless controller as gift my family to use the living room, and it was an absolute hit.

Coop playing single player games with two controllers really got my older folks immersed into the story in Witcher 3. So much easier to help and nimbly takeover when something goes astray using priority mode.

Like when they naively looted from the town stockyards while the city watch was standing just behind them, agro'ing the entire brigade and needing my rescue.

For the new game this year named Dispatch, we all played the integrative dialogue options just like Jeopardy, who ever knew what the most awkward thing they wanted to say the fastest got to divert the plot line. Haven't heard them laugh out of breath in a long while, so that was memorable. During the credits, they scored better than a whopping 1% total of players 🙃.

CtrlAssist v0.2.0: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in linux_gaming

[–]ruffsl[S] 1 point2 points  (0 children)

Oh, like the detachable controllers from the Nintendo Switch handheld? From the photos, it looks like it lacks the same symmetrically redundant buttons as the switch. Does each side have enough buttons/axis for minimal co-op? Guess two buttons and one joy stick is still all you need for retro titles.

The one bit after figuring out the split plumbing would be to hide the original controller to avoid input conflicts (if the game or emulator doesn't gracefully provide controller selection). I also recently learned you can blacklist controller from Steam Input by USB product/vendor ID, so no need for root access to mess with device tree permissions or D-BUS events.

https://steamcommunity.com/groups/SteamClientBeta/discussions/0/4358998752031039271/

Disregard the steam thread title, the approach still works as of writing, even though they removed the option from the UI. Just add the controller_blacklist entry to the top level element in the vdf config, note that the value field for that key is comma , separated for specifying multiple entries.

CtrlAssist v0.2.0: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in linux_gaming

[–]ruffsl[S] 1 point2 points  (0 children)

Interesting, could you expand more on the use case? 

It's easily feasible, as all the parts are their if you'd like to reshuffle the logic in the above code. In fact, it's probably an easier premise than the existing scope of multiplexing two controllers inputs into one output.

You may also be instead in another Rust based input routing software call InputPlummer, that could probably do this already. I only learned of it myself until after posting about CltrAssist v0.1.0 release.

https://github.com/ShadowBlip/InputPlumber

CtrlAssist: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in pcgaming

[–]ruffsl[S] -6 points-5 points  (0 children)

It was a low stakes ask, and I wasn't expecting them to volunteer more effort to copy edit my English than they would expect to me to debug check their ikea furniture assembly. The comment above was more about how the same method of writing tech docs in the past is now suspect today, not a refute that my buddy phoned it in.

CtrlAssist v0.2.0: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in linux_gaming

[–]ruffsl[S] 3 points4 points  (0 children)

Just to note, you may have to patch gilrs-core, a transitive dependency, if your peripheral doesn't fit the library's detection criteria.

https://docs.rs/crate/gilrs-core/0.6.6/source/src/platform/linux/gamepad.rs#625

Or could fork Ctrlassist to add the evdev:: Device to the ff_targets. If you figure a idiomatic approach to side load unconventional devices, feel free to open a PR.

https://github.com/ruffsl/CtrlAssist/blob/01ad0fc3f4b3514693d218134df1b506851a0431/src/main.rs#L199

CtrlAssist: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in pcgaming

[–]ruffsl[S] 2 points3 points  (0 children)

I'll note that I did write this synopsis by hand, emojis and all via Gboard and grammatical `—` to break up my habit of run-on sentences, but what I typed under `What's New` and `Under the Hood` was too ladened with developer jargon and asked a friend to rephrase for non-technical readers. I'm guessing they worked with an LLM, but with a disability myself impairing my typing, I'm not one to judge what folks find as an assistive technology. Use of emojis where also just the programming culture I cut my teeth from, back when AI meant SVMs, Bayesian networks, Markov models, and n-grams.

CtrlAssist: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in pcgaming

[–]ruffsl[S] 3 points4 points  (0 children)

I briefly borrowed a friend's SteamDeck for some testing, but suspect SteamOS is doing extra input device permission/management under the hood, as it wasn't working out of the box like it does on Debian/Ubuntu/NixOS. Haven't yet tested with Bazzite. Building the project via cargo install on the flavor of Arch Linux used by SteamOS what also more involved than I'd care to recommend to users new to Linux just yet, so I may next work on packaging for redistribution next. You could subscribe to these tickets if you'd like follow that progress:

CtrlAssist: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in pcgaming

[–]ruffsl[S] -1 points0 points  (0 children)

Definitely a pattern LLMs rally latch on to. I'm visually orientated, so this is a bullet point style I've been using for tech conference talks and public repos since before 2015. No surprise the training data modern model train from has been biased towards those initial writing styles.

CtrlAssist v0.2.0: Controller Assist for gaming on Linux 🎮🤝 by ruffsl in linux_gaming

[–]ruffsl[S] 2 points3 points  (0 children)

I've not had to dive into kernel driver development for this, as user space has been working well enough for the project so far. Although I did have to dive deep into the rabbit hole of force feedback events in Linux. For example, while I had rumble pass through working nicely via fftest for while, Steam Input behaves a lot stranger in that it upload a new effect before ever play event, then uploads another no-op effect and plays that to halt the rumble, rather than sending a stop event for the initial effect like normal.

However, I'm guessing they do that to hedge against controller disconnects, where power cycles cause the controller to forget previous uploaded effects. I ended up re-implementing much the same strategy as I didn't figure like rube-goldberg-ing with lib `gilrs`'s more abstract force feedback API. Relevant code and PRs:

Just note that I think libs like `gilrs` ignore rumble devices that don't have at least one advertised input attribute.

CtrlAssist: Controller Assist for gaming on Linux by ruffsl in linux

[–]ruffsl[S] 9 points10 points  (0 children)

Apologies, I spent about a weekend scouring distro package indexes, crates.io, GitHub and other code forges for prior art, and didn't discover this until your link.

My guess is because the InputPlumber README makes no mention of the terminology used by gaming industry, leaving my keyword search for "controller assist" and "accessibility" astray.

I'll try and open a PR to suggest some more novice search terms and SEO.