perfect sensitivity, a question to developers / coders

23 replies [Last post]
animalchik
fala.q3's picture
Offline
Joined: Jul 2009
Posts:

well I personaly want to know how the multiplers works

we can use master multiplier "sensitivity"
and multiplers separated to axis "m_yaw; m_pitch"

while
sensitivity =1;
m_yaw =1;
m_pitch =1;
r_mode = 6;
mouse cpi ~400

crosshair jumps 6pixels !

conclusion: there must be third multiplier because if sensitivity =1 and m_yaw & pitch =1 the 1*1=1 so it should be 1cpi = 1px on the screen

if we do assume these 6px is a fully accurate calculation the third multiplier is 6, but it might not be the number pointed in reality

also if there is third multiplier the default m_yaw/pitch settings are not accurate at all

it is also possible there is no third multiplier and mouse jumps 6px because it has only 400cpi while the resolution is 1024 {*4=4096cpi} so the mouse have 10times to small cpi to be accurate in that resolution, but if then it should be 10px jump how comes it is 6px?

i want to know what calculations q3 engine makes to set my move to a perfect sensitivity where 1cpi = 1px, 2cpi = 1px, 3cpi = 1px ect ect

I am addicted to life.

lagstard
Developer (retired)
rabusmar's picture
Offline
Joined: Jan 2008
Posts:
Re: perfect sensitivity, a question to developers / coders

That's an engine topic, and kind of a complex one. What you described is only the last and highest level part of the processing. The main input detection depends on in_mouse, if 1 it will use direct input, and -1 will use win32 method. And lastly, you have to know that the movements on the mouse are not translated into screen pixels, but instead they are added/subtracted to the player view ANGLES (in degrees I think, not radians, that's the reason why the sens changes when you modify the cg_fov).

Sorry if i didn't answered what you wanted, maybe Cyrax can help you further, since he's got far more experience with engine coding.

Había una vez un barco chiquito...

!@#$%&*( terror )_
terror's picture
Offline
Joined: Feb 2007
Posts:
GB United Kingdom
Re: perfect sensitivity, a question to developers / coders

Indeed cg_fov changes sensitivity badly.

