Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Joysticks

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
hiran
Theorethicist
Posts: 2200
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Joysticks

Post by hiran »

Cholmondely wrote: Sun Dec 11, 2022 10:40 pm
So. I too love buttons.

I've an AppleMac, and needless to say, hardly anything in the world of HOTAS works on it! The problems with Oolite seem to me to be more about AppleMac/Linux platforms than Oolite itself (eg the moment programming capabilities are added by the better HOTAS's, the AppleMac starts having a major attack of indigestion). Most of these HOTAS's seem not to last. Thrustmaster TM4 went wonky after several months. CH is supposed to last forever, but has no hall sensors and might be a tad too large for one's hands. Lots of buttons, though.
...
I can second that. Love buttons, too. They are so much more haptic and accessible than the keyboard - despite a 102 keys joystick would not be useful at all.

What bothers me even more is that they just do not last. When Flight Simulator came up with Force Feedback capabilities I jumped to the M$ Sidewinder FF joystick, and it was just awesome flying with that additional sense of airstream on the wings. Without looking at instruments I was able to feel the stress on the airplane and I loved it.

But now, hardly any force feedback joysticks are sold. Not even to talk about the API. It seems a total mystery how force feedback joysticks can be programmed by other applications, rendering my super cool joystick to a normal 3 axis gadget that just looks clumsy and requires lots of electricity.
The same limitation would not allow games like Oolite to ever take advantage of such hardware features.

My next joystick - if any - will be a simple HOTAS. But I am not flying these days.
Last edited by hiran on Wed Jan 04, 2023 2:12 pm, edited 2 times in total.
Sunshine - Moonlight - Good Times - Oolite
limbo
Competent
Competent
Posts: 38
Joined: Mon Feb 08, 2016 11:13 am

Re: Joysticks

Post by limbo »

dybal wrote: Tue Jan 03, 2023 4:30 pm
limbo wrote: Sun Jan 01, 2023 8:49 am
i found this...
https://m.youtube.com/watch?v=uXqHUsm0cho
which.. in a fit of pique, i purchased. it is in transit and i shall review it (should) when it arrives. i got the last one on etsy but i am sure Corehawke will do another run.
I bought that, it works well... in fact, the throttle slides back a little bit from the max position on its own weight...
cool. in fact i am having a few issues with delivery. it is a relief to see that the vendor is on the up and up
arquebus
---- E L I T E ----
---- E L I T E ----
Posts: 518
Joined: Sun Oct 31, 2021 6:07 am
Contact:

Re: Joysticks

Post by arquebus »

I am still unable to use the throttle of my X-56 HOTAS - Oolite simply doesn't recognize it no matter what I do. I've also tried using an Xbox controller, but while the game does recognize it, the game is also oversensitive about the inputs and just has me constantly spinning in space. That's even after jacking up the deadzone etc.

What I've settled on, to preserve my sanity, is using just the stick of my X-56 (pitch, roll, yaw; speed control on the POV hat; injectors on the top blue button; weapons on the index and pinkie triggers). For all other functions that I can't fit on the X-56 or would forget which button is which, I use Touch Portal. I've set up an Oolite button layout on Touch Portal, connecting from my iPad, which lets me assign hotkeys to buttons I make. (I also use it to start and stop my recordings in OBS.)

