Hard Light Productions Forums

General FreeSpace => FreeSpace & FreeSpace Open Support => Topic started by: dankling on February 26, 2016, 12:01:44 pm

Title: Microsoft FFB2 Stops After Hit
Post by: dankling on February 26, 2016, 12:01:44 pm
I have a MS Force Feedback 2 Joystick and it works great in FSO minus one issue. If I take a hard hit, the joystick goes limp and the Native spring center FFB option stops. It then stays like that until I unplug the joystick and plug it back in. It seems to happen only after taking a hard hit. Otherwise it continues to work great.

I have used tools like ForceTest from http://www.fs-force.com/support.htm and the features all work great when tested but as soon force test is turned off the joystick goes limp again. It seems to me almost like the something is getting cached in the joystick's settings after a hard hit in FSO. I have had this problem with 2 FFB2 and FSO. Unfortunately I have not been able to test in other games with the same type of hits.

Has anyone else had a problem like this?



Specs
Windows 10
i7 3820
R9-390



Title: Re: Microsoft FFB2 Stops After Hit
Post by: dankling on March 06, 2016, 05:56:15 pm
Ok Everyone. I have done some research on this. T Here are a few things that directly cause this issue to appears.

1. If you die the stick goes limp as it should.
a. if you re-enter the mission the stick starts behaving like it should.
b. if you exit the stick stays limp.

2. If you do anything after the above and the stick is limp, it stays limp.

Additionally if you are in a situation when the force feedback is not working, engaging something that would cause the force feedback (afterburner) then exiting the game, it appears to come back to some minor level.

After finding this I started digging in the code and found that there many methods directly related to the force feedback. One of these methods is a release method. SO although I have not found the circumstance yet, i hypothesis, that the release method is not getting called in certain circumstances causing the stick to in whatever state it was last in.

So although I am a software developer by trade I am just touching the surface of the FSO code as well as game development, does anyone out there have any input on this? Does it sound like I am looking in the right place?

Title: Re: Microsoft FFB2 Stops After Hit
Post by: z64555 on March 06, 2016, 06:11:02 pm
Sounds like you're on the right track, the SCP hasn't been able to track down force feedback/haptic feedback related problems since most of us don't have controllers that support the feature... or lack enough time to do so.

Are you working on the master branch or on the antipodes branch?
Title: Re: Microsoft FFB2 Stops After Hit
Post by: dankling on March 11, 2016, 08:16:33 pm
I think it is the master. I am not very familiar with SVN, is there any easy way to tell within the source? I cloned the repo svn://svn.icculus.org/fs2open/trunk/fs2_open.
Title: Re: Microsoft FFB2 Stops After Hit
Post by: niffiwan on March 11, 2016, 08:32:12 pm
We're using git now instead of svn; https://github.com/scp-fs2open/fs2open.github.com, and Antipodes is a separate branch to master.

Did you compile FreespaceOpen yourself, or did you download a prebuild executable?
Title: Re: Microsoft FFB2 Stops After Hit
Post by: dankling on March 15, 2016, 08:27:35 am
Glad to see git! I will clone tonight for sure. You sent me down the rabbit hole with antipodes. I read a little bit and it looks like there may be more going on in antipodes then the master, but I wasn't able to find a basic explanation or inception post for antipodes (Admittedly I likely overlooked it ;) but not sure) . Do you have a link to a forum post describing the differences between antipodes and master?

I am currently testing on the most recent stable AVX build. I pulled the code once this issue started using SVN but will blow that away and move to the git repo.

I noticed another issue where sometimes the issue starts as soon as the executable fires, but completely based on the whether or not directional hit is enabled in the launcher. Odd thing is I don't see a switch/flag for that in the switches, so I am going to start there and work into the executable. Might help to start from what enables it and move forward. I saw the launcher in the repo, and even though I don't think the issue is there, I want to understand what is turning it on off, so I am going to clone that as well.
Title: Re: Microsoft FFB2 Stops After Hit
Post by: niffiwan on March 15, 2016, 04:23:22 pm
The Antipodes branch contains code to upgrade Linux/OSX to SDL2.0+, and migrate Windows from custom input-handling code to SDL. Reducing separate code paths and all that good stuff :)  SDL2 is supposed to have better support for force-feedback joysticks, so we generally prefer to resolve all such issues in the Antipodes branch, at least until it's merged which will be post 3.7.4.

Anyway, here's the Antipodes thread: http://www.hard-light.net/forums/index.php?topic=86206.0
Title: Re: Microsoft FFB2 Stops After Hit
Post by: dankling on April 17, 2016, 03:51:13 pm
Thanks for the advice! Haven't been able to do this yet due to work and other obligations, but intend to as soon as I get some free time.

I have been playing this game since its release and am excited to have the opportunity to make a contribution!