Extending GameController mapping syntax

Unless we turn it into “Widget Factory_ Inc GameCube to USB converter
box”. :slight_smile:

JosephOn Thu, Nov 14, 2013 at 11:00:11PM -0500, Ryan C. Gordon wrote:

Currently the token separator is the comma. The GUID field is fixed
format, the name field ? probably does not provide a means to cope with
a comma in the joystick name but can otherwise contain just about

It’s worth noting that the name field doesn’t have to map to what
the HID device reports (and often doesn’t), so we can simply say “you
can’t have a comma in the name, it won’t work.”

Although, I’m sure there’s a “Widget Factory, Inc GameCube to USB
converter box” name out there waiting to strike.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

[…]

Wait… Are these deadzones implemented per axis, or as a square or
circular area?

Large per-axis dead zones completely ruin the experience in twin stick
shooters and the like where you’re effectively using at least one of
the sticks to indicate direction. There, the dead zones (which should
preferably be relatively large, unless you have analog power control
for movement) need to be implemented in 2D, after combining the
directions of the respective stick - otherwise you simply cannot aim
near the horizontal and vertical directions.

BTW, I’m suspecting that my Logitech F-* pad is implementing
(annoyingly large) per-axis dead zones in hardware or something…
But, I’ve only used it with SDL 1.2 so far. Can’t remember if I’m
seeing the same problem on the OS level. Will check ASAP.On Fri, Nov 15, 2013 at 8:36 AM, T. Joseph Carter wrote:

ZOMG you’ve GOT to be kidding me. 7849 and 8689!? Seriously?

I wasn’t kidding about nuking the dead zone from orbit, I guess.

//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://consulting.olofson.net http://olofsonarcade.com |
’---------------------------------------------------------------------’

Those are left and right stick, respectively. And while I do not
have any of the F-?10 sticks to play with, on the Mac my older
Logitech Dual Action uses the same driver as the F-310. It has a
very solid centering and is within ?128. :slight_smile: But the F-310 is
reported to have a very small dead zone under Linux, with many
complaints that the gamepad is crippled by Logitech under Windows.

Someone has a 3rd party driver that behaves better, just as there is
a 3rd party driver that makes the XBox 360 controller under
DirectInput map the triggers to separate axes with positive-only
results basically just as SDL does it.

JosephOn Fri, Nov 15, 2013 at 09:01:50AM +0100, David Olofson wrote:

On Fri, Nov 15, 2013 at 8:36 AM, T. Joseph Carter <@T_Joseph_Carter> wrote:

ZOMG you’ve GOT to be kidding me. 7849 and 8689!? Seriously?

I wasn’t kidding about nuking the dead zone from orbit, I guess.
[…]

Wait… Are these deadzones implemented per axis, or as a square or
circular area?

Large per-axis dead zones completely ruin the experience in twin stick
shooters and the like where you’re effectively using at least one of
the sticks to indicate direction. There, the dead zones (which should
preferably be relatively large, unless you have analog power control
for movement) need to be implemented in 2D, after combining the
directions of the respective stick - otherwise you simply cannot aim
near the horizontal and vertical directions.

BTW, I’m suspecting that my Logitech F-* pad is implementing
(annoyingly large) per-axis dead zones in hardware or something…
But, I’ve only used it with SDL 1.2 so far. Can’t remember if I’m
seeing the same problem on the OS level. Will check ASAP.

I’m reasonably sure that those deadzones are per-stick (2D), and not
per-axis (1D/Manhattan-style). I’ve messed with the X360 deadzones enough
and that’s what I’ve felt. But… The GameController API doesn’t tell
when two axes are entangled/constrained orthogonally.

To be clearer about that concern here: Thumbstick axis deadzones should be
considered as distances from the center position, not as distances along
the separate axes. If you use deadzone values according to the separate
axes, then diagonal movements on a circular thumbstick have an effective
deadzone of the hypotenuse (h=sqrt(xx + yy)). Without explicit info
telling which axes are combined into one thumbstick, we are left to
assuming one behavior or the other.

Jonny D

A few things.

I think it’d be neat if we added general controller type/labels to
controller definitions, to be used by games to decide what to call
various buttons. For example, if a game wants you to push the A button
to continue, with xbox360 labels it’d show a green A button, with
playstation/dualshock labels it’d show an X button, with SNES labels
it’d show a yellow B button. Internally, they’d all be handled as the
Xbox 360’s A button of course, it’d be a purely optional cosmetic thing.

Something like this:

…,x:b2,y:b3,labels=xbox
…,x:b2,y:b3,labels=psx
…,x:b2,y:b3,labels=snes

SDL_Something SDL_GameControllerGetLabels (SDL_GameController*);

Should probably return an enum value, but a string would work too.

Another thing, has anyone thought of how Valve’s Steam controller will
work with SDL’s controller API? It doesn’t have the traditional face
buttons in the usual constellation, so a game depending on that layout
might want to map the buttons to clicks in the corresponding areas of
the right trackpad. However, a different game might want clicks on the
right trackpad to send stick-clicks instead, with ABXY mapped
differently. I know Valve’s going to have a config utility for
controller mappings, but that will probably only work with Steam games
(automatically, anyway).

I was thinking this could be solved with SDL hints, but we could also
add some functions to SDL that let games specify what inputs they’re
interested in (“i want two sticks, stick-clicks and a button”, or “i
want a dpad and 4 buttons (ABXY)”, etc). That would provide SDL with
enough information to select an appropriate mapping if several are
available, but it’d also come in handy for other types of controllers
that don’t have all the inputs available on an Xbox 360 pad. If a game
needs an analog stick, SDL could tell it that the SNES pad mapped to
input #0 won’t do, but the pad in #1 would work.

Thoughts?

(Oh, also, can we be sure that all controllers of a particular type will
all have the same dead zone?)

-g