Skip to content

Controller Support#28

Open
ironcross32 wants to merge 3 commits into
Orinks:devfrom
ironcross32:dev
Open

Controller Support#28
ironcross32 wants to merge 3 commits into
Orinks:devfrom
ironcross32:dev

Conversation

@ironcross32

Copy link
Copy Markdown

This adds controller support to the game by way of pygame._sdl2.controller. Bindings are laid out in the readme, in the controller page of the 'how to play' section, and by pressing back/select while driving. This support is hot-pluggable, always grabs onto the first controller it finds, and pauses the game if it loses connection. Rumble support added for certain events like driving on the rumble strip, hazard announcements, and heavy braking. Settings in the gameplay section allow disabling controller support altogether, and disabling rumble.

Hints are expressed in Xbox controller notation. They will be heard if a controller was the last device that was used before the hint fires, otherwise it will be a keyboard hint. This works in the tutorial as well.

The right bumper acts as a modifier or shift button to access a second layer of controls when held down. Just about every feature of the keyboard is supported via controller.

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