The online racing simulator
High fps scroll wheel bug [fixed in 0.6J but there is more]
1
(27 posts, started )
High fps scroll wheel bug [fixed in 0.6J but there is more]
Hi,

moving to a new computer with a decent GPU it now hits hundreds of fps and my mouse scroll wheel is not always registered.

This is IMHO independent of specific hardware and OS. Same bug in S1 H7 as well as S2 v0.6F using any mouse or compatibility mode for WinXP in Win 8.1 64bit.
What happens is that at high fps the scroll wheel is not always registered and unless one scrolls fast multiple times it won't register any up or down scroll, making a single scroll and even multiple scroll control unusable.

This is very impractical and weird. I do use scroll wheel for controls.
This bug seems to be "hacked around" by limiting fps to undeniably low 100fps in game. I find that limit too low especially since there are 120Hz and 144Hz monitors.

Please revise LFS mouse input so it works at any fps and in modern OSes. Can't check with my WinXP since there I'm hardware limited to below 100fps but I bet it's the same issue there with a decent GPU.
Seeing your thread from yesterday I thought you are illusionist

I usually have limited FPS, so I couldn't notice this. At ~70 FPS it works in 100% cases, but at 300 FPS only like 20%.
All other controls like mouse buttons seem to work ok, at least I did not notice any button presses not being registered, but that may be only because they are pressed longer where as a scroll is a single input that is short and somehow when LFS runs fast that input gets thrown away or not read/received or something.

As far as I could notice, LFS uses the old way to get mouse input and Windows settings affect it, like Windows sensitivity settings etc.
I think with the newer way to handle mouse input in games this is not the case and you get direct input from the mouse that is not affected by Windows and Windows settings.
There is no old or new way of getting mouse/keyboard input.
In general there are about three ways you can get input: read raw key states, Direct Input and Windows messages.
Reading raw data is not recommend really for games. More popular way is Direct Input which LFS already use for joysticks/wheels. For keyboard/mouse input Microsoft recommend using Windows Messages as there is no benefit from using Direct Input. As far as I know LFS use Windows Messages to read mouse/keyboard input. Try SendMessage() on LFS

Windows Messages have a quite simple principle, each time there is a event (KEYUP, KEYDOWN, ...) it will notify LFS. As you said other keys are pressed a bit longer so there is no problem with them, however mouse scroll is not like other keys. It has one single message which will signal whether it was scroll up or down. This work independently of OS, FPS, ...

Looks like bug is more inside of LFS. For example if you are running 300 FPS, that means each second there is a 300 game loop passes, however UI and physics things are updated only at 100Hz. That means that part which handles UI will not be executed in each game loop, but it looks like its reading Windows Messages on each game loop and as a result of that some of Messages are dropped. I guess
I called it the old and new way because older games used the older way that is via Windows like LFS does. Newer games tend to not use it and switched to raw I think or have some other abstraction layer on top of raw. I guess they can still use Windows messages but use a different type of message (WM_INPUT) that gives more precision than WM_MOUSEMOVE that is affected by Windows setting.

Although as you said this is more of an issue in LFS than what is used to acquire the events.

Yeah I get it how the scroll wheel message can get lost or ignored, I only hope the developers will get it as well that it should be updated
Seriously, please update the mouse input so that scroll wheel works at any speed of the game and that mouse sensitivity can be adjusted IN GAME.
Basic stuff for any game.
Quote from JackCY :Seriously, please update the mouse input so that scroll wheel works at any speed of the game and that mouse sensitivity can be adjusted IN GAME.
Basic stuff for any game.

The simulation updates on 50 something Hz (don't know exactly), and not limiting the FPS to a specific ammount that doesn't clash with the simulation update timespan will make this happen, not only in LFS but in every other simulator and not only mouse inputs will have problem, but there will be a delay with analogue input. Nothing to do with LFS, keep fiddling around with your FPS until you hit the sweet spot. Also, using VSync in any simulation is asking for trouble, so there is no reason to point out 120Hz+ monitors, and you also didn't claim you had one, so why not just got with 100FPS anyway? The game won't have stutters.
Still present in 0.6G.
Still present to 0.6H !!

I'm using mouse wheel up/down to change gears.

The only way i can have 99% success rate in switching gears, is by limiting FPS in-game through options (NOT vsync).
Around 80 to 90fps i managed to get the best results.
Only a few gear changes missed.

Scroll wheel has no issue, tested with different mice.

When i miss a gear up in a sequential gearbox driven car, it only cuts throttle but doesn't complete the upshift!
I have to scroll up once more, or even twice. FFS

This is happening since early 2014.
** Best answer **
Sorry that this has taken so long to fix. It must have been frustrating. Frown

I have now looked into this and fixed it in my version. I hope to release another test patch this week with some more performance improvements.
I have the exact same symptoms as MorfeasFX, but... if I limit my fps bellow 60 (optimal for my hardware 50 or 30) changing gears with mouse wheel becomes unusable.

EDIT: Actually fiddled with 'Gearshift debounce' setting and raising it seems fixed it.
Which LFS aversion are you using? This was fixed in 0.6J.
There's really no free time for me to give some feedback right now but as soon as this topic stays alive i'll get a reminder to post in a couple of weeks.


Thanks in advance if the issue is resolved.
BUMP ... I still have the same issue.

I use mouse wheel for up/downshifts.
When I'm tryping to upshift in a sequential gearbox car it's a hit or miss but chances are that ignition cut works, but doesnt slip into next gear.

LFS 0.6V
Alright, I'm attaching a link of a recording I've done to show what's the deal.

I only have issues on UPshifting...
Ignition cut works as intented, but doesnt slip into next gear.
If only i swipe my mouse wheel hell of a lot, It might upshift one or two gears but that's not how it's meant to be done for winning a race...
If i let of the throttle a bit, it's a hit or miss.
If i let of the throttle and clutch in, then again it's a hit or miss.

This only happen in sequential gearbox cars.
Here's the video.



I messed up with V-sync, frame limit, sleep every frame, gearshift debounce timing etc...
Downshifts work brilliant (mouse wheel up or even down!)


Had that issue a loooooooong time ago, but now it's happening again.

Any help?
Bump .... I cannot change gear on a sequential gearbox type!!!

I have to rotate the wheel a few more "clicks" in rapid succesion.
Sometimes 2 "clicks" do the job, some i get a double upshift.

If i unload the transmission throttling back, i can slide the next gear with a single mouse wheel "click" rotation.

Version 0.7A

(See above video...)
Bump!!
Are you using a manual or auto clutch?
Quote from rane_nbg :Are you using a manual or auto clutch?

I use manual clutch.
Tried auto clutch, same issue.

Keyboard mapping for up/downshift works fine!!
No other tools or mouse specific programms running/installed on my PC.
Ok, what is your button debounce value? In windows mouse settings there is an option to set how many lines one notch in mouse scroll wheel will do, by default it's 3, you can try 1 there.
Quote from rane_nbg :Ok, what is your button debounce value? In windows mouse settings there is an option to set how many lines one notch in mouse scroll wheel will do, by default it's 3, you can try 1 there.

Already changed those parameters (scroll wheel lines number) and gearshift debounce (ms).
The second one, only works if you cycle the mouse wheel fast enough, faster than the threshold.

I'm saying again: IGNITION CUT = FINE. Cuts EVERY SINGLE TIME! None missed! That means the mouse wheel input is registered correctly! The whole process stops when about to slide into next gear.

I cant explain more than the video shows.
It's like having a quickshifter on a bike, which works every single time, cutting ignition, but gear change is "stuck" for some reason.

Im posting the video once again:

what is your button debounce value?
Quote from rane_nbg :what is your button debounce value?

I have it set at 50msec.

Tried every increment from 10 to 200. No change!
Sorry man, I got nothing. It may really be an LFS bug indeed Smile
Quote from rane_nbg :Sorry man, I got nothing. It may really be an LFS bug indeed Smile

No worries mate. I'm glad for your time into this! Thumbs up
1

High fps scroll wheel bug [fixed in 0.6J but there is more]
(27 posts, started )
FGED GREDG RDFGDR GSFDG