Design Different Controller Layouts

I am working on a game with which I am implementing game-pad support. I know I will probably never actually publish it on a console, so I still have keyboard controls, but it plays much better with a controller. I am currently using my Nintendo Switch controllers because they're the only PC compatible controllers I own (and I like Nintendo controllers). The game uses the left joystick, the left trigger button (maybe later the right also), and the ABXY face buttons.

The problem I'm realizing is that without it targeting a specific console, I have no idea what type of controller people would be using if they choose to on PC. Most people seem to use Xbox controllers, which have the face buttons reversed from Nintendo. Play Station uses shapes. Some controllers just have numbers. So in the GUI I want to show the name of the button you are supposed to press (and in the tutorial texts), but I can't because it may be different depending on what controller someone is using.

I don't want to just allow the AB and XY positions to switch, not only are the controls optimized to be in those physical positions, but the GUI matches those positions.

My initial thought was to program three presets, keyboard controls (which is WASD for left joystick, IJKL for face buttons, (and space for K alternative) and shift for L trigger), or Nintendo's ABXY setup, or Xbox BAYX setup. You'd just pick the one your controller used when you plugged in a new gamepad.

Alternatively, I could just let them map their own keys, but that still doesn't help with naming. I could just use arrow symbols instead for the face buttons (actually... now that I think about that, that may work the best). Or I could just program it for the most common controller and let other people figure it out.

Is this a problem I need to bother with? What do other games do for this? What would happen if I connected my joycons to a game intended to run with an Xbox controller? Did I even ask a question that is clear enough to be answers? Thanks.
 
But there are too many different types of gamepads for that to be of any use. That's pretty much only useful for like, a browsing list of available game-pads or something. https://forum.yoyogames.com/index.php?threads/gamepad-description-list.7149/

I think I'm just going to have an option to choose from a couple of standard controllers. That's what Cook Serve Delicious does apparently (as mentioned in that other thread) and by sheer chance I own that game so I just looked at how it works.
 

hogwater

Member
Personally I would create a default keyboard and gamepad layout, and base the gamepad one on an Xbox controller.

Then make a button mapping menu, and allow players to choose between Xbox and Playstation button descriptions/images. You could add Switch buttons to that if you wanted.

As you said, there are too many DirectInput controllers and layouts to bother with.
 
Top