Joystick sensitivity toggle

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Joystick sensitivity toggle

Post by Cody »

This will take some getting used to (and plenty of testing), but I'm favouring a setting of 0.4 at the moment.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Joystick sensitivity toggle

Post by Cody »

Anyone else been testing this? Any other comments? I see the default setting is 1, btw... yes?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Joystick sensitivity toggle

Post by cim »

Cody wrote:
I see the default setting is 1, btw... yes?
For now, yes.
Mad Hollander
Dangerous
Dangerous
Posts: 84
Joined: Wed Nov 14, 2012 11:57 am

Re: Joystick sensitivity toggle

Post by Mad Hollander »

cim wrote:
Cody wrote:
I see the default setting is 1, btw... yes?
For now, yes.

I use 1

I find strange to have accuracy depending on max_pitch value - the bigger pitch means lower accuracy. However, it should be exactly opposite.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Joystick sensitivity toggle

Post by Smivs »

Mad Hollander wrote:
I find strange to have accuracy depending on max_pitch value - the bigger pitch means lower accuracy. However, it should be exactly opposite.
I would expect more sensitivity in the centre zone, for those very fine twiddly sort of manoeuvres for what it's worth. I've not been testing this - been drawn back to the Dark Side :roll: - but it sounds very interesting and I'm looking forward to trying it.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Joystick sensitivity toggle

Post by Cody »

Smivs wrote:
... been drawn back to the Dark Side...
<chortles> Have a cookie!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Joystick sensitivity toggle

Post by Diziet Sma »

I've been using it on 1 as well. However, since Cody likes a lower setting, I vote for being able to set values via a slider or similar.
Smivs wrote:
I would expect more sensitivity in the centre zone, for those very fine twiddly sort of manoeuvres for what it's worth.
That's exactly what it does.. the further you deflect the stick from the neutral position, the less non-linearity is applied. It allows for very fine control, even set on '1'.. it's possible to apply very gentle pressure and have the crosshairs drift across the target so slowly that it takes a couple of seconds to be sure your ship is even turning at all.
Mad Hollander wrote:
I find strange to have accuracy depending on max_pitch value - the bigger pitch means lower accuracy. However, it should be exactly opposite.
The pitch value refers to the pitch rate of change.. so of course that translates to lower accuracy.. it's a measure of how quickly the ship's pitch can change, not of the accuracy factor. The lower the pitch rate-of-change, the better the accuracy.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
kanthoney
Commodore
Commodore
Posts: 281
Joined: Thu Nov 07, 2013 10:21 pm

Re: Joystick sensitivity toggle

Post by kanthoney »

Just to let everyone know, I'm working on a configurator screen for this, with more tweakable parameters, and allowing for different settings for each axis.

If things go *really* well, you could end up with an option for a spline-based profile, where you set lots of control points like the ones earlier in the thread. That might be a tad ambitious though. Wish me luck!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Joystick sensitivity toggle

Post by Diziet Sma »

Wishing you LOADS of luck.. especially with that spline-based profile thingy! If you can manage it, that would be très cool.. :D
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
kanthoney
Commodore
Commodore
Posts: 281
Joined: Thu Nov 07, 2013 10:21 pm

Re: Joystick sensitivity toggle

Post by kanthoney »

Preview!

Here's the main joystick screen, with additions for deadzone setting and an option for editing joystick profiles:

https://drive.google.com/file/d/0B5m1zB ... sp=sharing

Deadzone setting is obvious. Select the Edit Profiles option and you get this screen:

https://drive.google.com/file/d/0B5m1zB ... sp=sharing

And here's the spline type profile option, with control points set by click and drag:

https://drive.google.com/file/d/0B5m1zB ... sp=sharing

I've a few minor glitches to sort out, then it's onto a session of flight testing to make sure there are no hideous crashes (either of the program kind or the spaceship kind). Then I'll submit a pull request.

One of these glitches has me a bit puzzled, so I'd like to pick the brains of the main developers if I may. I've got a set of control points for the spline (each an NSPoint wrapped in an NSValue) stored in an NSArray, which I want to save in user defaults. However, my version of GNUstep seems to have a real problem saving NSValues in user defaults - even an innocent, do-nothing line like

[defaults setObject: [NSValue valueWithPoint:NSMakePoint(0.0,0.0)] forKey: @"Test"];

causes segfaults and exceptions and things. Is this a known problem? Or am I doing something noob? I'm running Linux (Slackware, but it's the same on my Debian laptop).
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Joystick sensitivity toggle

Post by Cody »

Looking good - well done.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Joystick sensitivity toggle

Post by Diziet Sma »

Kudos! Those are looking really good! :D 8)

The only request I have, is that you make the deadzone configurable for each axis separately, please.. some give more trouble than others.

(perhaps incorporate them with the axis profiles, rather than on the main page, if that makes it simpler)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Joystick sensitivity toggle

Post by Diziet Sma »

Looking at those screenshots yet again, (can't help myself.. it's like a dream come true! :lol: ) I've just had a thought.. (and yes, in today's 41°C+ heat here in Australia, it hurt! :P)

Once implemented, this joystick profiler could do away with the need for precision-mode for joysticks.. which would be cool.. it would free up a button on my stick for other uses..

Thoughts and opinions?
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Joystick sensitivity toggle

Post by cim »

kanthoney wrote:
Preview!
Wow! That's very impressive. Looking forward to seeing it.
However, my version of GNUstep seems to have a real problem saving NSValues in user defaults - even an innocent, do-nothing line like

[defaults setObject: [NSValue valueWithPoint:NSMakePoint(0.0,0.0)] forKey: @"Test"];
The problem is that NSValue is an opaque type - like the C void* though slightly safer - so its contents can't be reliably translated into the defaults, which can only store a few scalar types, arrays and dictionaries. Probably easiest would be to use a two-value array or an x/y dictionary for storage.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Joystick sensitivity toggle

Post by Diziet Sma »

cim wrote:
Wow! That's very impressive. Looking forward to seeing it.
Hehe.. you'll have to buy a 'stick now, just so you can play with the profiler! :lol:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply