-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add ability to scroll the map with gamepad stick #24616
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
Conversation
Works as intended on Mac with a Switch Pro Controller, had to put deadzone on 19. |
Thanks for this report. I tested deadzone 19 on the steam deck and it feels a bit too large, but still acceptable. I'm willing to hear more opinions on what the default should be. Currently it defaults to 9, on a scale 0-100. |
I've implemented the same feature for OpenTTD: OpenTTD/OpenTTD#14365 and they had useful tips for me there |
Nice feature! Not sure if we should expose quite so many options though. I prefer sane defaults and keeping the amount of options manageable. |
I've tested several other games and here are my findings:
My personal experience and takes on that are:
|
Hi, I'm 'AshleyAshes' from Discord. First, I think I misspoke, I do prefer the left stick, I think I probably accidently said 'Right' when I meant to say 'Left'. I personally don't think there's a need to make OpenRCT2 'fully gamepad playable', but the Steam Deck is a good example of a touch pad device where some gamepad shortcuts for ease of use. It is far easier to navigate with a full mouse while sitting at an office than thumbing your touch pad on a handheld device. Dragging can especially be a chore, which is why I had mentioned it'd be great to have a dedicated joystick function. For a lot of stuff, a user could use SteamInput to map any existing keyboard shortcut to a gamepad button, but full joystick map movement couldn't be done. So I think this is great. Mapping other buttons directly in OpenRCT2 are def more in the 'Just nice to have' catagory since SteamInput could work around that. Keeping in mind there are other PC handhelds out there, another officially uses SteamOS even. OpenRCT2 is a great travel time killer on a handheld IMO. I'd agree with axis inversion being removed, frankly it seems more like a First Person/Third Person 3D action game kinda deal. |
1f3307f
to
40c49d3
Compare
This is now locked to left stick only. We still have options for deadzone and sensitivity. Stick can be remapped in steam controller configuration and as far as I'm concerned this is good enough for me. In the future, if we ever implement more of gamepad, we can come up with better control scheme. I've removed inversion control, however, while removing it, I noticed we do have an option for RMB drag inversion. Steam controller configuration has ability to invert those axes, but I think it won't ever get used. |
40c49d3
to
27d0928
Compare
Could I suggest we align the scrollbars all the way to the right, and show the current value in a tooltip instead? I'm thinking on hover and while dragging. (One of these days, I'll get around to implementing a proper slider widget, like Locomotion/OpenLoco's...) |
d59a7db
to
cacc190
Compare
Code review done. I’m okay with the options as they currently stand. Will build and do a quick test now (mostly to check if the regular mouse+keyboard control still works as intended). Edit: finished the test and didn’t find anything broken when using mouse+keyboard. |
b87eba3
to
64a6158
Compare
64a6158
to
0bacec7
Compare
- Feature: [#24411] Vanilla scenarios now also have previews in the scenario selection window. - Feature: [#24616] Add ability to scroll map with gamepad sticks. - Feature: [#24662] Add optional screenshot argument for Z coord. - Improved: [#22684] The limit of 2000 animated tile elements has been removed. - Improved: [#23228] Landscape edge doors now animate opening and closing and play a sound. - Improved: [#24026] Notification settings have been made into a tab of the Recent Messages window. - Improved: [#24569, #24710] Add ten additional translations to the Windows installer. - Change: [#24559] Scenario options are now disabled rather than hidden when disabling money makes them non-applicable. - Change: [objects#383] Disable all base colours on non-remappable WWTT vehicles, change black to light_blue. - Change: [objects#384] Remove erroneously enabled WWTT third remaps. - Removed: [#24628] “Pause game when Steam overlay is open” feature (already broken for a long time). - Removed: [#24640] Grouping by difficulty (instead of per campaign) in the scenario selector. - Fix: [#15846] Rightclicking on track piece when there is construction below does not work. - Fix: [#16176, #23113] Animated tile elements do not always redraw when there is over 2000. - Fix: [#17365] The slope of new land surfaces is only correct on one side when shifting and resizing the map. - Fix: [#18080] Obsolete official .DAT files can be loaded accidentally. - Fix: [#21703] Scenery wall doors get stuck open if the game is saved and loaded whilst they are open. - Fix: [#24456] Zoomed out vehicles on the ride window tab can sometimes draw incorrectly. - Fix: [#24458] Vehicles in the ride window vehicle tab are offset differently than vanilla RCT2, and the sprites are cut off at the bottom. - Fix: [#24576] It is possible to edit open rides in certain circumstances. - Fix: [#24589] Music tab doesn’t fully render in multiplayer. - Fix: [#24615] Blank strings in Windows installer. - Fix: [#24617] ‘Divide by zero’ error when updating boat hire acceleration. - Fix: [#24626] Viewports that only follow sprites (e.g. in the Ride and Guest windows) can be made to unfollow them. - Fix: [#24661] `convert` console command always crashes with a segmentation fault. - Fix: [#24666] `convert` console command rejects files with an SV7 extension. - Fix: [objects#388] ‘Italian Police Ride’ has a non-functional first remap colour.
- Feature: [OpenRCT2#24411] Vanilla scenarios now also have previews in the scenario selection window. - Feature: [OpenRCT2#24616] Add ability to scroll map with gamepad sticks. - Feature: [OpenRCT2#24662] Add optional screenshot argument for Z coord. - Improved: [OpenRCT2#22684] The limit of 2000 animated tile elements has been removed. - Improved: [OpenRCT2#23228] Landscape edge doors now animate opening and closing and play a sound. - Improved: [OpenRCT2#24026] Notification settings have been made into a tab of the Recent Messages window. - Improved: [OpenRCT2#24569, OpenRCT2#24710] Add ten additional translations to the Windows installer. - Change: [OpenRCT2#24559] Scenario options are now disabled rather than hidden when disabling money makes them non-applicable. - Change: [objects#383] Disable all base colours on non-remappable WWTT vehicles, change black to light_blue. - Change: [objects#384] Remove erroneously enabled WWTT third remaps. - Removed: [OpenRCT2#24628] “Pause game when Steam overlay is open” feature (already broken for a long time). - Removed: [OpenRCT2#24640] Grouping by difficulty (instead of per campaign) in the scenario selector. - Fix: [OpenRCT2#15846] Rightclicking on track piece when there is construction below does not work. - Fix: [OpenRCT2#16176, OpenRCT2#23113] Animated tile elements do not always redraw when there is over 2000. - Fix: [OpenRCT2#17365] The slope of new land surfaces is only correct on one side when shifting and resizing the map. - Fix: [OpenRCT2#18080] Obsolete official .DAT files can be loaded accidentally. - Fix: [OpenRCT2#21703] Scenery wall doors get stuck open if the game is saved and loaded whilst they are open. - Fix: [OpenRCT2#24456] Zoomed out vehicles on the ride window tab can sometimes draw incorrectly. - Fix: [OpenRCT2#24458] Vehicles in the ride window vehicle tab are offset differently than vanilla RCT2, and the sprites are cut off at the bottom. - Fix: [OpenRCT2#24576] It is possible to edit open rides in certain circumstances. - Fix: [OpenRCT2#24589] Music tab doesn’t fully render in multiplayer. - Fix: [OpenRCT2#24615] Blank strings in Windows installer. - Fix: [OpenRCT2#24617] ‘Divide by zero’ error when updating boat hire acceleration. - Fix: [OpenRCT2#24626] Viewports that only follow sprites (e.g. in the Ride and Guest windows) can be made to unfollow them. - Fix: [OpenRCT2#24661] `convert` console command always crashes with a segmentation fault. - Fix: [OpenRCT2#24666] `convert` console command rejects files with an SV7 extension. - Fix: [objects#388] ‘Italian Police Ride’ has a non-functional first remap colour.
This allows user to scroll with gamepad stick. We've already had support for gamepad buttons to be mapped as shortcuts in shortcut manager, so no new joystick support was needed.
Note: SDL has distinction between "game controller" and "joystick". The controller is a higher-level API, which automatically maps axes to expected places. Joystick API is still used for buttons.
It was tested on a Windows machine with Xbox controller and the Steam Deck.