#Listening to player input on a separate thread

11 messages · Page 1 of 1 (latest)

crisp tulip
#

As some people may know, inputs are sometimes "eaten" due to lag. As far as I'm aware, inputs are taken in synchronously in the main game loop based on observation, so this means that a lower framerate correlates to way worse input lag, where one sometimes has to hold down keys for entire seconds so a click or a keypress registers in the game. (I had bad hardware that could run classic in less than 60 fps at the time.)

Now, I know this may have implications on really short misinputs but having the input events read by a separate thread (or process) can mitigate these problems if the target machine is multithreaded and cosmoteer is run with mutithreading support. (rip proton users)

#

this might be the most esoteric non modding suggestion ever

bronze igloo
#

the worst example is the inputs for pausing or slowing doen the game not working when it's badly lagging (and only when it stops lagging they go through, so its really hard to stop major lag)

hazy finch
#

Idk how difficult this'd be to fix, but considering many other games have the exact same issue I'd imagine it's not trivial. @dim gale?

dim gale
#

Pressing and releasing a key/button within a single frame should still register but will take 2 frames of latency, which one can definitely feel at low FPS. The other issue is that if you press a mouse button and then move the mouse cursor before off the button the release is registered, then the button won't get properly clicked. I could maybe force the cursor to not move until the release is fully registered, though that might have unintented side effects.

hazy finch
#

I don't think the latter is necessarily a bad thing. I'm 90% sure though that pressing and releasing a button within a single frame doesn't do anything, I've had lots of fine adjustments dropped in laggy multiplayer (maybe that's different?)

old dust
#

Forcing the cursor to not move until the click registered might not be the best if the game lags too badly. Wouldn’t it essentially have the effect of trapping the cursor in the game window? What if the user wants to move the mouse out of the game window to do something else?

I’m sorry if I’m misunderstanding what you’re saying here, I’m not really qualified to comment.

toxic monolith
#

Would also make it harder to abuse the lag to easier target multiple parts with different weapon groups

dim gale
dim gale
crisp tulip