Open Somechump opened 2 years ago
The title may be confusing. This is about being able to control 'lightgun games' with a controller. Currently the 'lightgun' support only takes input from mouse or touchscreen coordinates.
The request is about adding the controller thumbstick axis as a form of input to control lightgun games. Not the other way around. Which is a pretty decent request in my opinion.
Unfortunately, most cores have hardcoded lightgun support only taking input from a mouse. Instead of using the libretro 'lightgun' implementation which could be redirected to any platform supported form of input such as a controller.
With the lightgun trigger only taking input from the RETRO_DEVICE_ID_MOUSE_LEFT
hardcoded to port 1 instead of RETRO_DEVICE_ID_LIGHTGUN_TRIGGER
used in port 2 for example.
Not being able to map a controller button to RETRO_DEVICE_ID_LIGHTGUN_TRIGGER
, nor being able to have a second player join in.
Currently most cores decide which input to take, ignoring the frontend input driver. While the frontend / libretro lightgun support is available, cores haven't been updated to reflect this support.
For example, PCSX-ReARMed: https://github.com/libretro/pcsx_rearmed/blob/master/frontend/libretro.c#L2247-L2287
Hi,
I am not sure about getting thumbsticks to control the Libretro lightgun coordinates specifically, but lots of console games should have a controller option for lightgun games already. Atari 2600 (lr-stella) is the only one I can think of that has no such option, but that list of games is 1 officially released + 1 unreleased + a handful of homebrew games. [EDIT: forgot about NES's Zapper, Gen/MD's Menacer, and SNES's Super Scope... 😅] The various MAME versions have options for controlling the gun axes with controllers. The analog-stick support may not work very well with the true lightgun games, but you can usually map the stick to digital input and adjust sensitivities to make those games play like console lightgun games with a controller.
Is there a particular benefit to using the thumbstick to specifically control the lightgun input? See above
P.S. I recently added support for mappable lightgun buttons to lr-pcsx-rearmed. If you find any other emulators that hard code the lightgun buttons, I can adjust those to make the buttons mappable.
https://github.com/libretro/pcsx_rearmed/commit/2815469a64a5a7558e162f7c06c0bef35baa2f8c
This is not a viable request for multiplayer lightgun titles, only useful if the system cannot have a mouse or mouse-like input in any way.
Even if the feature was implemented, it would be severely restricted by the range limitations of joystick axes and the fact that joysticks cannot report true accurate displacement or absolute coordinates, two qualities required for mouse or lightgun software.
Rather, pursue methods to allow multiple mice, not tied to the OS' default mouse. Having an option to have the second player use their cursor controlled by the joystick severely hinders their experience compared to the mouse user.
it could with support for the drivers that have been written for the Guncon3 also. it seems to appear as a joystick instead of mouse/Pointing device.
This could solve many problems. With mame core you can set axis Y X(on mame tab settings) to control lightgun. So two-four player with xinput analog stick is easy and works pretty good with wiimotes. X and Y values are predefined, no need to scratch the head on that. Many emulators use absolut analog stick input (mame, model 3, teknoparrot, among others) Flycast core added this https://github.com/flyinghead/flycast/commit/192bbb715ea8efb10985c3fb67aa04e94bfe9ead You can see the code there.
Not sure how can this be added to platforms which use the analog stick for other purposes. Maybe an option on core settings to use analog stick like absolute analog stick input. Or on controller settings.
The option for controlling a lightgun gun game on retroarch is limited to mouse or lightgun.
Please add another input option that gives the ability to map a joystick axis to also be used as a lightgun input. This will need be be mapped as the whole axis e.g. x axis, y axis and not how retroarch currently maps input with x-left, x-right, y-up, y-down.
This will allow multiplayer lightgun games instead of having a single mouse input.
This is currently possible in stand alone emulators such as Mednafen, Supermodel, Teknoparrot, Mame (including retroarch Mame, but configured inside the core) and possibly others. These emulators allow the binding of a joystick axis to allow the lightgun cursor to be positioned anywhere on screen by holding a joystick in any position. Demulshooter also retroactively adds this feature into other emulators that do not support this feature. These emulators all work great with a wiimote and dolphinbar which makes the ir pointer the z and zr axis.
For your consideration.