mrk-its / bevy_webgl2

WebGL2 renderer plugin for Bevy game engine
MIT License
172 stars 46 forks source link

Breakout example: ball disappeared from the game. #17

Closed ubill closed 3 years ago

ubill commented 3 years ago

I modified the source code of the breakout example to match the original code in bevyengine/examples that is, put the bottom wall back so that the ball is confined always.

I leave the browser tab unattended for a quite long amount of time. After a while, all the bricks are cleared by the bouncing ball.

The issue is: At some indeterminate time, the bouncing ball just disappeared from the game. (The paddle is still there and controllable as normal) I have not with my own eyes seen the point of time of disappearance, so I cannot say how long it takes to happen.

Using Windows 10, latest rust, master branch of bevyengine, master branch of this repo Using nightly rust.

I tried to reproduce the issue on a Windows10 breakout build, but I was not able to completely do so because minimizing the window crashes the program (known issue at bevyengine). I did not also try to reproduce the issue by just overlapping the window.

Reporting this issue as it may be a commonly-seen problem, e.g. scenario of people playing long-running games in the browser, expecting everything to work and be there coming back after a break.

JohnPeel commented 3 years ago

Just wondering, what browser are you using?

ubill commented 3 years ago

I was using Brave browser.

ubill commented 3 years ago

It may reproduce here, I just noticed that there is a hosted page of the breakout app here: https://mrk.sed.pl/bevy-showcase/#breakout

To reproduce one could leave the tab open in various browsers and see if it reproduces.

Nilirad commented 3 years ago

If I recall correctly, the ball can escape even in the native version.

tigregalis commented 3 years ago

If I recall correctly, the ball can escape even in the native version.

Yeah that's correct. I suspect it happens more often at lower frame rates. I've done some research and testing and raised an issue here: https://github.com/bevyengine/bevy/issues/1240

mrk-its commented 3 years ago

Closing as original example is broken too (we sync examples periodically while porting bevy_webgl2 to latest version of bevy, so this example should also be eventually fixed)