More Than 4 Local Multiplayer 5pluslocal
More Than 4 Local Multiplayer 5pluslocal
January 27, 2016
 This topic has been pinned, so it's probably important
supersmo Apr 18, 2017 @ 4:22pm
Instructions to developers to support more than 4 gamepads
Point developers to this thread to encourage them to add support for more than 4 gamepads or help them fix issues with the 4 player XInput limitation on Windows.

XInput limits number of controllers to 4 on Windows
* Max 4 controllers.
* Standardized controller layout.

XInput came along with XBox360 which only had support for 4 gamepads which is why the controller cap is so low. To get around this you need to use another API.

Alternatives to XInput:
DirectInput (Legacy, recommeded to move on to RawInput if possible.)
* Any number of controllers.
* Controller layout not standardized.
* XBox360 and XBox One controllers don't have rumble and both triggers are on the same axis so you can't detect if both are pressed at the same time, this is because of the XBox360 driver implementation.

(Conspiracy theory: Microsoft intentionally flawed the driver for XBox360 controllers on Windows to encourage game developers to use XInput. This in turn forced end users to have to go and buy XBox360 controllers since their old controllers didn't work with the new games.)

Raw Input
* Any number of controllers.
* Controller layout not standardized.
* XBox360 and XBox One controllers don't have rumble and both triggers are on the same axis so you can't detect if both are pressed at the same time.

* Used for the Univeral Windows Platform (Windows 10, XboxOne, etc.)
* Supports more than 8 controllers on Windows 10.
* XBox360 controllers have rumble and triggers on separate axes.
* Can control the extra 2 rumble motors on XBox One controllers.

How to fix your game:
Thankfully some of the input libraries/components used in game development support accessing XInput devices through DirectInput instead. I would recommend having XInput enabled as default and add a setting to disable XInput. This is because some users have issues with XInput devices under DirectInput. Sometimes games with this option require you to restart the game after changing the setting.

Use the Native Input Module[] and disable XInput

According to the documentation there is a note about being able to disable XInput in the Input Manager.

Also ReInput.ConfigHelper has a property called useXInput which should allow you to toggle XInput on or off. Looks like switching via this property can be done at runtime since rewired resets automatically when the property is set.

Before calling SDL_init add this line of code:

In order for XInput devices to work in this mode you may need to update your gamecontrollerdb.txt file. Latest files can be found here:

XNA Framework
If your game is really old and developed using XNA you can use:
Nuclex Framework[] You can modify the source a bit to support any number of gamepads.

(Please correct any erroneous info in this discription by replying to this thread.)
Last edited by supersmo; Aug 2, 2019 @ 1:26pm
< >
Showing 1-11 of 11 comments
GYMMER Apr 18, 2017 @ 4:59pm 
good initiative! I'll keep tuned
monokoma Apr 23, 2017 @ 7:39am 
Awesome idea! I really hope more devs could think about adding 4+ players support to their games, there are never enough multiplayer games for 8 players and that could be an incentive to buy the game!
supersmo Apr 23, 2017 @ 12:19pm 
Thanks :-)
Some of the instructions in there have already helped: Swordy, Colliders (should be fixed in next patch) and Dog Fight. Hopefully more devs will find this info usefull.
Last edited by supersmo; Apr 23, 2017 @ 1:34pm
Sharingan Yusuf Jan 26, 2020 @ 1:47pm 
I am using Rewired in Unity to make an asymmetric up to 6 player splitscreen with 1 VR player shooting game. Does Rewired automatically support the Steam Input API?
supersmo Jan 26, 2020 @ 2:09pm 
Haven’t used ReWired myself but it doesn’t look like it when I read the documentation.
Sharingan Yusuf Jan 26, 2020 @ 2:32pm 
I want to learn more about Steam Input API and how I can support it, any useful resources you know of?
Sharingan Yusuf Jan 26, 2020 @ 2:42pm 
Sharingan Yusuf Jan 26, 2020 @ 3:15pm 
Since Steam Input API is based on C++ and Unity uses C#, an API bridge is needed to reach Steam's API. An example of this API bridge is Facepunch.Steamworks:
monokoma Jan 27, 2020 @ 3:57am 
thanks for the link Sharingan! The more people research about this, the more we can help other developers to add 4+ multiplayer support for their games :)
Domarius Jan 12 @ 7:54pm 
Wow, I wish I knew about this thread before starting HopSquash!. Here's hoping I can update it. It uses Unity now, and they use XInput on Windows, but SDL on Linux and Mac, so actually Unity games support more Xbox gamepads on Linux and Mac than Windows! I think I can use external libraries for the Windows build to fix this. Definitely I'll build in support for more than 4 XBox gamepads in my future games.
Last edited by Domarius; Jan 12 @ 7:55pm
< >
Showing 1-11 of 11 comments
Per page: 15 30 50