Facepunch / sbox-issues

173 stars 11 forks source link

Per-Gamemode Custom Binding System for KB+M #1489

Closed walllable closed 1 year ago

walllable commented 2 years ago

(I wrote this in like november and forgot to post it, lemme know if there's anything I'm being stupid about)

So we've got the action system (Attack1, Attack 2, Use, Run, etc) and by default these are mapped to specific keys, and eventually to buttons on a controller via Steam Input. It would be nice if we could bind these actions to different keys per-gamemode, and have these bindings as suggested bindings on the gamemode's page, which the user can change themselves if they want - While keeping the bindings on the controller intact. For example, let's say I'm making a four-button rhythm game, and I wanna retain good compatibility and comfort for both controller and KB+M by default. I I think the most ergonomic way to do this would be to bind the four inputs to the d-pad on the controller (Probably via InputButton.Forward, Left, Back, and Right,) but that would be binding to WASD on KB+M. A lot of people don't find that comfortable, and prefer ASDF, or JKL;, or DFJK, or QWOP, or some other four-key thing. It would be nice if gamemodes had a Steam Input-like settings page with a developer-suggested binding (say, DFJK,) and some user-submitted bindings (The other layouts I mentioned.) The important thing is, these are changing what the actions are bound to on the KB+M - So this doesn't change how a controller's bound.

Something I'm not sure about still is how we should take care of custom controller bindings - Custom steam input bindings are applied universally across SBox, instead of being gamemode specific. So, as the player, if I wanted to change some bindings around for one gamemode via Steam Input, this change would persist for any other gamemodes I play, unless I go back to the default or make another custom binding for that game. This would also be a problem for user-submitted bindings in Steam Input - It'd be a pain to find gamemode-specific bindings when all the submitted bindings are submitted for sbox as a whole. Maybe we could have a custom system for controllers, similar to what KB+M would have?

DevulTj commented 1 year ago

This is in progress.