Suggestion: Try to do automatic joystick/gamepad/controller detection/configuration when starting the game for the first time #920
Replies: 8 comments
-
automatic gamepad mapping is a planned feature and is already implemented locally (although not working at the moment since required glfw functions needed for this are missing in glfw-js library that we've switched to recently. @samhocevar is planning to make a pull request to that library down the road that will add missing stuff) As for the second suggestion, there is ongoing Lua scripts refactoring effort, so other than bug fixes, pull requests with new features, aimed at the current version of the scripts won't be accepted, until the work on refactoring is finished (may not be ready for next build) |
Beta Was this translation helpful? Give feedback.
-
I would suggest that the configuration section for Windows and Linux joysticks is either kept separate or autodetected if such a thing could be possible as well. Since I'm dual booting Linux and Windows, I use the same Ikemen folder for both, sometimes I use the windows .exe and sometimes I run Ikemen from Linux, but the joystick config on Windows doesn't match the exact same hardware (same joystick) on Linux, so if I change config in one side, it becomes completely disconfigured for the other side. |
Beta Was this translation helpful? Give feedback.
-
@Isakku, you can already use -config argument to run the engine using different configuration file path. |
Beta Was this translation helpful? Give feedback.
-
Thank you. I didn't know there was that command line option. However, again as I said I would like it to work automatically detecting if it's being run on Linux or on Windows and load the corresponding configuration (for the joysticks only) automatically if possible. Having different config files for each OS may seem the way to go, but what if I want other configuration options to remain the same for both? |
Beta Was this translation helpful? Give feedback.
-
I don't think bloating configuration file with additional data just for this purpose is a good idea, especially when the problem is already solved by using -config parameter. |
Beta Was this translation helpful? Give feedback.
-
I believe that joysticks can be autoconfigured out of the box and tweaking config files won't be even necessary (unless you don't like the defaults and want to reconfigure something). The game uses glfw library for joysticks handling and here is the glfw's joysticks mapping database: https://github.com/glfw/glfw/blob/master/src/mappings.h As you can see, each entry in this database contains guid (the first column), gamepad name (the second column) and the operating system type (the last column). So your use case is already covered and glfw developers are aware of the operating system differences and this is taken into account. But I want to implement an even better joysticks support for additional convenience. The current movelist screen looks like this: |
Beta Was this translation helpful? Give feedback.
-
Sadly the -config parameter doesn't seem to be a very practical solution. Winmugen's Mugen.CFG file was just plain text and had several sections even for each operating system. There was a default joystick config [P2 Joystick] ;Default config and a windows joystick section, [P1 Joystick Win] If the engine was run on windows it would load those, otherwise it would load the defaults The functionality to automatically detect the OS and keep the joystick config for each OS is needed back, it should not require an adittional command that causes confusion (which config.json was which? which one should I use now?) Copying an entire joystick configuration from one MUGEN to another MUGEN was just a matter of copying a section like this: [P1 Joystick Win] ;Default config for win Now I understand that the json format is better for coding, so going back to plain text may not be the anwer, but at least having settings for each OS stored and automatically detected would be nice. EDIT: |
Beta Was this translation helpful? Give feedback.
-
The Linux screensaver issue probably needs to be fixed in glfw, see glfw/glfw#854. |
Beta Was this translation helpful? Give feedback.
-
The quality of life can be greatly improved for new users if the game just could automatically detect the type of their joystick/controller and provide a reasonable configuration for it out of the box.
For example, PS3 controller is supported by modern Linux systems out of the box and requires no special effort for the user to configure it in the system. Basically just plug the USB cable and you are done. But now the user starts Ikemen-GO for the first time and needs to go to the OPTIONS menu to configure joystick buttons, because the default configuration isn't usable for his PS3 controller. I think that the game could provide some reasonable defaults out of the box, based on the automatically detected joystick/gamepad/controller type.
Additional nice feature would be automatic icons remapping in the movelists of the characters. So that a player with a PS3 controller would see "square", "triangle", "cross", "circle", "L1", "L2", "R1", "R2" icons matching the labels of the actual hardware buttons instead of "A", "B", "C", "D", "Z", "Y", "Z", "W" icons there.
Please let me know if you would be interested in a pull request implementing this functionality.
Beta Was this translation helpful? Give feedback.
All reactions