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?

#gamedev #godot

Single action
96.4%
Separate actions
3.6%
Poll ended at .
@upmultimedia It should be a single function because the expectation will be the same behavior regardless of the input. Also you could use a Jump function for non-player entities by passing scripted input instead of input from a controller.
@upmultimedia I think a single action but as a speedrunner I want to exploit separate actions if they accidentally stack

@upmultimedia

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.