Author Topic: Request: Smoother Joystick Input  (Read 4504 times)

0 Members and 1 Guest are viewing this topic.

Offline Unknown Target

  • Get off my lawn!
  • 212
  • Push.Pull?
Request: Smoother Joystick Input
Hey all, I've heard that the controllers are getting a rework so sorry if this is a duplicate, but are there any plans to smooth out the joystick inputs? Right now flying in FS2 is just...not that much fun compared to games like Elite or even Star Citizen. The joystick has no input lag or smoothing applied so it's really difficult to make precise movements. It would be nice if the rate was smoothed out so instead of herking and jerking around it was more fluid. Is this already being worked on?

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Request: Smoother Joystick Input
I think you'll get that, they are switching IIRC from MS directinput to SDL (right guys?), and MS DirectInput changed with.. Win XP? 7? and anyways it messed up the input somehow, I forget the story, but I'm sure someone here knows and will chime in.

Anyways, switching to SDL, so that won't be a problem. Correct me if I'm wrong.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Request: Smoother Joystick Input
Nightly builds have been using SDL2 for input-handling on all platforms for months.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Unknown Target

  • Get off my lawn!
  • 212
  • Push.Pull?
Re: Request: Smoother Joystick Input
I'll try one of them out and report back on my feedback. I've only been using the latest FSOpen release.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Request: Smoother Joystick Input
On a related note, there was an experiment with different joystick curves done a while back, that might help with what you're experiencing.  I'd have to find it though.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Request: Smoother Joystick Input

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Request: Smoother Joystick Input
Herking and jerking around? What?  :confused:

Each craft in FSO has their own handling, more "massive" craft turn slower and also have a slower turn rate acceleration, only the lightweight ships like the Perseus would have handling similar to what you're describing.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Request: Smoother Joystick Input
Herking and jerking around? What?  :confused:

Each craft in FSO has their own handling, more "massive" craft turn slower and also have a slower turn rate acceleration, only the lightweight ships like the Perseus would have handling similar to what you're describing.

