Hi all. I posted this question on the AnswerHub but it went completely unadverted, which makes me fear this has no easy solution + nobody else cares about it.
I’m developing a fighting game and having some trouble with consistency of input speed at different framerates. Since I don’t care about analog readings, I started configuring the D-Pad and left thumbstick to pressed and released action events, then write to a dpad state variable and buffer them as fast as I can. At 60fps+, I spun the thumbstick as fast as I could and I got everything buffered just right, but as I capped the framerate lower and lower, I started losing inputs/getting wrong data since the pressed/released events fired in the wrong order and messed with my D-Pad state variable.
So what I did next was to setup the directional input to axis again and set a looping timer every 15ms or so, to periodically check the axis values with:
which worked better, but still is less responsive at low FPS. As I noticed that the timer was not firing as it should when the frametime goes below the timer’s period, I moved the axis readings to a loop on a separate thread and the problem persisted, which indicates that the engine’s input refreshing is apparently tied to framerate.
Since this is a fighting game, I need the input polling rate to be consistent, since locking the framerate is not an option nowadays. Is there something we can do to sort this out?
Thanks in advance.