I cannot recommend Touch Portal enough. (There are other app/server combos out there like the Glass whatsit app, can't quite remember the name; they all generally work the same.) Here's a screenshot of my layout:

https://www.dropbox.com/s/ssmj3kcf01e2e ... e.png?dl=0
Here is my YouTube channel, where I play poorly: Arquebus X
User avatar
Cholmondely
Archivist
Archivist
Posts: 5128
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Joysticks

Post by Cholmondely »

drumz wrote: Tue Jan 23, 2007 4:41 am
Okay, I think the joystick/yaw code is good to go. I redid most of PlayerEntity (Controls).m, as I implemented the yaw too much like throttle. Now the yaw stuff is in the throttle section, but is implemented very similar to pitch/roll. The reason I did this is because it's a non-essential joystick control -- like throttle -- but it should behave the same as pitch/roll. Here are all the diffs once again:

Code: Select all

*** JoystickHandler.h.old       2007-01-22 11:27:09.000000000 -0600
--- JoystickHandler.h.new       2007-01-22 00:55:40.000000000 -0600
***************
*** 27,32 ****
--- 27,33 ----
  enum {
    AXIS_ROLL,
    AXIS_PITCH,
+   AXIS_YAW,
    AXIS_PRECISION,
    AXIS_THRUST,
    AXIS_VIEW,
***************
*** 37,42 ****
--- 38,45 ----
  enum {
    BUTTON_INCTHRUST,
    BUTTON_DECTHRUST,
+   BUTTON_INCYAW,
+   BUTTON_DECYAW,
    BUTTON_SCANNERZOOM,
    BUTTON_JETTISON,
    BUTTON_COMPASSMODE,
***************
*** 127,132 ****
--- 130,138 ----
  // Roll/pitch axis
  - (NSPoint) getRollPitchAxis;

+ // Yaw axis
+ - (double) getYawAxis;
+
  // Setting button and axis functions
  - (void) setFunctionForAxis: (int)axis
                     function: (int)function
These diffs are against oolite-linux rev 773.

I'm not sure how to test the non-GNUstep code. I just know the code works both with and without my joystick plugged in. Using a combination of keyboard and joystick at the same time behaves the same for yaw and pitch.

EDIT: Whoops, when I redid the code I forgot to add in joystick button control for yaw. Should support for that really be added in? I'm thinking most multi-button sticks will be multi-axis as well.
Drumz, I notice that you last visited in 2020.

If you see this, just curious - what joystick do you currently use - and did you need to tweak the Oolite code to support it?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
hiran
Theorethicist
Posts: 2200
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Joysticks

Post by hiran »

hiran wrote: Tue Jan 03, 2023 5:32 pm
But now, hardly any force feedback joysticks are sold. Not even to talk about the API. It seems a total mystery how force feedback joysticks can be programmed by other applications, rendering my super cool joystick to a normal 3 axis gadget that just looks clumsy and requires lots of electricity.
The same limitation would not allow games like Oolite to ever take advantage of such hardware features.

My next joystick - if any - will be a simple HOTAS. But I am not flying these days.
Gee, I was able to make the Microsoft Sidewinder Force Feedback 2 joystick work in Linux.
It was related to using a different device node, creating the correct privileges to access it and then run the right tools. But the kernel supports it out of the box.

So now that I know it is a 'standard force feedback' joystick in Linux, there would just be the question whether Oolite would ever come back to Linux and whether some force feedback features would get built in.
Some little rumble would be useful when touching other objects or getting hit by rockets. Or friction/inertia when the ship is damaged so even flying straight is not easy any more.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
Archivist
Posts: 5128
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Joysticks

Post by Cholmondely »

hiran wrote: Tue Jan 24, 2023 8:24 pm
hiran wrote: Tue Jan 03, 2023 5:32 pm
But now, hardly any force feedback joysticks are sold. Not even to talk about the API. It seems a total mystery how force feedback joysticks can be programmed by other applications, rendering my super cool joystick to a normal 3 axis gadget that just looks clumsy and requires lots of electricity.
The same limitation would not allow games like Oolite to ever take advantage of such hardware features.

My next joystick - if any - will be a simple HOTAS. But I am not flying these days.
Gee, I was able to make the Microsoft Sidewinder Force Feedback 2 joystick work in Linux.
It was related to using a different device node, creating the correct privileges to access it and then run the right tools. But the kernel supports it out of the box.

So now that I know it is a 'standard force feedback' joystick in Linux, there would just be the question whether Oolite would ever come back to Linux and whether some force feedback features would get built in.
Some little rumble would be useful when touching other objects or getting hit by rockets. Or friction/inertia when the ship is damaged so even flying straight is not easy any more.
Hiran, I might well have it wrong, but I thought that that sort of thing was handled by BGS? It requires Library.oxp to be loaded as well - and then, when docked, you just scroll down to "Config for AddOns" under the AddOns heading on the F4 screen. I'm presuming that that is what "jitter" is supposed to be.

Config for AddOns > BGS > Values > Jitter

If you have any issues, try searching for "jitter" in the BGS thread - there are one or two posts with recommended settings.

And let us know how you get on!

Ummm... reading through the posts, it looks like something entirely different. Sorry!

Values page for BGS (D is the default setting, R is the range)
Image
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6571
Joined: Wed Feb 28, 2007 7:54 am

Re: Joysticks

Post by another_commander »

hiran wrote: Tue Jan 24, 2023 8:24 pm
So now that I know it is a 'standard force feedback' joystick in Linux, there would just be the question whether Oolite would ever come back to Linux and whether some force feedback features would get built in.
Some little rumble would be useful when touching other objects or getting hit by rockets. Or friction/inertia when the ship is damaged so even flying straight is not easy any more.
I believe the SDL bundled with the current trunk does support force feedback controls (I know it does for Windows, kind of unsure about Linux) and a long time ago we had tested a proof of concept with Getafix that had worked pretty well both on Windows and Linux. Not sure how that didn't make it into master, I guess it was time constraints for both of us back then. Anyway, the backend support should be there, it should be mostly a matter of adding the force feedback interface on the side of Oolite.
User avatar
hiran
Theorethicist
Posts: 2200
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Joysticks

Post by hiran »

Cholmondely wrote: Tue Jan 24, 2023 8:50 pm
hiran wrote: Tue Jan 24, 2023 8:24 pm
So now that I know it is a 'standard force feedback' joystick in Linux, there would just be the question whether Oolite would ever come back to Linux and whether some force feedback features would get built in.
Some little rumble would be useful when touching other objects or getting hit by rockets. Or friction/inertia when the ship is damaged so even flying straight is not easy any more.
Hiran, I might well have it wrong, but I thought that that sort of thing was handled by BGS? It requires Library.oxp to be loaded as well - and then, when docked, you just scroll down to "Config for AddOns" under the AddOns heading on the F4 screen. I'm presuming that that is what "jitter" is supposed to be.

Config for AddOns > BGS > Values > Jitter
My first reaction was that you must have it wrong. How could an OXP control a force feedback joystick?
But then I checked the pages you referred to, and indeed they mention joystick jitter. Unfortunately there is no further documentation about that it means.

So I downloaded the OXZ and checked the scripts inside. As much as I understand, the jitter is played as sound depending on the joystick throttle position or the ship's speed. Probably this shall make the engine sound more roary. But it seems not connected to force feedback.

Well, I'm not an expert on OXZ, so I may have got it wrong. But it was definitely a good catch! :-)
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2200
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Joysticks

Post by hiran »

another_commander wrote: Wed Jan 25, 2023 6:26 am
hiran wrote: Tue Jan 24, 2023 8:24 pm
So now that I know it is a 'standard force feedback' joystick in Linux, there would just be the question whether Oolite would ever come back to Linux and whether some force feedback features would get built in.
Some little rumble would be useful when touching other objects or getting hit by rockets. Or friction/inertia when the ship is damaged so even flying straight is not easy any more.
I believe the SDL bundled with the current trunk does support force feedback controls (I know it does for Windows, kind of unsure about Linux) and a long time ago we had tested a proof of concept with Getafix that had worked pretty well both on Windows and Linux. Not sure how that didn't make it into master, I guess it was time constraints for both of us back then. Anyway, the backend support should be there, it should be mostly a matter of adding the force feedback interface on the side of Oolite.
So there was some effort spent on it at some time. Interesting.
Will it ever emerge again? I'll wait and see.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2200
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Joysticks

Post by hiran »

another_commander wrote: Wed Jan 25, 2023 6:26 am
hiran wrote: Tue Jan 24, 2023 8:24 pm
So now that I know it is a 'standard force feedback' joystick in Linux, there would just be the question whether Oolite would ever come back to Linux and whether some force feedback features would get built in.
Some little rumble would be useful when touching other objects or getting hit by rockets. Or friction/inertia when the ship is damaged so even flying straight is not easy any more.
I believe the SDL bundled with the current trunk does support force feedback controls (I know it does for Windows, kind of unsure about Linux) and a long time ago we had tested a proof of concept with Getafix that had worked pretty well both on Windows and Linux. Not sure how that didn't make it into master, I guess it was time constraints for both of us back then. Anyway, the backend support should be there, it should be mostly a matter of adding the force feedback interface on the side of Oolite.
So there was some effort spent on it at some time. Interesting.
Will it ever emerge again? I'll wait and see.
Sunshine - Moonlight - Good Times - Oolite
User avatar
hiran
Theorethicist
Posts: 2200
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Joysticks

Post by hiran »

another_commander wrote: Wed Jan 25, 2023 6:26 am
I believe the SDL bundled with the current trunk does support force feedback controls (I know it does for Windows, kind of unsure about Linux) and a long time ago we had tested a proof of concept with Getafix that had worked pretty well both on Windows and Linux. Not sure how that didn't make it into master, I guess it was time constraints for both of us back then. Anyway, the backend support should be there, it should be mostly a matter of adding the force feedback interface on the side of Oolite.
So there was some effort spent on it at some time. Interesting.
Will it ever emerge again? I'll wait and see.
Sunshine - Moonlight - Good Times - Oolite
User avatar
Cholmondely
Archivist
Archivist
Posts: 5128
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Joysticks

Post by Cholmondely »

limbo wrote: Sun Jan 01, 2023 8:49 am
i went with the Thrustmaster T16000 and TWCS throttle...
dybal wrote: Tue Jan 03, 2023 4:30 pm
I bought that, it works well... in fact, the throttle slides back a little bit from the max position on its own weight...
Any chance of some key-bindings for the Thrustmaster (to add in to the Joysticks: Guide to Setting Up wiki page)? Or for any of the other joysticks/controllers for that matter...
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
limbo
Competent
Competent
Posts: 38
Joined: Mon Feb 08, 2016 11:13 am

Re: Joysticks

Post by limbo »

Cholmondely wrote: Wed Feb 01, 2023 10:42 pm
limbo wrote: Sun Jan 01, 2023 8:49 am
i went with the Thrustmaster T16000 and TWCS throttle...
dybal wrote: Tue Jan 03, 2023 4:30 pm
I bought that, it works well... in fact, the throttle slides back a little bit from the max position on its own weight...
Any chance of some key-bindings for the Thrustmaster (to add in to the Joysticks: Guide to Setting Up wiki page)? Or for any of the other joysticks/controllers for that matter...
mate, been a bit crook the last week or so... Dr. pescribed an antibiotic i am alergic to... not good. have been sleeping 20hrs a day.

will sort this as soon as i am able.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5128
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Joysticks

Post by Cholmondely »

limbo wrote: Wed Feb 08, 2023 10:30 am

mate, been a bit crook the last week or so... Dr. prescribed an antibiotic i am allergic to... not good. have been sleeping 20hrs a day.
Gosh! Wishing you a healthy recovery.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
RockDoctor
---- E L I T E ----
---- E L I T E ----
Posts: 792
Joined: Sat May 01, 2010 9:05 pm
Location: Scotland

Re: Joysticks - uncontrollable roll with no joystick

Post by RockDoctor »

I sent a PM to @phkb (@pkhb ?) a short while ago because for various reasons I'd recently discovered that, while my laptop doesn't have a joystick, my laptop does have a joystick. Or, to be more precise, my (linux) kernel thinks my laptop has a joystick.
Hardwarily, my laptop has a pair of accelerometers in the main body (not the screen) which seem to be intended to detect freefall and park the HDD heads before the machine hits the ground. I vaguely remember them being a "thing" a while ago - but with the rise of SSDs, maybe they're less relevant now.
Whatever.

I just re-installed OS (then Oolite) onto a laptop with these two accelerometers. Jameson takes off from Lave. Jameson notices the "circle-dot" image in his HUD, and thinks "can Oolite detect these accelerometers sensibly?"
- Jameson rolls laptop chassis like a steering wheel ; Cobra nose pitches up-down.
- Jameson pitches laptop chassis like putting a cushion under it, on my knees ; Cobra nose rolls.
- No effect of yawing the laptop.
So, 2 accelerometers, not 3. Signal is in a usable range. That might be interesting.

Then I notice, my Cobra has now got a permanent roll, with a pitch far slower than the roll. Which kind of makes it a bit hard to steer. (It's also familiar. I was scuba once in zero visibility and ascending, when I got high-pressure air trapped in one ear. Same sensation of rolling and pitching backwards, even when I was clinging to the cliff wall I could barely see. That is a very unpleasant experience. Fortunately I managed to surface by climbing the cliff, blind. But that was my diving over for the day.)

I infer that these accelerometers are rather electrically "sticky", and not intended for actual use as a joystick. But it might also explain why my Cobra's steering has never been too accurate since I moved to this laptop, and noticed the "circle-dot" indicator in my HUD.

Is there a way to tell Oolite to "ignore all joystick inputs"?

I've grabbed a couple of save-games, but don't see anything in them about joysticks. (but why d Trumbles have a lot of "rotation" parameters? ). Re-start the game, and repeat the experiment, and I get similar, but not exactly the same effects. Which goes with my "low accuracy sensor" hypothesis above.

Yawn. Time for this Jameson to park his Cobra where the Sun bloody better not ever shine.
--
Shooting aliens for fun and ... well, more fun.
"Speaking as an outsider, what do you think of the human race?" (John Cooper Clark - "I married a Space Alien")
Post Reply