cg_fov 90 (default) and cg_fov 113 (which I'm using) feels so much different on same sens.

animalchik
fala.q3's picture
Offline
Joined: Jul 2009
Posts:
Re: perfect sensitivity, a question to developers / coders

ok so we got another important point: angles

90 degress in my situation would be 90=100% 90+22,2% 1252px x4 =5008

that would be jump by 12-13px snd still it is 6px Happy why?

btw. how accurate the angles are? i mean by what step in the angle is made? 1? 0.1? 0.001? or maybe the angle accuracy depends on the resolution in this case, and to simplyfy calculation we assume it is 90degrees, 1024 steps per 90*

btw. windows sensitivity driver sensitivity in_mouse 1 in_mouse -1 still gives 1cpi = 1px

I am addicted to life.

Cyrax
Offline
Joined: Apr 2009
Posts:
Re: perfect sensitivity, a question to developers / coders

to be short:
viewangles[YAW]  += m_yaw * mx * sentitivity
viewangles[PITCH] += m_pitch * my  * sensitivity
mx, my - integer delta's reported by input subsystem when you moving your mouse

so its viewangles which connected to on-screen "pixels" through fov, videomode etc

I am proud of spreading a pirated Excessive Plus version and claim to be the original author, yay!

rUnThEoN?!
Site administrator
Skullheadq3's picture
Offline
Joined: Dec 2005
Posts:
DE Germany
Re: perfect sensitivity, a question to developers / coders
!@#$%&*( terror )_ wrote:

Indeed cg_fov changes sensitivity badly.

cg_fov 90 (default) and cg_fov 113 (which I'm using) feels so much different on same sens.

thats simply wrong, since the cm u need for a 180 stays the same.

i always explained the fov effect to myself with guessing that the mouse system runs in a 'matrix' a virtual screen where the mouse moves and then its position is determined on actual screen on any fov.

however, as gamer, u just need to know how this stuff practically works.

hurrenson: "This idiot is apparently not familiar with a rail/sniper style."

!@#$%&*( terror )_
terror's picture
Offline
Joined: Feb 2007
Posts:
GB United Kingdom
Re: perfect sensitivity, a question to developers / coders

Well I'm too noobish to sit here and read that pro-stuff.
I always setup my mouse so I feel confortable with it, not by some cpi or other pixels.
 :D
hf

epsiplayer
THE ONE AND ONLY
intact-epsilon's picture
Offline
Joined: Dec 2006
Posts:
Re: perfect sensitivity, a question to developers / coders

i think that also
cl_yawspeed and
cl_pitchspeed are changing sensitivity too , but i dont know rly in what way

i use
sensitivity 17
cl_mouseAccel 0.01
m_pitch 0.014  or 0.013
m_yaw 0.022
cl_pitchspeed 200
cl_yawspeed 100
in_mouse 1
refresh rate 1000
g9
=> ~2.5 cm/360o


animalchik
fala.q3's picture
Offline
Joined: Jul 2009
Posts:
Re: perfect sensitivity, a question to developers / coders
Cyrax wrote:

to be short:
viewangles[YAW]  += m_yaw * mx * sentitivity
viewangles[PITCH] += m_pitch * my  * sensitivity

according to it, all thought i am not sure if i do understand that good

horizontal angle accuracy is 1024pt = 90*
vertical angle accuracy is 768pt = 90*

mouse precision is 400cpi (mx, my)

sensitivity multiples (m_pitch*mx) & (m_yaw*my) in theory if m_yaw = 1 then m_yaw = cpi of the mouse

and then if sensitivity is 1, then actually it is 400 commands per inch, i wonder then what causing the miscalculations which i did measured

(correct me if I'm wrong Cyrax)

ok so according to the theory to have less miscalculations the best going to be if we use for sensitivity method like below:

sensitivity 1
90* *4=4096pt
cpi 400 * 10 = 4000 so:

m_yaw & m_pitch 1/16=0.0625 (because 10 won't guarantee full mouse precision and the 16 is the closest number which gives good score after calculation)

we can also leave m_yaw & m_pitch at 1 and instead of them use sensitivity 1/correct number

so the mouse in this settings should have sensitivity around 40.64cm/360*

to have good sensitivity we are forced to split 1 by numbers like 2, 4, 8, 16, 32, 64 or 10, 20, 25, 30, 40, 50, 60 because they makes no miscalculations

I am right? Cyrax, Beast?

I am addicted to life.

Cyrax
Offline
Joined: Apr 2009
Posts:
Re: perfect sensitivity, a question to developers / coders

>horizontal angle accuracy is 1024pt = 90*

>vertical angle accuracy is 768pt = 90*

Pixels in center of screen covers different view angles than pixels on edges because of perspective projection/fov so you can't connect on-screen pixels shift to viewangles directly. Better think about sens that gives you better movements Happy

I am proud of spreading a pirated Excessive Plus version and claim to be the original author, yay!

animalchik
fala.q3's picture
Offline
Joined: Jul 2009
Posts:
Re: perfect sensitivity, a question to developers / coders
Cyrax wrote:

>horizontal angle accuracy is 1024pt = 90*

>vertical angle accuracy is 768pt = 90*

Pixels in center of screen covers different view angles than pixels on edges because of perspective projection/fov so you can't connect on-screen pixels shift to viewangles directly. Better think about sens that gives you better movements Happy

but the view angle steps depends on resolution? aren't they?

so there is 1024 steps in 90degres of horizontal movement, is that correct?

btw. since we can't aim at the pixels on the edges i thought i can connect pixels with view angles directly Happy

backing to the beginning, we will take a situation where game receives informations about mouse movement and how the engine understand it;

so we have a situation where 1command was send and if m_yaw is set to 1 this will cause move on the screen by 1px (tp simplify that I'll use px instead of view angle position)

and then a situation where m_yaw is set to 0.5, now we need 2commads to see the crosshair moved 1px

and then a situation where m_yaw is 0.3333 we need 3commands to see 1px crosshair move, but this calculation will be less accurate as for m_yaw 0.25

the engine counts the commands (CPI) and then moves one px (changes view angle)

is that correct?

I am addicted to life.