Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offset under 25 has "some accel" #25

Open
serossi opened this issue Dec 24, 2022 · 8 comments
Open

offset under 25 has "some accel" #25

serossi opened this issue Dec 24, 2022 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@serossi
Copy link

serossi commented Dec 24, 2022

Im running a jumpcurve at 25.0f at 0.43f prescaler at 1600 naative dpi
if i lower the offeset from 25 to let say 20 even very slow movement becomes kind of accelerated and "slippery"
iam talking here very very low speeds that should be under 5. but seems any movement is affected if offset is lwoer than 25.

the effect seems stronge rwith a higher acceleration factor.
if i set 0.07 as acceleration is very low but still present effect.
if i set acceleration to 10.0f is higher a touch.
(normaly i have sens cap 2, accel 10, offset 25f, to have quick 90 and 180s fliks and run native for all controlled movements aka aim)

now the issue with this is that offset is calculated after prescaler and not native dpi.
that means the lower your prescaler the lower your offset must be.

but with an added murky acceleration (thats kinda unpredictable, it really isnt a stable feeling you can get used to) lowering
prescaler isnt possible at a certain point.

@serossi
Copy link
Author

serossi commented Dec 24, 2022

just tested, same thing with postscaling with the correspondent offset.
until a certain threshold tghere seems always be some sort of acceleration going on.
it feels almost like smoothing or something

@serossi
Copy link
Author

serossi commented Dec 24, 2022

i believe the error is in accel.c at 181

//TODO: Add different acceleration styles
//Apply linear acceleration on the sensitivity if applicable and limit maximum value
if(rate > 0){

i think this should be if rate >1
it seems that would fix the issue or im victgim to placebo dunno, please someone maybe confirm ?

@serossi
Copy link
Author

serossi commented Dec 25, 2022

never mind, problem still persists

@serossi
Copy link
Author

serossi commented Dec 28, 2022

found the bug ill commit a simple fix

@systemofapwne
Copy link
Owner

Let me guess: This is PR #27 ?

@systemofapwne systemofapwne added the bug Something isn't working label Feb 11, 2023
@serossi
Copy link
Author

serossi commented Feb 11, 2023

yea im no longer shure this was the fix.

as for the bug itself, it will depend on your actual speed after prescale. in this case that was somewhere at 700dpi effective.
if you go to low (even if youre well within the offset) it will do something and even very slow movement (like 5-10pixels per second) will feel accelerated in a wierd way, not nessesary by the rate you set and it seems not really be consistent at anything which makes it feel slippery.

when you run 2 profiles (one with accel and one without) and switch at runtime you can clearly feel the difference.
its may not be much but for me enough to ditch accerlation now and run leetmouse purely to have a prescaler

also the acceleration factor has a word to say about this. i wanted to run a jump curve so i ran acceleration at 10.0f
which is ofc insane. at 1.0f the described effect is a lot lower. at sane regular linear curves you might not feel a difference at all (sorry to long ago to remeber all tests i made)

i normaly run a very slow flat movement for any regurlar movement and use extreme jump for certain types of fliks in movement (90/180/360 at basically 1 frame flik), so thats why i wanted that high accell.

and while i could find some workarounds to reduce the effect it still baffles me that acceleration factor should have anything todo with offset, cus it shouldnt. we should only start to calculate after any offset and stop to calculate at limits

@serossi
Copy link
Author

serossi commented Feb 25, 2023

ok it might jsut be psychosomatic after all placebo is a thing
but i made a super hacky ugly solution to nail it down under offset.
i really dont know if thats nessesary or iam going insane, in case its nessesary here is what i did

//Calculate rate from travelled overall distance and add possible rate offsets
    rate /= ms;
    float tmpAccel = 0.0f;

    if(rate > g_Offset) {
    tmpAccel = g_Acceleration;
    }

    rate -= g_Offset;

    //TODO: Add different acceleration styles
    //Apply linear acceleration on the sensitivity if applicable and limit maximum value
    if(rate > 0){
 
        rate *= tmpAccel;
        accel_sens += rate;

        }.


so in essence i repalce g_Acceleration with tmpaccel, nailed tmp accel to 0f and only if rate is above offset i write the config value for acceleration into that var.
now even my brain believes that this is identical to 0.0f in the config :))

to be clear i could be also really easy mistaken as my obervation goes by "feeling".
and whil i defenitly feel 5ms input lag the moment you play with acceleration things become really tricky for brain.
with all the relative movement changes it could simply be a false perception. however i never had this perception on rawaccel then again reason for that could lie elsewhere

so no claim theres is really such a bug, but if there is, this code as ugly as is will solve it

@serossi
Copy link
Author

serossi commented Feb 27, 2023

one last note, i wonder if it make sense to delete
rate -=g_offset if i use above solution

here is my theory, first its no longer needed, second with bigger offsets accerlation pattern changes.
so if you modify your offset to much you need to also modify your acceleration rate because offset is always substracted
at least i think it works like this.

but at this point i wonder if it wouldnt be easier to port rawaccels code over instead of reinventing the wheel from scratch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants