Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Pick-up & Play" input configuration #802

Open
Nopey opened this issue Dec 2, 2024 · 1 comment
Open

"Pick-up & Play" input configuration #802

Nopey opened this issue Dec 2, 2024 · 1 comment

Comments

@Nopey
Copy link
Contributor

Nopey commented Dec 2, 2024

Main Menu Scene :: Input Configuration

Keyboard Control Sets. These can be added, deleted, enabled, disabled, reordered(?), and edited. Builtin control schemes cannot be deleted or edited, but can be disabled. When two control sets both use the same key, disable whichever scheme the user is not currently interacting with.

Melee Scene

When the melee scene is opened, neither player has a controller. The first controller to generate an action will be assigned to player 1. The second controller to emit an action will be assigned to player 2, when in 2-player mode.

Since keyboard controllers have disparate keys bound, the first bound keypress unambiguously determines what keyboard layout is being used. After the melee scene, if only one player is using the keyboard, we could opt to give them a special "all the keyboard" keyboard controller, which would let them use all of the enabled keyboard control sets at once.

Problem & Solution: "I use arrow keys and should always be player 1!" Buffer the first controller's action for up to xyz milliseconds or until the second controller's action also arrives. Now that we have two controllers (with actions buffered), compare their "priority"-- that is, where they are on the list of keyboard control sets (joysticks being lowest priority). Assign player 1 the higher priority controller, or whichever pressed the button first in case of a priority tie (two joysticks). Play back the buffered actions and hope the players don't notice the delay.
Same model works for Joysticks, too If we don't want remapping support for joysticks, skip this section and just know that the first gamepad action will identify what gamepad the player is holding.

Gamepad Control Sets. Similar to keyboard control sets, but with the concept of "default" instead of enabled/disabled. Up to one gamepad control set may be marked as default. Note that these are mappings from SDL's unified GameController to our actions, and not mappings from SDL's raw Joystick interface to actions.

With joystick controllers, the first SDL button press event identifies what GameController the player is holding, but we need to find out what gamepad control set they're using. If the "default" mark has been applied to a control set, give them those controls. Otherwise, give them a list of gamepad control sets to choose from.

@TheSystemGuy1337
Copy link

The control scheme for me is unergonomic; I could see the game benefiting from an option that adds a more ergonomic control scheme. Arrow keys for movement, Z for punch, X for kick and C for special moves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants