mastercomfig / tf2-patches

Team Fortress 2, but with a lot of fixes, QoL improvements and performance optimizations!
Other
218 stars 27 forks source link

Demoknight charge turn rate scales with frames per second. #104

Open SolarLightTF2 opened 4 years ago

SolarLightTF2 commented 4 years ago

Describe the bug Demoknight charge turn rate scales with frames per second. Issue present both in TF2 and in TC2. There was an attempted fix to this issue on April 1 2014, but this merely reduced the effects rather than fully fixing the issue.

This is especially noticeable if you use the Wee Booties and attempt to charge with any shield that is not the Tide Turner. The difference can clearly be seen when doing a worst case scenario test of 49 FPS, compared to a best case scenario of uncapped FPS.

Assuming no Claidheamh Mor is used, 500 FPS allows you to charge in a complete 180, whilst 49 FPS cannot.

The obvious problem is that those who have weaker computers will not be able to charge-turn as effectively as those who have stronger computers. Due to the way charging is used for gaining speed and trimping, this affects more than just the ability to round corners. Those who cannot chargeturn as effectively will be limited in terms of how much potential speed they can gain while mid-air, which can affect the overall distance of some charges. Therefore, I see it as a pretty substantial issue.

Since Demoknight is not exactly overpowered, the ideal solution would be to allow everyone to chargeturn as if they have 500 FPS, regardless of their actual FPS.

There is also a rumor told by Odin (best Demoknight player known) that disabling Raw Input very slightly increases turn rate. I have not done enough testing to confirm whether or not this is true, but given the skill level of the player saying this, I personally believe it and it may be worth having a look.

divinitycove commented 4 years ago

Disabling raw input means you end up with mouse acceleration, where the faster you move your mouse, the further your cursor moves. https://www.pcgamingwiki.com/wiki/Glossary:Mouse_acceleration Disabling raw input (and therefore enabling mouse acceleration) would only increase the turning rate due to the mouse "turning more" when moved faster.

It's not a secret setting that could be tapped into to make Demoknight turn consistently, it's just the game reading your mouse as turning more than it would normally, a bandaid instead of a solution. Would also highly recommend against playing any sort of FPS with mouse acceleration, especially TF2, as it makes your aim completely inconsistent.

micwoj92 commented 4 years ago

@spikehunter That is not true. You can have raw input and mouse acceleration disabled at the same time. I stopped reading your comment after you said that "Disabling raw input means you end up with mouse acceleration"

micwoj92 commented 4 years ago

Here is a tutorial that might help you @spikehunter https://www.tomshardware.com/news/how-to-disable-mouse-acceleration-windows,36886.html

After these steps you can have raw input and mouse acceleration disabled. Feel free to test and report.

SolarLightTF2 commented 4 years ago

Can confirm that raw input does not introduce mouse acceleration. I've had "enhance pointer precision" (A.K.A. mouse acceleration) turned off for years, with the windows "pointer speed" set to the same as what raw input would be.

The only remaining difference here is probably a tiny amount of latency or something. But the prospect of increased turn rate is more appealing to me than slightly better latency.

Yttrium-tYcLief commented 4 years ago

If I recall correctly the main difference is just how the mouse is polled; without raw input, the mouse is polled in software by Windows, and passed along to the client, as opposed to being polled directly from hardware. This can cause inconsistencies (especially with lower framerates) but should never introduce mouse accel as long as enhance pointer precision is disabled, and your mouse itself doesn't have pre-baked accel.

hoffor commented 4 years ago

EDIT: disproven+explained a couple replies down

This effect is also present for regular air strafes on any class, and is present in Quake. Hopefully both could be fixed in tandem. Only thing I'd ask with this is that the turning rate not be constrained so low that air strafing becomes too laborious... 60fps strafes are like steering a boat, and 300fps strafes are like a fish turning in water. Even 150fps strafing is a bit low to me, but ofc it shouldn't be so high people are doing 360's after a simple spacebar press

wgetJane commented 4 years ago

@SolarLightTF2 results from my own testing (on latest version of tf2 on linux) charging from a starting position of 0 0 with a starting angle of 0 then moving my mouse rightwards until the charge ends mouse sens is 3.2 with raw input enabled loadout is grenade launcher, chargin targe, bottle

300 fps ending position: 1047.792358 -42.464325

30 fps ending position: 1064.333862 -174.486343

300 fps, m_filter 1 ending position: 1022.751953 -175.131073

30 fps, m_filter 1 ending position: 794.265503 -592.747986

my results show that lower fps gives more turning control, which is strange to me because it's the opposite of your results

wgetJane commented 4 years ago

This effect is also present for regular air strafes on any class, and is present in Quake. Hopefully both could be fixed in tandem. Only thing I'd ask with this is that the turning rate not be constrained so low that air strafing becomes too laborious... 60fps strafes are like steering a boat, and 300fps strafes are like a fish turning in water. Even 150fps strafing is a bit low to me, but ofc it shouldn't be so high people are doing 360's after a simple spacebar press

@hoffersrc i can't seem to replicate this, how did you test this? i can't find a difference in airstrafing control between 300 fps and 30 fps

SolarLightTF2 commented 4 years ago

my results show that lower fps gives more turning control, which is strange to me because it's the opposite of your results

@wgetJane It may act slightly differently with the Boots. I'd suggest giving it some tests with the Boots. That's interesting to know that it seems to scale in the opposite way when using anything besides the Boots.

hoffor commented 4 years ago

@hoffersrc i can't seem to replicate this, how did you test this? i can't find a difference in airstrafing control between 300 fps and 30 fps

@wgetJane i got the same results, sorry for the false claim. tested valve tf2 with both fps lowered by fps_max and fps lowered naturally in a busy server on high settings

i'm convinced at this point that what i was noticing was actually the massive input delay i get when lots of stuff is being rendered. the delay affects my coordination when trying to do semi-precise strafes (eg. gardening, wall jumps, juking hitscan, attempting a sharp turn while moving quickly in mid air to avoid falling off a cliff)

when air strafing you need to move your mouse fast enough to get the most angle out of the strafe, but not so fast that you overshoot and cancel out your velocity. with the frame delay, i inherently turn slower because i'm either off the mark with my turning accuracy (not gaining enough angle if i undershoot; losing speed/losing track of the angle if i overshoot), or in an attempt to stay in control i instead decide to turn in short bursts and wait for the visual feedback, which reduces my overall time strafing

a supposed effect on turn speed by framerate is not actually present in quake 1 either. i think an additional phenomenon I was mistaking for it there was that in that engine, the more frames generated while performing an air strafe, the more movement speed you will gain from the strafe ('bhopping' = air strafe to gain speed, hop to reduce friction time and sustain that speed). it seems like the player always turns at the same rate (degrees per time interval) regardless of their movement speed. you can make a 180 degree turn in 1 second both at regular movement speed and at a fast rocket jump's speed.

in quake faster bhops result in farther distances per strafe (not larger angle), which coupled with that engine's insane turning rate vs tf2 made me believe framerate caps were directly affecting the strafe speed (plus some misinformation online that aligned with my observations)

as a side note, in tf2 air strafing does seem to grant you slightly more air time. you're more likely to cross a gap if you air strafe. i don't think this affects movement speed or turn rate though

wgetJane commented 4 years ago

@SolarLightTF2 here are my test results with the booties on (lower fps still gives more turn control): 300 fps ending position: 875.393921 -591.539551 30 fps ending position: 595.985107 -768.310486

some notes: - i'm using mat_powersavingmode to change my fps cap - turn control behaviour is probably different on windows (which is where i assume you performed your tests)

Margen67 commented 3 years ago

Found an interesting convar: https://github.com/mastercomfig/team-comtress-2/blob/213be2ea75a491fc44aae03b96e3d142730ca38d/game/shared/tf/tf_player_shared.cpp#L101