LTCHIPS / rottexpr

A Rise Of The Triad Source Port with additional gameplay options and more...
GNU General Public License v2.0
97 stars 26 forks source link

Higher mouse sensitivity? #25

Open elvisish opened 4 years ago

elvisish commented 4 years ago

I need a super high mouse sensitivity to play, usually with DosBox I increase the mouse sensitivity in the DosBox config file, could the sensitivity be raised a lot so I can move the mouse slightly and the player turns really fast?

LTCHIPS commented 4 years ago

Currently if you want to go any higher in mouse sensitivity you'll have to set the DPI of your mouse higher (if you have a mouse that allows that).

Something that you could try is opening the rott config (should be called config.rot) and find where the mouse sensitivity field is, and setting it something higher than 11.

If you're feeling adventurous, you could pull the source code and find this function under rt_menu.c and change the 2nd parameter (the 11) in the SliderMenu call. I would do it myself, but my PC that I used to code on died a few days ago.

void MouseSensitivity
(
    void
)

{
    SliderMenu( &mouseadjustment, 11, 0, 21, 81, 240, 1, "block1", NULL,
                "Mouse Sensitivity", "Slow", "Fast" );
}

Anyways, let me know how that config edit idea works for ya. As soon as I get another machine and my build environment up and running again I'll look into improving the mouse sensitivity options.

MasterO2 commented 4 years ago

If you're feeling adventurous, you could pull the source code and find this function under rt_menu.c and change the 2nd parameter (the 11) in the SliderMenu call. I would do it myself, but my PC that I used to code on died a few days ago.

How unfortunate, @LTCHIPS. Hopefully you'll get back up and running soon on a new system.

elvisish commented 4 years ago

Thanks, I'll give that a try, need to see if I can get it compiled (never have much luck!) :D

LTCHIPS commented 4 years ago

Alright, we're back up and running. I opened a new branch called MouseSensitivityFix. Turns out, there's an array that has the actual sensitivity scalars that ROTT will use to scale mouse movement. All you're adjusting at the code snippet that I referred to earlier was the index of the array of sensitivity scalars. Weird.

I've changed the code so that the value that mouseadjustment carries is the scalar used to...scale mouse movement. I've also increased the max scalar in the options to 30 (stupid fast as the slider menu now calls it).

I didn't test it when I was playing with the new implementation, but I think setting mouse sensitivity through the config file should work now. The way it was previously implemented didn't allow for this approach to work at all (in fact, it kinda did the opposite).

Let me know if the new max sensitivity is good enough.

elvisish commented 4 years ago

Sorry to be a total pain, but do you have a binary of MouseSensitivityFix? If not, I can try and compile it myself, but I haven't actually got anything set-up right now to try this :D

LTCHIPS commented 4 years ago

Sure, there should be exes for the commerical version of the game and the shareware version.

https://drive.google.com/drive/folders/1ZWcLgRjhokZdMKQUAgTB0YDLTuGGTv59?usp=sharing

elvisish commented 4 years ago

Thanks so much! I just tried it on Stupid Fast, and while it is a little better, I usually have mine set at probably twice or 3x as much as Stupid Fast; I wonder if you have a much higher DPI gaming mouse than I do? Mine is a fairly regular Logitech mouse and on almost every game I've played if I put mouse sensitivity at max it's fine (in the case of something like GzDoom it can go far and beyond the speed I'd need). Could the sensitivity go even higher? Really appreciate the work you've done!

MasterO2 commented 4 years ago

Thanks so much! I just tried it on Stupid Fast, and while it is a little better, I usually have mine set at probably twice or 3x as much as Stupid Fast; I wonder if you have a much higher DPI gaming mouse than I do? Mine is a fairly regular Logitech mouse and on almost every game I've played if I put mouse sensitivity at max it's fine (in the case of something like GzDoom it can go far and beyond the speed I'd need). Could the sensitivity go even higher? Really appreciate the work you've done!

@elvisish There needs to be a mouse sensitivity setting called "Ludicrous Speed" now. (Joking)

elvisish commented 4 years ago

That isn’t a bad idea at all! 😄 I've actually set it at 240 and that seems to feel quite good, except for ROTT's kinda inherent weird lag/threshold feeling that's always there :D

LTCHIPS commented 4 years ago

@MasterO2 How the heck did I miss the opportunity to make that the max option? That's going in the next commit for the branch.

@elvisish Yeah, I had a higher DPI setting set on my mouse when I was testing it (should've been testing at 800 or 400, not 1600!). Whoops! I've committed changes to the MouseSensitivityFix branch and have updated the builds in that google drive link posted previously. Basically, the new max is double what you said works for you.

MasterO2 commented 4 years ago

@LTCHIPS Mel Brooks would be proud!

Calinou commented 2 years ago

This was addressed by https://github.com/LTCHIPS/rottexpr/commit/6701f55b7f5aa498ff449500a768ae00675615e1 and can be closed now.