Jump to content
  • Advertisement
Sign in to follow this  
Sharlock93

Frame skips and Object jumps problem.

This topic is 699 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I ran in to this problem when my frame rate was too high using a fixed time step with no interpolation - long story short you can end up having two updates in a single frame and this happens over and over causing the jitter - I believe its referenced in the above article mentioned. Don't have time to look over your code at this second but

 

A quick fix is to turn on vsync by calling glfwSwapInterval(1) - you might give it a shot. The other f.lux thing might be turning vsync on and off - I'm not sure though

Yeah, the article mentions that, so I should probably interpolate between the frames too.

Share this post


Link to post
Share on other sites
Advertisement

Quick fix is enable V-sync.

 

Long fix is separate rendering logic from physic logic and run rendering logic in real-time and physic in simulated time.

There's no point in rendering twice if you get jitter but you do need to "catch up" with your physics.

 

If your rendering loop runs faster than your physic loop then you do simple interpolation between physics key-frames.

Edited by Shannon Barber

Share this post


Link to post
Share on other sites

 

[...]If nothing else is happening then moving a fixed amount each frame should be very smooth, even if slightly variable. If it's not, it sounds like something is periodically interrupting your PC, such as a bad wireless driver or similar.

I have a program called f.lux that is used for night time and changes the color of your screen, after disabling that, the examples of glfw ran smoothly, which is very very weird.

 


This is exactly what I meant by 'it sounds like something is periodically interrupting your PC, such as a bad wireless driver or similar.' :)

F.lux has to make calls to the graphics drivers to change the colour temperature of the screen, and that seems to involve quite a slow low-level process that interrupts absolutely everything. I had this exact problem with audio software, and getting periodic dropouts from the audio when f.lux was changing to night mode. They allude to potential problems with mouse stuttering or computer slowdowns on the f.lux FAQ, but there is no real solution. (They suggest updating video drivers, but that doesn't work in the general case.)

Share this post


Link to post
Share on other sites

 

 

[...]If nothing else is happening then moving a fixed amount each frame should be very smooth, even if slightly variable. If it's not, it sounds like something is periodically interrupting your PC, such as a bad wireless driver or similar.

I have a program called f.lux that is used for night time and changes the color of your screen, after disabling that, the examples of glfw ran smoothly, which is very very weird.

 


This is exactly what I meant by 'it sounds like something is periodically interrupting your PC, such as a bad wireless driver or similar.' :)

F.lux has to make calls to the graphics drivers to change the colour temperature of the screen, and that seems to involve quite a slow low-level process that interrupts absolutely everything. I had this exact problem with audio software, and getting periodic dropouts from the audio when f.lux was changing to night mode. They allude to potential problems with mouse stuttering or computer slowdowns on the f.lux FAQ, but there is no real solution. (They suggest updating video drivers, but that doesn't work in the general case.)

 

The problem happens maybe because I have two graphics card, the internal Intel one and one by nvidia in my laptop, because I tested the same program and examples on a friends computer, and nothing was wrong there, which leads me to believe there is a problem on how they handle multiple graphics cards or something, but that is just a guess.


Quick fix is enable V-sync.

 

Long fix is separate rendering logic from physic logic and run rendering logic in real-time and physic in simulated time.

There's no point in rendering twice if you get jitter but you do need to "catch up" with your physics.

 

If your rendering loop runs faster than your physic loop then you do simple interpolation between physics key-frames.

The problem was f.lux, the software was interrupting the update of graphics every second.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!