Hacker News new | ask | show | jobs
by refulgentis 759 days ago
I was bit confused how a formula that depends on a constant frame rate works with variable refresh rate. Then the author commented that you don't need to calculate the quantity that depends on frame rate in code. https://news.ycombinator.com/item?id=40401211

I'm really lost, but alas have ~0 experience with 3D about 15 years into a career.

Ignoring variable frame rate: 1. Doesn't the frame rate depend on the display hardware?

2. Can you know the frame rate at runtime?

Variable frame rate: 3. What quantity do you use for frame rate for variable frame rates?

1 comments

1. depends if you're in the physics main loop or not; in Godot for example the physics main loop is based on the project configuration, not correlated with the display (I could have expanded on that in the article)

2. You can know the targeted frame rate, you can also infer it by averaging the delta times at runtime (not reliable but maybe more accurate on a slow machine?)

3. In my graph, I did pick random delta between 15 and 120 fps IIRC; the point was to simulate what could roughly happen with random lag spikes