I know what he's talking about.  It's the inability of the joystick to smoothly transition.  You're either not moving or barely moving, and then your turning full force.  This makes it impossible to hit the broad side of a barn.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Request: Smoother Joystick Input
That is the exact opposite of how the deadzone code is supposed to work; it should rescale the joystick input so that the edge of the deadzone is 0 (of course, I don't know if that code in particular changed as a result of the move to SDL2). Can anyone confirm whether or not that's been a problem since the SDL Everywhere merge?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Request: Smoother Joystick Input
The SDL code didn't modify the deadzone and scaling routine, joy_get_scaled_reading, all it did was move it into controlsconfig.cpp.

More likely what is happening is that folks are not used to the deadzone hystersis that FSO uses, which AdmiralRalwood described.

The result being that you have some amount of deflection in the joystick where the input does nothing, and then you have a significantly less amount of deflection on the stick coupled with a sharper gain. In other words, the larger the deadzone, the more sensitive the stick is outside of the deadzone.

Another thing that could be happening is that the response curve is ridiculously nonlinear:

Code: [Select]
// compute percentages as a range between 0 and 1
sensitivity_percent = (float) Joy_sensitivity / 9.0f;
non_sensitivity_percent = (float) (9 - Joy_sensitivity) / 9.0f;

// find percent of max axis is at
percent = (float) d / (float) rng;

// work sensitivity on axis value
percent = (percent * sensitivity_percent + percent * percent * percent * percent * percent * non_sensitivity_percent);

A sensitivity setting of 9 means you're getting the linear response, and a setting of 0 means you're getting an x^5 curve.

The joystick response curve code gives you much more control over what the curve looks like, which is a strong reason to get it published soonish.
« Last Edit: February 04, 2017, 12:04:07 am by z64555 »
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 
Re: Request: Smoother Joystick Input
The joystick has no input lag

Why would anyone want input lag? Is there a positive to having everything happen with a delay?
When comparing Freespace to things like E:D it's important to remember that Freespace is also a much faster game. ED ships are just way more sluggish and they're bigger targets, they're just naturally easier to hit, it has nothing to do with joystick curves.

There's no way to make turning both slower and more linear aside from picking a slower turning ship. I guess with a custom curve you could maybe set it up so that you have a linear and slow response line up to around 80% and then make it climb exponentially and reach full turning by 100% but that wouldn't feel very smooth.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline Novachen

  • 29
  • The one and only capella supernova
    • Twitter
Re: Request: Smoother Joystick Input
Actually i do not think, that you should compare games like Freespace with Elite or Star Citizen that use both somekind of a WWII-style flight model.

In my opinion Freespace, and other games from that time, has more in common with a First-person Shooter instead of a flight simulator. The main difference is, that you have a much slower turning rate, and much more keys you can use, than in the general FPS-game.

The slower turning rate is the main reason, why you actually can play this games with a joystick without any disadvantages against mouse-players. I have never problems to fly precise maneuvers in the first place with the right sensitivity settings in the game.
Female FreeSpace 2 pilot since 1999.
Former Global moderator in the German FreeSpace Galaxy Forum.
Developer of NTP - A Multi-Language Translation Library Interface, which allows to play FreeSpace in YOUR Language.

Is one of my releases broken or not working? Please send a PM here, on Discord at @novachen or on Twitter @NovachenFS2, a public tweet or write a reply in my own release threads here on HLP, because these are the only threads i am still participating in.

 
Re: Request: Smoother Joystick Input
I really wouldn't compare Freespace to an FPS. Very few ships can strafe and the environments are wide open with almost no cover. And especially when you consider that 90s FPSs were all about circlestrafing and instagibbing.

In terms of gameplay Freespace is very similar to Tie Fighter, which is a rather serious sim trying to simulate very non-serious spaceship behaviour from a fictional movie. That's why ships have limited maximum speeds and very low inertia. Star Wars ships acted like spaceplanes so Tie fighter and after it Freespace have spaceplanes.

The reason you can(or could, I guess, FSO multi is dead)  compete with mouse users is because their turnrate is limited and doing some manoeuvres is much harder with a mouse. A mouse player will almost always have better accuracy than someone playing with a joystick. But the joystick player has more options in a knifefight.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Request: Smoother Joystick Input
FreeSpace differs from other games from that time regarding mouse-joystick interaction, in that the mouse still respects the dynamics of the craft and thus has the same turn rate and turn acceleration constraints as the joystick has.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 
Re: Request: Smoother Joystick Input
Theoretically, yes. But realistically you're going to have to lift your mouse when you turn which means you can't have smooth turning at the maximum possible turnrate  at all times.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Request: Smoother Joystick Input
Theoretically, yes. But realistically you're going to have to lift your mouse when you turn which means you can't have smooth turning at the maximum possible turnrate  at all times.

Not being able to continuously turn smoothly is nowhere near a game breaker as is being able to snap to your target instantly. That's why the acceleration limit is on the mouse control.
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline Unknown Target

  • Get off my lawn!
  • 212
  • Push.Pull?
Re: Request: Smoother Joystick Input
The FreeSpace flight model is based on the old Descent 6DOF shooters - that's why the speeds are low and the turning is so fast. It's about pivoting to an axis as quickly as possible.

Now, Freespace ships do have inertia, so when the dampening value is ramped up (like in BtRL IIRC), you can take advantage of that inertia to get your crosshairs on target - a slight understeer, but it never worked so well because Freespace's underlying system is not based on smooth input. My understanding of the system stops here, but I know it doesn't "feel" quite right - like I don't have accuracy when turning small amounts. Maybe the input ramps too much, or not enough?

 

Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Request: Smoother Joystick Input
FreeSpace differs from other games from that time regarding mouse-joystick interaction, in that the mouse still respects the dynamics of the craft and thus has the same turn rate and turn acceleration constraints as the joystick has.

I'd like to add that the mouse also has a different sensitivity curve than what the joystick is subject to, the curve is pure linear. Also, the mouse is vulnerable to FPS spikes because its delta calculations use the frame time. (See playercontrol.cpp:536). Players with high framerates have a more sensitive mouse than those with lower framerates.

I'm not entirely sure why that is, perhaps it was something leftover when they were doing the first versions of time compression. I could make a test build with the framerate factors removed and have it available for testing.


[EDIT] Major correction! I did a quick test of this and can safely assert that you actually have _less_ sensitive controls for faster framerates. Also, this mechanism is most certainly intended to be used with time compression, the factor is there so that you can maintain a reasonably sane control rate during time compression.
« Last Edit: February 17, 2017, 10:38:06 pm by z64555 »
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Request: Smoother Joystick Input
I can see a few better ways of achieving that. For example, basing sensitivity on time compression level. I have a HOTAS, but I guess many people rely on mouse these days, so consistent behavior of it would be welcome.

Also, is player-controlled time compression useful for anything other than breaking stuff and skipping through poorly designed missions? I never found that feature to be of much use. Slowing down time can come in handy, but has to be handled via SEXPs.

  

Offline Unknown Target

  • Get off my lawn!
  • 212
  • Push.Pull?
Re: Request: Smoother Joystick Input
If we're talking about mouse control it'd be nice to have something more like Freelancer or even Star Citizen. The way the drag-to-turn is implemented it's a lot easier to play (and doesn't require me to pick up my mouse and move it across the desk). Not sure if that's a monstrously huge project or not though.