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

feat: gamepad support first version #89

Merged
merged 6 commits into from
Jul 2, 2023
Merged

feat: gamepad support first version #89

merged 6 commits into from
Jul 2, 2023

Conversation

liana-p
Copy link
Owner

@liana-p liana-p commented Jul 2, 2023

First version of the gamepad support. All the systems for it are working and in place.

  • The inputs store can take a list of actions which can have keyboard or gamepad keybinds
  • Components can register input events to it in a stack so that only the last one is active
  • There is a useNavigation helper for list/grid interfaces to select them
  • The game uses the first gamepad it finds as the main gamepad

Still to do:

  • Plug the system in more parts of the engine. For now it's possible to interact only with the dialog box, and to open the menus and cycle their tabs
  • Implement analog support (probably will be needed to control scroll wheels with right stick)
  • Make the inputs configurable via yaml files (they're hardcoded for now)

I will release this soon though as it's already functional enough as it is, and an improvement on not having it at all.

@stackblitz
Copy link

stackblitz bot commented Jul 2, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jul 2, 2023

Deploy Preview for ornate-pie-561978 canceled.

Name Link
🔨 Latest commit 7022cf7
🔍 Latest deploy log https://app.netlify.com/sites/ornate-pie-561978/deploys/64a1f9141746d0000825b743

@liana-p liana-p merged commit 510c560 into main Jul 2, 2023
6 checks passed
@liana-p liana-p deleted the feat/gamepad-support branch July 2, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant