World.step is buggy when attempting to account for variable framerate
See original GitHub issueWhen passing a timeSinceLastCalled
value to the world.step
method, the simulation performance quickly degrades beyond usability.
Spectrum chat: World step does not adapt to framerate
Per Schteppe (schteppe#371):
Perhaps the number of substeps are maxed out? This could happen if you, for example, pass in deltaTime in milliseconds instead of seconds… or if you accidentally calculate the value wrong for the first frame (there is no “previous” time value). or if the first deltaTime values are too large (they usually are larger during the first frames while the JIT is warming up). What happens if you pass in 1000 substeps instead of 10? If you have implemented it correctly, changing the number of substeps should do nothing.
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
World.step() doesn't make sense · Issue #371 - GitHub
The frame-rate doesn't drop, everything just starts moving in slow-motion, ... World.step is buggy when attempting to account for variable ...
Read more >Fixed time step or variable time step? Delta time or no? - Reddit
I'm making a game in C++ with SDL and currently my game has a very simple fixed time step implementation that's locked in...
Read more >Rotobrush:Frame rate mismatch - Adobe Support Community
It's kinda buggy but it works. Go up to composition and click composition settings. Change the frame rate to whatever the error told...
Read more >How do games handle the issues of variable frame rate game ...
Problem arises when you try to scale the variables in proportion to real frame rate (such as gravity and vx) so that time...
Read more >Frame Rate Independence - Real-Time Physics Simulation ...
I'm having some trouble achiving frame rate independence from my physics simulation: I've tried both: Code: Select all // Variable time step ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yes it seems so, although it also brings questionable features ( “timeSinceLastCalled = -1 instead of 0” )
I am not sure this address the cube freezing midair effect, I am looking into that.
~This looks good and is working well now except for the freezing cubes (no framerate degradation in my testing). We should wait to merge until that issue is resolved.~
I agree with Marco regarding API changes, we should strive to make as few API changes as possible, and maintain backwards compatibility where we can.
@Platane Great work on this so far, I think supporting variable framerate would be a huge feature.
EDIT: I spoke too soon regarding framerate performance