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

Implement complete input management #44

Closed
aggregate1166877 opened this issue Jun 22, 2021 · 1 comment
Closed

Implement complete input management #44

aggregate1166877 opened this issue Jun 22, 2021 · 1 comment
Assignees
Labels
enhancement Improve existing feature

Comments

@aggregate1166877
Copy link
Collaborator

aggregate1166877 commented Jun 22, 2021

Details:
The way input modes are currently implemented in core has a design mistake that needs to be addressed before the UI can be implemented. If correctly implemented, different modes may sometimes, but not always, be mutually exclusive. You can have more than one active at a time, with input preference based on some predefined [hardcoded] priority.

Using Dark Souls as an example: you can run around while in ANY menu, but arrow keys and interaction keys are now snatched by the menu and don't make their way to the game. Some flight have similar features.

Needed result:
For each action mode, send the current key(s) pressed.

By default, all active mode controllers¹ should receive key input simultaneously. A controller is allowed to request priority or exclusive access.

Bonus points:
Don't allow the key controllers to actually receive keys; rather, have them receive actions. This makes control bindings completely transparent, and allows abstracting between, say, keyboard and mouse events.

Completion of this task does not require implementing all possible peripherals; rather, it requires setting up the basic framework to facilitate any peripherals.

¹ Controller in this case refers to a logical piece of software controlling what happens to actions generated by input from any source, including keyboard / mouse / gamepad. It does not mean 'hardware device'.

@aggregate1166877 aggregate1166877 added the enhancement Improve existing feature label Jun 22, 2021
@aggregate1166877 aggregate1166877 self-assigned this Jun 22, 2021
aggregate1166877 pushed a commit that referenced this issue Jun 22, 2021
…ent as a constructor instead of a series of unrelated functions.
aggregate1166877 pushed a commit that referenced this issue Jun 22, 2021
aggregate1166877 added a commit that referenced this issue Jul 20, 2021
#44 #45 Implement input management, build React menu system off said input management.
@aggregate1166877
Copy link
Collaborator Author

aggregate1166877 commented Jul 20, 2021

Done and dusted. Input is universal and transparent, and you can choose which pieces of code are mutually exclusive with other pieces of code without them knowing about each other.

At the time of closing this ticket, the space ship can be controlled while in the game menus, and the player has the option (via LeftCtrl) to regain mouse control while in the menus in emergencies.

aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
…ent as a constructor instead of a series of unrelated functions.
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
…ent as a constructor instead of a series of unrelated functions.
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 added a commit that referenced this issue Dec 19, 2021
#44 #45 Implement input management, build React menu system off said input management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing feature
Projects
None yet
Development

No branches or pull requests

1 participant