-
Notifications
You must be signed in to change notification settings - Fork 23
Description
The current gamepad user experience is somewhat suboptimal, at least for players who played any recent platformer with a gamepad.
- Split menu controls "Confirm/Cancel" from Clonk controls "Throw/Dig". If not configured, the old defaults should be used.
-
Alternative: Make "Jump" the same as "Menu Confirm" for gamepad controls, if the above is too complicated.
-
- Make "Up" and "Jump" separate configurable inputs, which are mapped to the same keyboard key by default: "Up" should to things like enter buildings, climb up, swim up, move up in menu. "Jump" should only make Clonks jump and no other actions (unless other actions are mapped to the same button, like "Menu Confirm").
- Nice to have: Show controller button icons instead of controller button numbers in the UI action buttons at the bottom of the screen.
- Nice to have: Implement XInput support instead of (or in addition to) the legacy WINMM Joystick API (joyGetPosEx). I'm not sure how many gamepads that support this API are even still in existence today.
- Nice to have: Disallow "classic controls" and only use "Jump and Run" controls when using gamepad, or display a warning that "classic" is not suitable for gamepads. On keyboard, you have 3 fingers to control Left/Right/Stop, but on a gamepad you control all 3 only with the thumb, making it very clumsy.
- Implement better directional control for controller analog sticks
- Add analog stick hysteresis if it feels better
- Maybe improve swimming directional control with analog stick, even if quantized to 8 directions.
Firstly, Clonk does not support XInput, so no support for "modern" controllers like the various XBox types. This can be fixed using Xidi. This works, but you see no actual button names in the UI, only button numbers (e.g. on the action indicators at the bottom right of the screen). Actual XInput support would be nice, and it "should not be that hard" (haha). Just call XInputGetState instead of joyGetPosEx (but of course the devil is in the details).
But second, and more importantly: Nearly all modern games follow the same conventions for gamepad control for good reasons:
- The A button on an XBox style controller is used for 2 actions: Confirm (in menus) and Jump (in game).
- The Up direction of the analog stick and on the D-pad are never used to jump, because this causes undesired jumps in hectic situations, but it is used for things like climbing or swimming upwards.
- The B button is used for: Cancel or Back (in menus) and some (maybe configurable) action in game.
But in Clonk, this setup is currently not possible.
You could configure the A button as the "Up" key in Clonk, allowing you to jump with A. But "Confirm" in menus is always the same as "Throw", so you can't have "Confirm" and "Jump" both on A. Also, you would have to press A to climb up or navigate upwards in menus. You can use Xidi to map both A and Up to the clonk "Up" key to fix that issue and still have Jump on A, but then you still have the problem that you can get accidental jumps when you walk around, by pressing the analog stick slightly in the wrong direction.
The 3rd point is not so much of a problem, because the "Cancel" button in menus is the same as "Dig". Mapping that to the B button works fine, although it would still be nice to have the option to configure "Dig" independently of "Cancel".
The ideal solution in my opinion would be to have "Up" and "Jump" (and possibly even "Menu Cancel") as separately configurable inputs (which could be configured to the same input of course). A quick look at the code tells me that this is probably not so easy, because some code depends on the notion that "Up" is the same as "Jump", for example ObjectComUp directly calls PlayerObjectCommand(cObj->Owner, C4CMD_Jump). I expect there to be more such places, but I didn't look further than that, so I might be mistaken. Some problematic cases might even be in some c4script code somewhere...
If someone changed the code anyways, it might also be desirable to configure "Menu Cancel" and "Dig" as separate keys.