Gamedevs, would you have one action like "Jump" and bind both a keyboard key and a gamepad button to it OR would you have separate "KeyboardJump" and "GamepadJump" actions?
Gamedevs, would you have one action like "Jump" and bind both a keyboard key and a gamepad button to it OR would you have separate "KeyboardJump" and "GamepadJump" actions?
Perhaps the event should have metadata about where it came from, but otherwise it should be a single action. If there are two different actions then it's not DRY and there will probably be bugs.
@upmultimedia it really depends on what options are exposed to the player.
If the action can only have one rebind, eg. in the settings, I'd prefer separate actions. If there's no way to detect "last input device" I'd also prefer separate actions so I know what device the player used.
If the actions can have an arbitrary number of binds (ie: Celeste) and I can use a function to determine the last input device then a single action is cleaner.
@upmultimedia one action for something like jump, but I use different actions for discrete vs continuous input . For example `move forward` gets bound to analog stick, `digital_move_forward` for keyboards, buttons etc.
The discrete one just fires the continuous one with a varying strength based on how long it has been held.