Open Bug 1499353 Opened 8 years ago Updated 4 years ago

RequestAnimationFrame based Delta-time mesurment incorrent in mozilla

Categories

(Core :: Graphics, defect, P3)

62 Branch
defect

Tracking

()

Tracking Status
firefox62 --- affected
firefox63 --- affected
firefox64 --- affected

People

(Reporter: hexerdomix, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Steps to reproduce: *Navigate to https://snipg.github.io/CorrectDt/ *See shuttering, trail parts sometimes go out of sync and then go back to normal. Actual results: Should have no shuttering. Example is done with Construct 3 game engine and uses Delta-time to move ball. Dt mesurment is based on (rafTimestamp - lastRafTimestamp), as told by Construct developer in some other post. After ball reaches screen edge, distance between each part is calculated. Mozilla has it 2.5000001755 normally but very often will go out of sync and mess spawning up. Chrome as it at 2.4999(on other pc it has it incorrect also, but trail still look good) Opera has it like chrome and Edge seems to go out of sync like Mozilla. Expected results: Trail spawn with dt should be correct and look nice.
Hi Hexer, Reproduced the issue on latest FF Nightly 64.0a1 (2018-10-19), FF Beta 63.0. and latest FF Release 62.0.3. Windows 10 x64 On all the mentioned versions the trails do not look as good as seen on Chrome (even tho in Chrome it might also sometimes get out of sync) Assigning it to a component in order to involve the development team. Not sure if it is the right one, please move it to the correct one if so.
Status: UNCONFIRMED → NEW
Component: Untriaged → Graphics
Ever confirmed: true
Product: Firefox → Core
Priority: -- → P3

I am seeing similar issues and created a very simple straight JS bouncing circle:

https://github.com/dakom/plainloop-test (live demo @ https://dakom.github.io/plainloop-test/)

Watch it for about 30 secs or so and you should see the jank happen a few times.

Here's another demo which has one dependency to get a fixed timestep, roughly same problem: https://github.com/dakom/mainloop-test

On Chrome there's a bit of jank here and there, but on Firefox it's extremely often and jarring... not to be an alarmist, but this is a complete showstopper for game development. With all the effort Mozilla is putting into Rust/Webassembly these days - it would be a shame if we can't use it for game dev or high performance graphics applications that require smooth animation.

From asking people in the community to try it, seems that it's inconsistent - almost everyone sees it but it's not consistently as bad according to anecdotal reports. If you aren't seeing the really bad jank - please try on another machine/monitor/video card. It's definitely there.

@Hexer your link is 404...

Flags: needinfo?(hexerdomix)

My link: https://snipg.github.io/Tests/CorrectDt_NoWorker/
Now it's pretty clean dt, but i use different pc atm.

On old pc it used to lag, go out on sync etc. Same for chrome but only on older laptops/weaker pc.

If you think for game dev then it get's rly ugly when you try for make games playable on mobile too :) But it's getting contantly better.

Chrome still has active bugs with same issues that their devs work on. And they do it pretty fast.

Flags: needinfo?(hexerdomix)

Construct 3 team reported it to chrome again with better examples, you can test thous if you like better one then mine. They In chrome issue report Comment 4.

https://bugs.chromium.org/p/chromium/issues/detail?id=995235

(In reply to Hexer from comment #4)

My link: https://snipg.github.io/Tests/CorrectDt_NoWorker/

Nice demo! Can confirm - it looks awful on Firefox with tons of white gaps

Chrome isn't perfect but has much less...

(In reply to Hexer from comment #5)

Construct 3 team reported it to chrome again with better examples, you can test thous if you like better one then mine. They In chrome issue report Comment 4.

https://bugs.chromium.org/p/chromium/issues/detail?id=995235

Oh interesting, what actually triggered this for me does ultimately want to involve wasm, workers, and webgl (wip here: https://dakom.github.io/wasm-app-boilerplate/)

Will followup there too...

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.