Electronicks / JoyShockMapper

A tool for PC gamers to play games with DualShock 4s, JoyCons, and Pro Controllers. Gyro aiming, flick stick.
Other
332 stars 20 forks source link

[feature request] Cardinal directions quadrant for PS Touchpad #101

Closed 80T closed 10 months ago

80T commented 10 months ago

Currently the TOUCHPAD_MODE "GRID_AND_STICK" can only be mapped as a grid of nrows and ncolumns. An adapter like the Armor-X Pro in PS Mode outputs 4 touch inputs in roughly the 4 Cardinal directions. As such, in order to use the 4 simulated touch outputs by the Armor adapter, you can only use a minimum of 3x3 grid. In this scenario, 5 of the grid squares, 1, 3, 5, 7, 9 are empty and can not be used as we only have 4 Cardinal touches. If said grid could be rotated by a 45 degrees angle, we could have a 2x2 "X" grid with only 4 Cardinal slices to be used.

In practice Steam seems to agree with the 4 Cardinal inputs, but it can not use more than 1 touch at a time, on the other hand, JSM can use more than 1 touch at once, yet it is a bit fiddly to get the inputs to be recognized in the proper grid squares. Sometimes the M2 button simulated touch shows up as simply TOUCH, other times it's showing up just under the M4 square, depending on the grid "resolution"/size. I believe that is somehow an.. "overflow" from the edge of the right side where it shows up in Steam to the next row on the very edge starting the left side..

80T commented 10 months ago

Armor-X Pro M1-M4 PS Touch Regions - Copy (6)

Well, this is where I've narrowed down the Touchpad touches on the M1-M4 buttons on the Armor-X Pro to be landing on in an 8x3 grid resolution (max resolution can only be up to 24 cells I believe) Steam in Green, with the blue dots as visual indicators, while Orange is JSM (the cell in the grid only) Seems like somehow, in JSM the M2 "touch" overflows on the next row in the first column.. (unlike Steam that sees the touches roughly in the Cardinal directions of the touchpad - which should be the correct behavior if you ask me)

Should JSM read those 4 touches in the 4 cardinal direction, just like Steam Input does, I'd say the most effective way to split the touchpad would be in 3 columns, out of which the center column would be further split horizontally in two.. "rows". Something like this:

PS_TouchPad_Split - Copy

Electronicks commented 10 months ago

Assuming I get to fix M2 coming out in the wrong place, what's wrong with using the 3x3 grid and having the M1-4 mapped to T2, T6, T4 and T8 respectively?

80T commented 10 months ago

Assuming I get to fix M2 coming out in the wrong place, what's wrong with using the 3x3 grid and having the M1-4 mapped to T2, T6, T4 and T8 respectively?

Whatever is more efficient. I was mostly thinking space efficiency on the real hardware for one (more space to touch the same control - no dead spots, more.. intuitive) and secondly, I'm thinking maybe these adapters might have some unknown degree of variation from unit to unit of where the touches land (thus, the less "dead-spots", the more chances you'd always end up with a touch in the desired control region - or in an.. expected region in the case of this adapter's simulated touches)

Actually, scrap that, if I'm looking closer, a 2x3 grid (as I'm currently using anyways) can get the same result as my "colored rectangle" above.. T1/T4 = WT, T2 = NT, T5 = ST and T3/T6 = ET.. it's just 2 duplicate/redundant bindings in the config. So, I suppose if you could get the M2 to not overflow on the other side, that would actually be everything we'd need.

Cheers!

Sorry, I meant 3x2 grid..

Oh and maybe we could even have an option to merge adjacent cells into a single cell on the grid.. idk.

Electronicks commented 10 months ago

I like the idea of merging cells. Can you PM me on discord. I could send you test builds and you can report to me what your device does.

80T commented 10 months ago

I like the idea of merging cells. Can you PM me on discord. I could send you test builds and you can report to me what your device does.

PM sent

80T commented 10 months ago

This is now obsolete as a request, as the touch regions are being fixed and the simulated touches should land in their own cells on a 2x2 grid.