Skip to content
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

Breakout Example is stuttering #2349

Open
nonunknown opened this issue Jun 15, 2021 · 9 comments
Open

Breakout Example is stuttering #2349

nonunknown opened this issue Jun 15, 2021 · 9 comments
Labels
C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples

Comments

@nonunknown
Copy link

nonunknown commented Jun 15, 2021

Bevy version

0.5

Operating system & version

Manjaro Gnome

What you did

Copied this example: https://github.com/bevyengine/bevy/blob/main/examples/game/breakout.rs

What you expected to happen

Game to run smoothly and without bugs

What actually happened

The red square is jittering, this sometimes causes collision detection to bug, and it gets out of screen.

Additional information

https://imgur.com/j52I6Kz

@nonunknown nonunknown added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jun 15, 2021
@alice-i-cecile
Copy link
Member

Can you reproduce this with #2094?

@mockersf
Copy link
Member

By "jittering", do you mean when the square is stuck between the paddle and the wall on the right? This should have been fixed by #685 but can still happen depending on your frame rate...

@nonunknown
Copy link
Author

@alice-i-cecile I'll try

@mockersf nope, its the movement in general. Even if the FPS is low, for example 40, the square should not be jittering, because games doesnt work this way, the fixed timestep is one solution for this, but seems its not working?

@nonunknown
Copy link
Author

nonunknown commented Jun 16, 2021

@alice-i-cecile I tested here, and got the same result!

also I ran: cargo run --release

The game ran worse than the debug version, with way more jittery!

@alice-i-cecile alice-i-cecile added the C-Examples An addition or correction to our examples label Jun 16, 2021
@cart
Copy link
Member

cart commented Jun 16, 2021

I think theres a bug in #2094 that would make it stutter more. It moves the paddle without scaling it according to delta time, so framerate directly affects how fast it moves.

@alice-i-cecile
Copy link
Member

@nonunknown I've updated #2094; is this resolved for you? I didn't notice any stuttering, but that may just be poor perception. A GIF (plus frame time information) may be useful for reproduction if this still persists.

@nonunknown
Copy link
Author

tested it:

https://imgur.com/aQRCCez

You can compare the movement with the mouse movement, you can see how jittery it is.

@cart
Copy link
Member

cart commented Jun 17, 2021

Yup thats pretty nasty. I'm also getting it to a lesser degree. I'll see what I can do. This behavior definitely isn't acceptable.

@l0b0
Copy link

l0b0 commented Sep 5, 2021

Seeing the same on NixOS 21.05, rustup 1.24.2, rustc 1.54.0, Linux kernel 5.10.60, AMD Radeon RX 5500 graphics card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples
Projects
None yet
Development

No branches or pull requests

5 participants