-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add support for using more than 4 simultaneous controllers on Windows #8620
Comments
DirectInput is a legacy API, so it may not be the best way to go forward. The GameInput API is promising, but it requires a recent Windows 10 build or Windows 11. This is probably not an issue as long as we have a fallback on older Windows versions (as Godot still aims to support Windows 7+ on a best-effort basis for now). The larger issue I see with GameInput is that it's part of the GDK, which we'd need to link the entirety of to be able to use it in Godot. It may not be buildable with MinGW either, which we use for official Godot Windows binaries. |
GameInput is definitely the more modern way to move forward, but what is the current handling of non-XInput controllers? I can use my Switch Pro controllers that I've paired via bluetooth and I can use them in addition to my 4 xbox controllers to bypass the 4 XInput controller limit. This works fine for testing but not as a requirement for players. This would lead me to believe we've already got DirectInput handling built in, just no way to apply it to XInput controllers, is that the case? |
The problem for the longest time were different APIs. DirectInput is old, Xinput supports only 4 controllers, GameInput is only windows 11, some are manufacturer APIs proprietary and only work on windows... Ultimately there is a way, as far as i know most if not all controllers are HID devices. This is also the only way to support stuff like flightsticks, that have like 11 axis, and 50 buttons + force feedback. The actual advantage of hid is that it works with everything, and everywhere, If the device is a hid device by default it doesn't (or shouldn't) need a driver to work. As for how godot would deal with hid, essentially the device descriptor tells the user what data it sends so that isn't hard, the only "hard part" is keeping up with the specification. |
DirectInput is old but new games are still coming out that use it to enable 8 controllers on windows. This is a critical feature for many local multiplayer games and Godot would benefit greatly from having some way (no matter how hacky) to use 8 controllers.
I'm also curious how Switch Pro controller can be used to exceed the 4 controller limit. Thank you! |
Describe the project you are working on
An up to 8 player, single screen, local multiplayer versus game.
Describe the problem or limitation you are having in your project
With an Xbox Wireless Adapter it's quite easy to connect 8 Xbox controllers to my computer and have them recognized by Windows. Unfortunately, the XInput API has a maximum of 4 controllers at one time so any controller beyond the 4th is not recognized by Godot's
Input
system.I've created an Issue/Reproducible Project here: godotengine/godot#85937
Edit: Found a previous Issue before the proposal system was implemented that requested the same feature: godotengine/godot#19173
Describe the feature / enhancement and how it helps to overcome the problem or limitation
If more than 4 controllers are connected fall back to alternative input APIs to allow them to be recognized seamlessly.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
DirectInput
supports more controllers and is used by various engines/games as the fallback input method.On Windows the
Windows.Gaming.Input
is a new API allows for more than 4 controllers.If there are any limitations with the fallback, create a project setting that must be enabled to enable this system.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, the additional controllers don't register in any way with the
Input
system. at the moment.Is there a reason why this should be core and not an add-on in the asset library?
The
Input
system is a core part of Godot.The text was updated successfully, but these errors were encountered: