QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: MrFreyer on August 12, 2020, 04:55:00 pm
-
Hi all,
is there an internal buffer for the _AXIS and the _BUTTON command?
If my game has a really low framerate and I mash a button, on the controller, repeatedly, the game runs the specific action for a few seconds, even if no further buttoninput is done... Same with the analog stick (_AXIS). Sadly this is really annoying :D
If I use the keyboard (_KEYDOWN) while the game have a low framerate, I have to press the keys for a few milliseconds, till the game detect the input, but instantly stops an action when the key isn't pressed anymore.
This is much better than the controller-problem.
Thanks for answers and help.
-
maybe is it possible that joystick and pad have the same structure of mouse management...
in that case we need a loop to clean the buffer of input like we do with mouse.
I'll investigate later....
-
Yes, there is a buffer, just like with the mouse. You want a loop like this:
That's before you read _AXIS and _BUTTON, then they'll behave kind of like _KEYDOWN.