Re: [Plib-devel] joystick jungle
Brought to you by:
sjbaker
From: Bert D. <dri...@pl...> - 2005-03-10 01:05:56
|
On Wed, 9 Mar 2005, Bram Stolk wrote: > I'm struggling with the lack of joystick/gamepad/wheel standardization. > There does not seem to be a manner by which I can get to > know more about an axis for a linux joystick. > > Maybe this kind of stuff is in directx, but I want this > kind of info on joystick axes: I doubt DirectX fares better. I have four different USB joysticks geared more or less to flight simulation, plus a pedal set, and unless the app comes with a database of joysticks there is little logic to default assignments. > - Is axis part of a 2DOF joystick? > - Is axis an accelerator pedal? > - Is axis a brake padel? > - Is axis combined brake/accel? > - If axis is up/down joystick, is up positive or negative? > - Is the axis analog? > (Strangely enough, digital pads are treated as axes, not buttons) I'm not sure how many plib apps support those hat switches; I think there is something to be said to introduce a seperate "hat" abstraction, along with axis and button. > I assume no API exists for getting this info. > And if this is the case, I think a 'joystick database' indexed > by the USB device name would be a valuable asset for many projects. > > Does anyone on this list know whether such a db exists? > And if not, I think I want to start one. I dont care if at first > it will only contain a handful of the 1000s of current gamepads. > > The alternative is probably to burden the user by configuring > his joystick which seems ugly to me. Many Windows games come with extensive databases for joystick to application matching, and I rarely use the defaults for long. I have copies of Microsoft Flight Simulator (of different vintages), I have X-Plane, I use FlightGear. Then, to make matters worse, I have MS TrainSim, Trainz and BVE, but no trainsim specific devices, so I control brake line pressure with the Cessna-styled "Mixture" control of a CH Yoke. The three flightsims and four joysticks make for twelve combinations. There is no guessing which button will extend the flaps, or reduce them, not with an identical joystick across games, and not with an identical game across joysticks. The default aileron/elevator control on a Logitech Rumblepad is usually the left joystick, which really is a bad choice for righthanded folks. Etcetera, etcetera: my list of gripes is endless. Oh, and that's without changing airplane types in the sim, e.g. going from a plane with one brake to a type that support differential braking. The practical upshot is this: the first thing I do when I get a new sim (or must re-install one) is to remove all assignments, then reassign them (the ones I need, that is). I think the hard part is not in having to assign them, but in user interface design. I can recommend anyone interested in this to look at X-Plane 8.x (http://www.x-plane.com/, available for Windows, MacOS 9 or X, and some recent Linux versions). Download the demo and try to assign joystick axes and buttons. The screen looks daunting and unfriendly, but it isn't until you justapose MSFS's screen that you'll appreciate how well X-Plane's is done. The ideal Joystick configuration GUI - knows different layouts for analogue inputs: X-Y, Y-only, X-only, slider, 270 degree knob (this needs a database) - can present all axes as simple representations of the above choices - can store profiles per app, per joystick - can default a profile to an existing one - can map all available axes to terms relevant to the app, so the user can answer the question "what does this button do?" X-Plane's weakness is in dealing with hats (represented as eight unrelated buttons). I have not yet checked how well it can deal with different joysticks (in other words, if it stores profiles per Joystick or not). And actually, FlightGears's fgjs ain't bad, except that it can be a challenge to get all button assignments right in one go, as eventually the "ANY" button will come up for assignment :-) Other good ideas can be had from Logitech's Windoze drivers (which are not my favorite drivers, but they come with good representations to visualize button and axis assignments). So if anyone has any time to burn, I would recommend improving the GUI to do assignment (possibly as an advanced plib widget, accepting a list of possible actions and preexisting assignments, and returning user assignments and/or maintaining profiles). The key functionality missing from most GUI's is the basic "what does this button do" thing. But even just a simple GUI version of fgjs that allows for going back and fixing mistakes would be an improvement. It should not be rocket science to write such a joystick profile manager to be application independent (but I'm the first to admit it will be a lot of work to get the GUI just right). Anyway, before embarking on the idea of a joystick database I'd suggest having a critical look at existing attempts to do precisely that on Windows (e.g., Logitech's profile manager, which covers dozens of joysticks and hundreds of games and can make a 2GHz machine feel like a 486/33). Cheers, -- Bert -- Bert Driehuis -- dri...@pl... -- +31-20-3116119 If the only tool you've got is an axe, every problem looks like fun! |