Jump to content
  • Advertisement
Sign in to follow this  

Stuttering Framerate

This topic is 2929 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


Using XNA 4.0.

For my purposes, I need exactly one Update call for every Draw call. I also want the game to run at a maximum speed of 60Hz. I also want it to decrease as necessary. Currently, my attempt at doing most of this is:
this.IsFixedTimeStep = false;
this.TargetElapsedTime = new TimeSpan(0, 0, 0, 0, (int)Math.Round(1000.0f/60.0f));
In practice, I've found this works well enough. Usually.

When in a shader-heavy section of the game, the framerate appears fairly brisk, but then it stalls for a fraction of a second, throwing carefully timed events into a tizzy. This recurs, making the game unplayable. I don't understand this behavior. As far as I can tell, I'm not causing much garbage collection; the problem only seems to occur when running fragment-shader heavy code.

Help? Thanks,

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!