Modern Indie Games Ignoring 2nd Party Controllers?
-
Pixel_Outlaw
- Posts: 2636
- Joined: Sun Mar 26, 2006 3:27 am
Modern Indie Games Ignoring 2nd Party Controllers?
Has anyone noticed that a lot of Steam games these days won't work with any offbrand/custom joysticks or controllers?
From what I can gather a lot of it stems from games using SDL 2's (abomination) of a controller interface which essentially is a whitelist of controllers it supports.
Just need to vent my frustrations.
I have a joystick I've built which my OS sees just fine but a lot of games won't detect it because it's not made by Sony, Microsoft, or Logitech.
A few years ago in the SDL 1 days, if your OS saw a controller, a game made in SDL generally let you use it.
This whitelisting controllers and making custom SDL 2 mappings to map button 0 and such to "X" needs to stop.
From what I can gather a lot of it stems from games using SDL 2's (abomination) of a controller interface which essentially is a whitelist of controllers it supports.
Just need to vent my frustrations.
I have a joystick I've built which my OS sees just fine but a lot of games won't detect it because it's not made by Sony, Microsoft, or Logitech.
A few years ago in the SDL 1 days, if your OS saw a controller, a game made in SDL generally let you use it.
This whitelisting controllers and making custom SDL 2 mappings to map button 0 and such to "X" needs to stop.
Some of the best shmups don't actually end in a vowel.
No, this game is not Space Invaders.
No, this game is not Space Invaders.
-
mamboFoxtrot
- Posts: 745
- Joined: Tue Jul 29, 2014 3:44 am
- Location: Florida, Estados Unidos
Re: Modern Indie Games Ignoring 2nd Party Controllers?
oh, is that what the issue is? I had always chalked it up to just being a D-Input vs X-Input thing
at least with Steam games now it seems like you can use Steam's universal controller settings thing to make it work, though sometimes with these budget doujin games I get the opposite issue where I have to turn all that "modernizing" off lol
though the most baffling thing I encountered from an indie game was Shantae: Pirate's Curse not supporting my older controller, but also somehow actively blocking joy2key its like damn y'all really don't want me playin this
at least with Steam games now it seems like you can use Steam's universal controller settings thing to make it work, though sometimes with these budget doujin games I get the opposite issue where I have to turn all that "modernizing" off lol
though the most baffling thing I encountered from an indie game was Shantae: Pirate's Curse not supporting my older controller, but also somehow actively blocking joy2key its like damn y'all really don't want me playin this
-
BulletMagnet
- Posts: 13901
- Joined: Wed Jan 26, 2005 4:05 am
- Location: Wherever.
- Contact:
Re: Modern Indie Games Ignoring 2nd Party Controllers?
I believe the default controller for that one is a wig with a USB plug on it that you have to whip around by moving your neck IRL.mamboFoxtrot wrote:though the most baffling thing I encountered from an indie game was Shantae: Pirate's Curse not supporting my older controller, but also somehow actively blocking joy2key its like damn y'all really don't want me playin this
Re: Modern Indie Games Ignoring 2nd Party Controllers?
Yes I've had a few rants about this, several games from gog have the same problem. They assume a certain a controller, don't specify that in the system requirements, don't have proper reconfig for controls, and can't be tamed using joy2key. So I either use keyboard+mouse or don't play at all.
I was starting to wonder if there is some other workaround out there (like a special joystick driver or something) to work around this bit of developer retardation, but I haven't gotten around to investigating it yet.
I was starting to wonder if there is some other workaround out there (like a special joystick driver or something) to work around this bit of developer retardation, but I haven't gotten around to investigating it yet.
-
null1024
- Posts: 3810
- Joined: Sat Dec 15, 2007 8:52 pm
- Location: ʍoquıɐɹ ǝɥʇ ɹǝʌo 'ǝɹǝɥʍǝɯos
- Contact:
Re: Modern Indie Games Ignoring 2nd Party Controllers?
SDL's new controller API is basically just XInput. The whitelist is a set of non-XInput controllers that have had mappings submitted.
https://wiki.libsdl.org/CategoryGameController
Steam's "generic gamepad configuration support" outright creates the required mappings, though. Non-Steam games should be able to load external mapping sets with a line like the following in the source:
...but many don't.
Also, fuck XInput, which has drastically shrunk the amount of useful gamepads available.
A lot of games in general don't support non-XInput controllers these days.
That wouldn't even be so bad if Windows had a system-wide remapping thing, but it doesn't, which is absurd.
API changes shouldn't require entirely new hardware.
https://wiki.libsdl.org/CategoryGameController
Steam's "generic gamepad configuration support" outright creates the required mappings, though. Non-Steam games should be able to load external mapping sets with a line like the following in the source:
Code: Select all
SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
Also, fuck XInput, which has drastically shrunk the amount of useful gamepads available.
A lot of games in general don't support non-XInput controllers these days.
That wouldn't even be so bad if Windows had a system-wide remapping thing, but it doesn't, which is absurd.
API changes shouldn't require entirely new hardware.
Come check out my website, I guess. Random stuff I've worked on over the last two decades.
-
Pixel_Outlaw
- Posts: 2636
- Joined: Sun Mar 26, 2006 3:27 am
Re: Modern Indie Games Ignoring 2nd Party Controllers?
null1024 wrote:SDL's new controller API is basically just XInput. The whitelist is a set of non-XInput controllers that have had mappings submitted.
https://wiki.libsdl.org/CategoryGameController
Steam's "generic gamepad configuration support" outright creates the required mappings, though. Non-Steam games should be able to load external mapping sets with a line like the following in the source:...but many don't.Code: Select all
SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt");
Also, fuck XInput, which has drastically shrunk the amount of useful gamepads available.
A lot of games in general don't support non-XInput controllers these days.
That is similar to what I found too.
For others on Linux you might try the following line before calling steam.
It seems that they've removed the traditional way of reading controllers.
Code: Select all
export SDL_JOYSTICK_DEVICE=/dev/input/js0
Code: Select all
unset SDL_JOYSTICK_DEVICE
And here is the bright guy who wrecked it.
SDL2 code skips over the non event* named files in /dev/inpuot
changeset: 6729:fdaeea9e7567
date: Tue Dec 11 11:07:48 2012 -0500
summary: Removed old Linux joystick API (/dev/js*).
changeset: 6728:0f8336c1f6d9
date: Mon Dec 10 15:50:42 2012 -0500
summary: Removed the "logical" Linux joystick code.
Last edited by Pixel_Outlaw on Sun Jun 28, 2020 1:49 am, edited 1 time in total.
Some of the best shmups don't actually end in a vowel.
No, this game is not Space Invaders.
No, this game is not Space Invaders.
Re: Modern Indie Games Ignoring 2nd Party Controllers?
I've disagreed with lots of decisions, committs, and reverts over the years, but I'm not sure that posting the guy's contact info will help.
Gordon didn't act unilaterally.
Gordon didn't act unilaterally.
We apologise for the inconvenience
-
Pixel_Outlaw
- Posts: 2636
- Joined: Sun Mar 26, 2006 3:27 am
Re: Modern Indie Games Ignoring 2nd Party Controllers?
Fair enough. I redacted the contact information.orange808 wrote:I've disagreed with lots of decisions, committs, and reverts over the years, but I'm not sure that posting the guy's contact info will help.
Gordon didn't act unilaterally.
People have the change ID there they can research it and contact him.
Some of the best shmups don't actually end in a vowel.
No, this game is not Space Invaders.
No, this game is not Space Invaders.
Re: Modern Indie Games Ignoring 2nd Party Controllers?
My biggest complaint is when only analog stick is supported, with the D-Pad is completely ignored and can't be assigned to anything. Is there some extra challenge in using the D-Pad on modern controllers that makes it so difficult to enable?
There are far too many 2D indie games that would benefit from using D-Pad to move, but nope, you must use the analog stick for whatever reason.
There are far too many 2D indie games that would benefit from using D-Pad to move, but nope, you must use the analog stick for whatever reason.
Typos caused by cat on keyboard.
-
null1024
- Posts: 3810
- Joined: Sat Dec 15, 2007 8:52 pm
- Location: ʍoquıɐɹ ǝɥʇ ɹǝʌo 'ǝɹǝɥʍǝɯos
- Contact:
Re: Modern Indie Games Ignoring 2nd Party Controllers?
It's almost entirely the fact that the D-pad has an entirely different API interface vs the sticks. This isn't too hard to fix, but it's a bit tedious, especially if your code just assumes analog stick values everywhere.Jeneki wrote:My biggest complaint is when only analog stick is supported, with the D-Pad is completely ignored and can't be assigned to anything. Is there some extra challenge in using the D-Pad on modern controllers that makes it so difficult to enable?
There are far too many 2D indie games that would benefit from using D-Pad to move, but nope, you must use the analog stick for whatever reason.
as a dev, you need to do something like this [this is with the SDL2 "joystick" API, it'd look a bit different with the "controller" API]:
Code: Select all
//CC0, use freely
//caveat emptor: none of this is tested
//pretends the dpad is an analog stick, get the x axis:
//you can muck about with this for proper sqrt(2)*distance diagonals but whatever, don't trust the analog stick to be a circle gate anyway
//this is a little simpler with the "controller" API since dpad inputs are just individual buttons there (eg, SDL_CONTROLLER_BUTTON_DPAD_UP/DOWN/LEFT/RIGHT)
int get_dpad_x(SDL_Joystick *joy) {
Uint8 hat = SDL_JoystickGetHat(joy,0);
if (hat == SDL_HAT_LEFT || hat == SDL_HAT_LEFTUP || hat == SDL_HAT_LEFTDOWN) {
return -32767; //might have gotten this exactly backwards, but one goes up, the other goes down
}
if (hat == SDL_HAT_RIGHT || hat == SDL_HAT_RIGHTUP || hat == SDL_HAT_RIGHTDOWN) {
return 32767;
}
return 0;
}
//pretends the dpad is an analog stick, get the y axis:
int get_dpad_y(SDL_Joystick *joy) {
Uint8 hat = SDL_JoystickGetHat(joy,1);
if (hat == SDL_HAT_UP || hat == SDL_HAT_LEFTUP || hat == SDL_HAT_RIGHTUP) {
return -32767;
}
if (hat == SDL_HAT_DOWN || hat == SDL_HAT_LEFTDOWN || hat == SDL_HAT_RIGHTDOWN) {
return 32767;
}
return 0;
}
//these are what you'd use in your game code, probably replacing a bunch of SDL_JoystickGetAxis calls
//this pretends the two entirely separate inputs are one
//there's several ways to do this, but here, we prioritize d-pad inputs if given for each direction
int get_input_dir_x(SDL_Joystick *joy) {
int dir=get_dpad_x(joy);
if (dir!=0) { return dir; } //if d-pad is pressed, return it
return SDL_JoystickGetAxis(joy, 0); //otherwise, read the stick position
}
int get_input_dir_y(SDL_Joystick *joy) {
int dir=get_dpad_y(joy);
if (dir!=0) { return dir; }
return SDL_JoystickGetAxis(joy, 1);
}
you'd replace all the direct analog stick checks with calls to get_input_dir_x/y
Come check out my website, I guess. Random stuff I've worked on over the last two decades.
-
Pixel_Outlaw
- Posts: 2636
- Joined: Sun Mar 26, 2006 3:27 am
Re: Modern Indie Games Ignoring 2nd Party Controllers?
It's pretty annoying.Jeneki wrote:My biggest complaint is when only analog stick is supported, with the D-Pad is completely ignored and can't be assigned to anything. Is there some extra challenge in using the D-Pad on modern controllers that makes it so difficult to enable?
There are far too many 2D indie games that would benefit from using D-Pad to move, but nope, you must use the analog stick for whatever reason.
Mostly because they've not put serious time into a dpad and the analog stick /seems/ more encompassing and precise.
In actuality it's slower (more throw) and more imprecise (too many possible directions = inconsistent input)
Some of the best shmups don't actually end in a vowel.
No, this game is not Space Invaders.
No, this game is not Space Invaders.
-
Obiwanshinobi
- Posts: 7463
- Joined: Sun Jul 26, 2009 1:14 am
Re: Modern Indie Games Ignoring 2nd Party Controllers?
So fucking gash it sounds that I DON'T wanna upgrade from WinXP Pro for a lil' bit longer, again. Even ports from PS2-era consoles, typically troubled in MANY a way (say, MGS2: Substance) would, in general, respect your average USB controller/adapter. Reverse horizontal camera movement in Billy Hatcher and the Giant Egg PC port was the worst I can put my finger on (and a far cry from being that port's biggest flaw).
The rear gate is closed down
The way out is cut off
The way out is cut off