Author Topic: A linux question...  (Read 4282 times)

0 Members and 1 Guest are viewing this topic.

Offline eisberg

  • 24
Do Joysticks work better in Linux for this game than it does in Windows 7?

 

Offline Klaustrophobia

  • 210
  • the REAL Nuke of HLP
    • North Carolina Tigers
i have no issues with my joystick under windows 7.  what are you having problems with that needs to be better?
I like to stare at the sun.

 

Offline niffiwan

  • 211
  • Eluder Class
This is maybe a follow-up to this thread?  ;)
http://www.hard-light.net/forums/index.php?topic=84608.0

In all honesty, my comments in the other thread are just from my highly subjective memory. I last played FSO on Windows around 3.6.9, and then started playing on Linux with 3.6.12, which is a long period of time and thus my memory should be treated with a high degree of suspicion in this case!!! :p).  I haven't done a proper analysis of joystick behaviour under both Windows & Linux in order to be able to give a objective view on this.  I was more musing/wondering if switching to SDL on Windows would change joystick behaviour.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline eisberg

  • 24
i have no issues with my joystick under windows 7.  what are you having problems with that needs to be better?

Joystick play now days does not feel anywhere near the same as when Freespace 2 was new.  From my understanding when MS dropped Directinput and changed it to Xinput that changed everything for joysticks.  No matter how I change sensitivity/deadzone i am always over aiming, but I do not have have the problem with a mouse.  I did not have this problem back when Freespace was new, playing with a joystick was easy and natural, but now days it is a complete mess.  I vaguely remember someone stating that Linux does things differently.

 

Offline eisberg

  • 24
This is maybe a follow-up to this thread?  ;)
http://www.hard-light.net/forums/index.php?topic=84608.0

In all honesty, my comments in the other thread are just from my highly subjective memory. I last played FSO on Windows around 3.6.9, and then started playing on Linux with 3.6.12, which is a long period of time and thus my memory should be treated with a high degree of suspicion in this case!!! :p).  I haven't done a proper analysis of joystick behaviour under both Windows & Linux in order to be able to give a objective view on this.  I was more musing/wondering if switching to SDL on Windows would change joystick behaviour.

lol, I completely forgot about that thread.

 

Offline Fury

  • The Curmudgeon
  • 213
Hmm. I used to have MS Sidewinder Precision Pro when I played retail FS1 and FS2 back in the olden days. Ever since my SPP broke I haven't been able to find a suitable joystick to play FSO with. What made SPP special is that it was one of the few optical joysticks ever produced. Up till now I've always attributed the difference to this. But it could very well be that something else has changed since Windows XP that makes the experience different. It could be the change from DirectInput to Xinput or it could be something else.

Regardless, this will soon be moot since FSO (as niffiwan already pointed out) will soon use neither by moving to use cross-platform SDL.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
i have no issues with my joystick under windows 7.  what are you having problems with that needs to be better?

Joystick play now days does not feel anywhere near the same as when Freespace 2 was new.  From my understanding when MS dropped Directinput and changed it to Xinput that changed everything for joysticks.  No matter how I change sensitivity/deadzone i am always over aiming, but I do not have have the problem with a mouse.  I did not have this problem back when Freespace was new, playing with a joystick was easy and natural, but now days it is a complete mess.  I vaguely remember someone stating that Linux does things differently.

!!!

This explains why I hated the joystick when I tried it.  At least, I think.  When did they drop directinput?  Hmm, http://en.wikipedia.org/wiki/DirectInput  <-- did they drop it altogether, or just start using it for newer devices?

 

Offline Klaustrophobia

  • 210
  • the REAL Nuke of HLP
    • North Carolina Tigers
....hm.  i just assumed that me not being able to use my joystick as well anymore was simply me misremembering all those years ago and/or actually being worse because because it's been so long/I don't play that much now (FS was like, ALL i did with my free time back in the day).  it's interesting to know that i might have a valid excuse for sucking now :P.  except now that's also gonna make me want to whine about joysticks being ruined :(
I like to stare at the sun.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Given that we've basically thrown out the joystick code with the move to SDL and replaced it with platform independent stuff, there will be a big round of testing specifically focussing on that aspect of the game.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Klaustrophobia

  • 210
  • the REAL Nuke of HLP
    • North Carolina Tigers
i fly exclusively with a joystick.  let me know if you want my help testing.
I like to stare at the sun.

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Note that the sensitivity curve settings have also been changed from retail game.

However, for what it's worth, current sensitivity curve is much more functional than the previous one, so I don't think that's the problem here.

Could you describe how exactly is joystick behaviour different from what you remember from retail?
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline eisberg

  • 24
Note that the sensitivity curve settings have also been changed from retail game.

However, for what it's worth, current sensitivity curve is much more functional than the previous one, so I don't think that's the problem here.

Could you describe how exactly is joystick behaviour different from what you remember from retail?

mainly over steering, move my joystick just a little and it over steers.  Thought sensitivity and deadzone would fix that, but it doesnt.

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
If you keep deadzone at zero and set sensitivity to lowest possible setting, what happens then?
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline eisberg

  • 24
I'll have to reload the game again to do that.  Will have to wait till I am done with my research paper.

But all I remember is that no matter where I put the settings, joystick controls would never work like they used to back in the early days.  Either over steering would happen, or very very slow steering and there was no middle ground.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Load up Win '98 on an old machine (not sure if a virtual box would produce accurate results) and install retail FS2 on that.  Then compare.  :yes:

 

Offline Fury

  • The Curmudgeon
  • 213
Testing on Win98 would be thorough for certain, but since it has been assumed the culprit is deprecation of DirectInput API, then it should be as simple as using a wrapper to give reins back to DirectInput from whatever joystick drivers use today. DirectInput after all, hasn't changed since DX8.

As to where to find a working wrapper that does that, I dunno...

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
http://www.csh.rit.edu/~jon/projects/joystick/

Quote
Microsoft's DirectInput component is a really handy way to manage input from a variery of devices. In my case, I needed a convenient way to read input from multiple joysticks. The DirectInput system itself is fairly clean, but I didn't want to deal with the details of creating DirectInput objects on a regular basis, so I wrote this simple wrapper to hide a lot of that code from regular use.

The complete source code and Visual C++ 6.0 project are included.

A simple test application is included to demonstrate the library's functionality.

The DirectInput joystick wrapper is released under a modified BSD License.

Current Release:

DirectInput Joystick Wrapper 1.0 (October 29, 2001)



http://wiki.allegro.cc/index.php?title=Gemini's_DirectInput_Wrapper

Quote
Features

Basic Improvements
All input in GDInput is triple buffered. The first buffer is where DirectInput sends its raw data to every cycle, which is then merged in various ways with the second buffer, thus allowing for data to be processed before the programmer ever sees it. The third buffer is the polling simulator, so that data is only updated on demand, even though internally it's being processed constantly. The programmer only ever reads the data in the third buffer. Normally, the polling commands are called once every time an application loop repeats.
All I/O, including the keyboard, mouse and joysticks, copy keystroke/button presses with a binary-OR operation from the first to second buffer. This way, if a button is pressed and released extremely fast, GDInput is still able to catch it.
Keyboard Features
The keyboard has a full list of 256 pre-mapped key names, each one small enough to fit into the tight space required in some control configuration screens.
A typing system is in place which utilizes the Windows character conversion and keyboard mapping process so that character shifts are correctly interpreted. Almost every key on the keyboard, even if it doesn't convert to an ASCII value, is stuffed into a 64-character keyboard buffer, similarly to Allegro. Key repetition is handled exactly like without DirectInput, but with hardcoded timing values. (Could easily be converted to variables.)
Normally when using the keyboard in any DirectInput application, a return value of 0x80 indicates a key is held down. GDInput checks to see if a key state is 0x00 in the second buffer while 0x80 in the first. In this event, 0x08 is added to the key state, thus providing a method of checking for the first press of a key, without continuing to read presses as the key is held down.
Special Windows keys are overridden when the application is running full-screen, but key combinations like alt+tab are not.
Mouse Features
Under Allegro, the mouse roller is a cumulative axis. The more you roll the roller, the larger the value gets. Under GDInput, the roller functions like mouse mickeys, registering only the amount of roll since the last request for data from the mouse.
Joystick Features
GDInput can detect up to 16 joystick devices and can utilize all of them at once. For each joystick, up to 8 axises may be detected, 4 POV hats and 32 buttons. (This is standard for any application that is not utilizing the force feedback joystick data template provided by DirectInput.)
The joystick I/O can be paused without actually being removed.
Ranges for each axis in Allegro are either -128 to 128, or 0 to 256. Ranges in GDInput are -10,000 to 10,000, no matter what.
In rare cases when programming for DirectInput, joystick axis ranges may be read-only and thus any attempt to set the range will not function. For any axis which does not conform to the -10,000 to 10,000 range desired by GDInput, the values are manually expanded to that range.
Point-of-View (POV) hats can be read in three different ways.
By X and Y axis. The values range from -10,000 to 10,000 just like any regular axis, except diagonal values will be representative of a circle with a radius of 10,000. (Thus, pushing the hat up and right will usually be X 7071, Y -7071.)
By clockwise angle, in hundredths of a degree, with 0xFFFF (65,535) representing neutral and 0 representing north.
By button, with one button for each direction, stored in a separate array from the regular joystick buttons.
Missing Features
GDInput does not provide support for Unicode or MBCS.
There is no special key combination that will force-quit the application if running full-screen. (Ctrl+Alt+Del will still function when running windowed.)
Callback hooks cannot be installed.
Keyboard LED states cannot be manually changed.
The hardware mouse cursor is always disabled while the cursor is in the window client rectangle and cannot be switched on. (The mouse cursor must be drawn by the programmer.)
The mouse gets its movement from the screen position, even when running full-screen, so the sensitivity cannot be changed from within a GDInput using program.
If DirectInput cannot be initialized, GDInput will not function. (There is no straight API support for I/O devices.)
Windows treats the Pause/Break key differently in that, once read, it returns to an off state, even if it is still held down. GDInput does not compensate for this.

http://sourceforge.net/projects/joywrap/

Quote
A small DirectInput joystick class wrapper.

http://phstudios.com/forums/index.php?/topic/182-c-directx-directinput-wrapper/   (KB / Mouse only?? IDK)

Quote
Here is my wrapped class for DirectInput, using this class you can capture both keyboard and mouse input from the user. This is beneficial over the standard Win32 Message Procedure input capturing as the DirectInput devices are directly linked to the computers keyboard and mouse drivers.
 
NOTE: I have also provided methods to capture single key presses for use with menu systems, buttons, etc. where you only want to capture the input once per frame.
 
 
SOURCE:
 
GInput.h

<<source follows>>

https://code.google.com/p/x360ce/  (wrapper for the wrong reason? <to use old joysticks with new games?>)

Quote
XBOX 360 Controller emulator if a wrapper library that translates the XInput calls to DirectInput calls, for support non-XInput devices in new application (mostly games).

...any of that look promising?

EDIT: This too:

http://forums.pcsx2.net/Thread-XInput-Wrapper-for-DS3-and-Play-com-USB-Dual-DS2-Controller   (the wrapper looks to be separate and might be able to be made work for other devices than the DS 2/3, IDK)

Quote
Currently Supported Dongles
USB\VID_03F0&PID_231D
USB\VID_045E&PID_3500
USB\VID_0461&PID_4D75
USB\VID_046D&PID_C709
USB\VID_047D&PID_105E
USB\VID_0489&PID_E011
USB\VID_0489&PID_E042
USB\VID_0489&PID_E04E
USB\VID_04CA&PID_3006
USB\VID_050D&PID_016A
USB\VID_05AC&PID_821A
USB\VID_05AC&PID_821F
USB\VID_07D1&PID_F101
USB\VID_0930&PID_0215
USB\VID_0A12&PID_0001
USB\VID_0A5C&PID_200A
USB\VID_0A5C&PID_2101
USB\VID_0A5C&PID_2146
USB\VID_0A5C&PID_2148
USB\VID_0A5C&PID_2150
USB\VID_0A5C&PID_2153
USB\VID_0A5C&PID_217D
USB\VID_0A5C&PID_2198
USB\VID_0A5C&PID_21E1
USB\VID_0A5C&PID_21E8
USB\VID_0B05&PID_1715
USB\VID_0B05&PID_1783
USB\VID_0B05&PID_1785
USB\VID_0B05&PID_179C
USB\VID_0B05&PID_17B5
USB\VID_0B05&PID_B700
USB\VID_0C10&PID_0000
USB\VID_0CF3&PID_3002
USB\VID_0CF3&PID_3004
USB\VID_0CF3&PID_3005
USB\VID_0DB0&PID_3801
USB\VID_0DF6&PID_2200
USB\VID_0E5E&PID_6622
USB\VID_1131&PID_1001
USB\VID_1131&PID_1004
USB\VID_1286&PID_2044&MI_00
USB\VID_13D3&PID_3304
USB\VID_413C&PID_8126
USB\VID_8086&PID_0189
USB\VID_8087&PID_07DA

« Last Edit: November 20, 2013, 01:38:26 pm by jr2 »

 

Offline Fury

  • The Curmudgeon
  • 213
Getting back to this, it would be a good time to test this with the new SDL code.
http://www.hard-light.net/forums/index.php?topic=86206.0