-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lag seems to cause key release events to be missed #4664
Comments
Run in release mode instead. Rust debug builds are notoriously slow and bevy suffers these issues too. As for when making your own games, the tips in here: https://bevy-cheatbook.github.io/pitfalls/performance.html will likely be useful. |
I did also try it in release mode, and performance was fine, and no key events were dropped. That doesn't solve the problem: Some amount of lag is often inevitable no matter how well a game is optimized, and dropping key events during those times seems bad and unnecessary. |
related comment about input being dropped. Is running a faster polling loop really a sensible solution to this issue?/bug? #1343 (comment) |
Related problem, seems to be an issue whenever key repeat rate is faster than fps: #5909 |
Consolidating with #5984. |
…in one frame (#9446) # Objective - Currently, (AFAIC, accidentally) after registering an event for a Gilrs button event, we ignore all subsequent events for the same button in the same frame, because we don't update our filter. This is rare, but I noticed it while adding gamepad support to a terminal app rendering at 15fps. - Related to #4664, but does not quite fix it. ## Solution - Move the edit to the `Axis<GamepadButton>` resource to when we read the events from Gilrs.
Bevy version
Operating system & version
Debian Linux, Wheezy
What you did
Ran a debug build of
alien_cake_addict
on my ancient gtx 980 (760?). Tried to play.What happened
The framerate was low (maybe around 20fps). The keys tended to get stuck, in a sense, I would run in one direction for a bit, I would release the key, I'd press other directions, but the alien would not stop running in that direction, could not be turned. It would eventually stop pushing in that direction, seemingly at random, usually after the nearest cake had been tragically missed.
Oddly, the game also seemed to be harder with the lag (as if there were was less time to get each cake)
I can't think of a reason this amount of lag should cause this, but it seems to, and that makes me worry that sometimes it might miss key state changes at a normal framerate too, or during a lag spike.
Additional Information
Sometimes when my entire system is lagging, key repeats will occur. I wouldn't expect this to be the same issue though.
The text was updated successfully, but these errors were encountered: