-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add page on controller-specific features (currently just LED) #11533
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
base: master
Are you sure you want to change the base?
Conversation
skyace65
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor issues but overall this is really good.
Is there any official list on what controllers support light changing via SDL3?
Also after browsing through the engine PRs I'm seeing that these would only be supported on Windows, Mac and Linux as SDL3 support hasn't been merged yet for other platforms. That should be explicitly stated on this page so devs for other platforms don't get confused if they see something not working.
| Godot supports controller-specific features that can further enhance the gameplay | ||
| experience. This page describes these features, how existing games have used them, | ||
| and how you can get started with them in Godot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth re-wording this to just be explicit that only LED features are supported for now. I expect that to change in the future, but when 4.6 releases it's going to be the only thing available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get what you're suggesting here, but I'm not sure at the moment how to rephrase it so that the page overall doesn't sound like it should be entirely dedicated to the LED feature. For example, if we changed
Godot supports controller-specific features that can further enhance the gameplay experience.
to
Godot supports changing the LED color on specific controllers to further enhance the gameplay experience.
then as a reader, I would probably wonder why the page as a whole isn't titled something like "LEDs on controllers" instead of the more generic "Controller features". Given that the "LED color" section is the only one on the page, IMO it's self-explanatory that it's the only supported feature for now.
I suppose we could add a sentence saying something like
For Godot 4.6, only controller LED support is available, but more features will be supported in future versions.
However, that seems like a bit deeper of a dive into Godot's development than the manual tends to do.
| Unless you specifically advertise your game as requiring specific controllers, | ||
| remember that there is no guarantee that players will have a controller with | ||
| given features. | ||
|
|
||
| As a result, we suggest using these features to enhance the gameplay experience | ||
| for players whose controllers support them, without detracting from those who | ||
| don't have controllers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning is good advice, but I'm 50/50 on if it should be included or not and I'll defer to others. In my mind this just seems so obvious it's not worth having it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was imagining this page focusing on features that exist mainly to add extra touches of "polish" or "juice" to the game, rather than play an essential part in the experience. It wouldn't surprise me that some (possibly less-experienced) developers might incorporate these features since they're testing with a controller that supports them, forgetting that the features aren't available to everyone.
I think only DualShock 4 and DualSense (and their copies) have LED lights. I haven't checked if copies of those controllers work too but I think they should since to work on their respective consoles they have to implement the original packet "interface" that is also used by SDL in the HIDAPI joystick driver. |
|
Thanks for the review! I tried digging into the SDL source code to find how it determines whether or not a joypad supports LEDs, but it looks like it eventually defers to platform-specific APIs. As such, I think it should be sufficient to simply state that the recent PlayStation controllers (DualShock and DualSense) reliably have them, but that in general |

Sets the groundwork and first feature for #11466 .
This PR adds a new page, "Controller features", which describes and provides examples for various controller features that are less essential than "Controllers, gamepads, and joysticks".
Currently, because LED light control is the only merged feature so far, it is the only section on the page; however, as other features like adaptive triggers, touchpads, accelerometer and gyroscope, and joypad information are added to the engine, corresponding sections on these features can be added to this page.