MaxPayne3.FusionFix icon indicating copy to clipboard operation
MaxPayne3.FusionFix copied to clipboard

[Feature Request] Disable Mouse Smoothing

Open AL2009man opened this issue 1 year ago • 8 comments
trafficstars

As per Mouse-Sensitivity.com: Max Payne 3 has a Mouse Smoothing feature integrated into the Camera system, for those who who wanna calculate the pixel values (this becomes notable when it comes to utilizing Steam Input's new Gyro settings (currently in beta); it makes a lot harder to do so.

This is unlike Grand Theft Auto IV's FusionFix where there is indeed Raw Input support...and I'll assume there isn't any Mouse Smoothing there

AL2009man avatar Jan 19 '24 03:01 AL2009man

Max Payne 3 does utilize some form of Raw Input, and it is detected by Special K as utilizing Raw Input. Rockstar commonly uses DirectInput 8 for their mouse input so it uses it's own thread that doesn't interfere with, and potentially cause stutters with other inputs.

The problem stems from the fact that whatever they did when it came to doing the mouse input is wildly inconsistent and primarily oriented around the same logic as a joystick (slower Y sensitivity than X). You can experiment with a very different feeling mouse input that still utilizes raw input by using Special K and disabling DirectInput 8 support there. The mouse feels a little bit more cohesive, but somewhat faster in speed. I'd maybe give it a shot, although I'd expect some unintended issues.

praxt7784 avatar Mar 31 '24 02:03 praxt7784

The game has no mouse smoothing as far as I can tell. What it does have is frame rate dependent mouse input which essentially acts as negative mouse acceleration when the frame rate increases. I believe what's happening to those people at Mouse-Sensitivity.com as well as praxt7784 is likely just a wildly fluctuating frame rate.

Markie98 avatar Apr 05 '24 23:04 Markie98

What it does have is frame rate dependent mouse input which essentially acts as negative mouse acceleration and is an issue as old as time, present in many PC ports from relatively good to bad ones, but mostly in older games now. I believe what's probably happening to those people at Mouse-Sensitivity.com as well as praxt7784 is just a wildly fluctuating frame rate.

Well, IV's FusionFix implementation of Raw Input fixes this. Maybe taking some code from there would work.

RecklessGlue540 avatar Apr 05 '24 23:04 RecklessGlue540

The game has no mouse smoothing as far as I can tell. What it does have is frame rate dependent mouse input which essentially acts as negative mouse acceleration when the frame rate increases.

I don't necessarily know if the mouse input itself is frame-dependent. The mouse input itself does follow the same logic that joysticks do in the aspect that:

  1. Y sensitivity is much slower than X

  2. The mouse speed consistently fluctuates depending on what action is going on in game. Try shootdodging or sprinting, for example. Mouse speed gets throttled immensely. Framerate stays the same during all of these instances.

The mouse does get called through DInput 8, and whatever processing that the engine does directly happens there. I'd assume there's some amount of mouse smoothing during that processing, but I wouldn't know 100%.

Like I said before, Disabling it directly through SK, or perhaps any other program that can do said action does gut out that processing, but the game may behave erratically. Both X and Y speeds are consistent, same with the shootdodge, sprint, and aim speed with the regular mouse movement when doing so.

As @RecklessGlue540 said, a simple backport of the feature as it is in the GTAIV FusionFix would suffice, as it effectively removes all deadzones and provides 1:1 input through the DirectInput 8 thread.

For now, if you wish for a more consistent mouse input, disable DirectInput 8 through Special K, or some other program that allows you to block MP3 from using it.

praxt7784 avatar Apr 09 '24 13:04 praxt7784

The mouse does get called through DInput 8, and whatever processing that the engine does directly happens there.

There's nothing in the game code (as far as I can tell) that affects mouse data. So whatever "undesirable stuff" happens, it's inside camera code and likely was made so deliberately.

As @RecklessGlue540 said, a simple backport of the feature as it is in the GTAIV FusionFix would suffice, as it effectively removes all deadzones and provides 1:1 input through the DirectInput 8 thread.

He says a lot of things, doesn't make it true. There's no raw input in iv's FusionFix, except menu cursor. The rest is adjustments to camera code, just under the same toggle. There's nothing to backport as those are two different games.

ThirteenAG avatar Apr 09 '24 13:04 ThirteenAG

There's nothing in the game code (as far as I can tell) that affects mouse data. So whatever "undesirable stuff" happens, it's inside camera code and likely was made so deliberately.

Thanks for the response. I'd assume it probably is done through the camera code. They most likely didn't go back and touch up anything pertaining to sensitivity, since I think the only patch they made was pertaining to disabling the forced acceleration (most likely leftover joystick code).

I think using something like DInput8Wrapper could potentially provide the same end result as disabling DirectInput 8, seeing that it uses Raw Input internally. I still have to test it, but if it works, It would probably be the best solution, seeing that hypothetically the mouse would still be called through DInput 8 without the problematic input since it's all essentially being processed the same way (if the camera code hopefully doesn't decide to mess with it).

praxt7784 avatar Apr 09 '24 13:04 praxt7784

I don't necessarily know if the mouse input itself is frame-dependent. The mouse input itself does follow the same logic that joysticks do in the aspect that:

  1. Y sensitivity is much slower than X
  2. The mouse speed consistently fluctuates depending on what action is going on in game. Try shootdodging or sprinting, for example. Mouse speed gets throttled immensely. Framerate stays the same during all of these instances.

Well I can't exactly say it's the mouse input itself thats frame rate dependent, what I mean is that it is affected by it nonetheless, should have worded it better. As for the things you've said they're true but not what I'm talking about. The game does have situations where mouse movement or part of it is slowed down relative to others but the main problem, to me at least, is that a varying frame rate messes up all of that even further and at once.

Markie98 avatar Apr 09 '24 14:04 Markie98

Well I can't exactly say it's the mouse input itself thats frame rate dependent, what I mean is that it is affected by it nonetheless, should have worded it better. As for the things you've said they're true but not what I'm talking about. The game does have situations where mouse movement or part of it is slowed down relative to others but the main problem, to me at least, is that a varying frame rate messes up all of that even further and at once.

if you were to use both Gamepad and Keyboard/Mouse inputs at the same time: it can also affect parts of Gamepad's Target Assist...even if you enable FreeAim. I've outlined it in that much detail over at https://github.com/ThirteenAG/MaxPayne3.FusionFix/issues/12

AL2009man avatar Apr 09 '24 19:04 AL2009man