1
\$\begingroup\$

I'm making a multiplayer game in GameMaker Studio 2. The game supports upto 12 controllers, where the first four are XInput controllers. The rest would be DirectInput.

If I try playing with 8 Xbox controllers, only 4 of them are detected in the game, as expected.

But, is there a way to get more than 4 Xbox controllers working?

| improve this question | | | | |
\$\endgroup\$
  • \$\begingroup\$ I found some project on gitlab (open_xinput) that allows to use XInput but with more than 4 controllers, maybe you can take a look and see if it works? \$\endgroup\$ – Guest123654 Mar 13 at 22:41
2
\$\begingroup\$

Xinput library only supports 4 controllers at a time - please refer to the wiki page on Directinput -DirectInput Wiki. May take some work, but you could enumerate some of the controllers under Direct Input initially, then eliminate those being detected by XInput. That would require interrogating the GUIDs on the controllers. I believe you can obtain them in XInput.

| improve this answer | | | | |
\$\endgroup\$
  • \$\begingroup\$ "you could enumerate some of the controllers under Direct Input initially" How would you do that? If I'm using GameMaker Studio, I suppose I'll need to write an external DLL with C++ or something? \$\endgroup\$ – Gurpreet Singh Matharoo Jul 15 '19 at 5:40
  • 1
    \$\begingroup\$ Most likely yes. Which is certainly going to have to roll something of your own. I would test the more than 8 controllers myself. Only have 7. The question will be whether directinput recognizes more than 8. I haven't seen anything to suggest it doesn't \$\endgroup\$ – ErnieDingo Jul 18 '19 at 21:25
  • \$\begingroup\$ Keep in mind that XInput and DirectInput have slightly different specs: XInput will only support XBox 360 type controllers, while DirectInput will support pretty much any controller, old and new. However, there are some features in the XBox 360 controllers that only work with XInput, such as the vibrators, and separate L/R triggers -- in DirectInput, they are both mapped to a single axis. Also, XInput has much better performance, and is much easier to use than DirectInput. \$\endgroup\$ – Panda Pajama Mar 14 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.