08-10-2022, 06:50 PM
(This post was last modified: 08-10-2022, 07:03 PM by James D Jarvis.)
(08-10-2022, 06:41 PM)SierraKen Wrote:(08-10-2022, 06:38 PM)James D Jarvis Wrote:(08-10-2022, 04:25 PM)SierraKen Wrote: James, I just tried your code. Even though it works a bit differently, I don't like how the man moves a fraction of a distance, then stops, then moves again, when you just press and hold down the arrow key, so I left it how it was.
That's interesting because I do not experience any lag at all. I'm running Windows 11, with 8 Gigs of ram with 2.4 ghz with a buetooth keyboard. Only mentioning because I have seen people mention lag with qb64 but I haven't seen any.
I'm not sure if it's lag or just the way KEYHIT works because you have to hit the key, and then it probably registered a second time to keep going. It only stopped that one time and then it kept moving. But I'm not sure why it doesn't do that on your computer. I run Windows 10 with 16 GB RAM quadcore.
I tried my little change with your newest version of the code and I can see a speed difference when using KEYHIT but not a stop and go, it is more obvious when there is a direction change. I think it may due to how the logic works using select case.
EDIT: nope, probably is the use of _keyhit. Restructured the logic in a different means and _keyhit was a bigger difference than the logic setup. Thanks... I have a program that was using keyhit I may change over after seeing this difference.