-
-
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
Input Lag with a simple game, even with --release #760
Comments
The same program has far less lag on Windows 10 - but still not zero. |
I think that issue says Wayland is better than Xorg. Xorg is default on 18.04, and it's what I'm running. I'd only heard of one issue with Xorg in 18.04 (Xorg v3.32), and it was that it was one frame laggier than Ubuntu 17's Wayland. I probably do have that 16 extra ms of output lag, but I don't think that can fully explain what I'm experiencing. It's a bit hard to measure, but from long experience I'm guessing at least 250ms of lag between the time I press the arrow key and the time the cube starts moving. 16ms is barely detectible to a sharp human observer, but the amount of lag I'm getting would be obvious to anyone. Just for fun I will try this program with a few different display servers and see if I can notice a difference. |
Perhaps the lag would be easier to see by drawing a rectangle on the screen only while the button is pressed. |
Does that work?
My LinkedIn contacts and profile have been wiped out
On Sat, Nov 7, 2020 at 4:29 PM Kinrany ***@***.***> wrote:
Perhaps the lag would be easier to see by drawing a rectangle on the
screen only while the button is pressed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#760 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHGK5THX7UEGQCHOPMN43BDSOUVQXANCNFSM4TGHICDQ>
.
--
Raza Amir
|
I think it feels laggy for me, too, though I'm not sure. I made a version where it follows the mouse cursor. It's easier to see the lag because you can see the mouse cursor moving relative to the rectangle. https://github.com/sapir/laggame I'm on Ubuntu 20.04 without wayland. |
I tried laggame adapted for the latest Bevy. I added an |
I think this happens less with current master. |
I just had the time to test this on master. The lag is now almost completely gone, even in debug mode. There is maybe one frame lag, but I can barely notice the cursor moving relative to the center of the box. |
I see lagging mouse input on mac up to 500ms on button example on master. When I move the cursor fast over the button it never changes state to hover. When I spawn a simple cube on mouse click I have to wait up to 500ms to see it. |
I'm also having very noticeable mouse input lag on bevy 0.4 on macOS only, mainly with Edit: forgot to mention it's not just with |
I left a comment about the current state of this here: #2871 (comment) |
I tried both "laggames". Here on macOS keyboard input seems okay (no lag noticeable), but mouse lag is definitely an issue. Deactivating Vsync doesn't help. This mouse input problem on macOS might also be related to this winit issue. |
Also having massive lagg issues on Arch Linux(5.15.7-arch1-1) with Wayland/Mutter/GNOME 41.2 |
(The lagg is so strong that sometimes the collision from the breakout example is ignored and the ball flies out to space) |
Bevy version
0.2.1
Operating system & version
Ubuntu 18.04
What you did
Working through a very simple bevy tutorial, I noticed significant input lag (with and without rapier).
I boiled an RTC down and uploaded it here: https://github.com/masonk/laggame
Clone that and
cargo run --release
This "game" just drives a cube around the screen when you press the arrow keys. Both starting and stopping the cube feels laggy, at least a few hundred ms of input lag, maybe up to 500ms.
I wouldn't be surprised to learn that I'm doing something wrong, but whatever that might be isn't obvious to me.
What you expected to happen
I would expect not to feel any input lag in a game this simple.
Additional information:
It shouldn't matter but I'm on monster of a machine, 16 cores, 2080Ti, etc.
Toolchain is recent:
The text was updated successfully, but these errors were encountered: