Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9243849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:53:58+00:00 2026-06-18T08:53:58+00:00

Im experiencing random framerate increases when I run my game (developed using c#/XNA 4.0)

  • 0

I”m experiencing random framerate increases when I run my game (developed using c#/XNA 4.0) on the PC. These increases are causing a stuttering affect during gameplay. It usually happens when the game starts up and is just frequent enough to be annoying.

For example – my FPS counter will jump from 62 to 85 (causing a slight stutter) then back to 62 and stay consistently between 62/63 FPS for three minutes and then jump to 78 then go back to 62/63 again. It’s rare for the FPS to actually drop below 60.

Any ideas of what is going on?

Edit – Added my FPS code below (02.06.2013)

namespace Game
{
    class FPSDebuggerFont : Font
    {

        //int totalScore;

        //FramesPerSecond (FPS) debug variables
        int totalFrames = 0;
        int fps = 0;
        int elpaseMilliseconds = 1000;
        string fpsText;

        public FPSDebuggerFont(SpriteFont scoreFont, String text, Vector2 pos, Color color, float scale, float layerDepth)
            : base(scoreFont, text, pos, color, scale, layerDepth)
        {
        }

        public void FPSTime(GameTime gameTime)
        {
            //Algorithm for FPS debugging
            elpaseMilliseconds -= (float)gameTime.ElapsedGameTime.Milliseconds;
            if (elpaseMilliseconds < 0)
            {
                //FPS debugg info
                fps = totalFrames;
                elpaseMilliseconds = 1000;
                totalFrames = 0;
            }

        }

        public override void Update(GameTime gameTime)
        {
            FPSTime(gameTime);

        }

        public override void Draw(GameTime gameTime, SpriteBatch sB)
        {
            totalFrames++;
            fpsText = "Frames Per Second: " + fps;

            sB.DrawString(scoreFont, fpsText, pos, color, 0, Vector2.Zero, scale, SpriteEffects.None, layerDepth);

        }
    }
}

For clarification purposes, I’m not sure how I can add anymore code regarding this without adding my entire project. But I can certainly add more information; along with my Game class I have two other classes (SpriteManager, FontManager) using the GameComponent functionality of XNA, each containing their own Load Content, Update, and Draw methods, example below;

public class SpriteManager : Microsoft.Xna.Framework.DrawableGameComponent
{
    //Manager code
} 

public class FontManager : Microsoft.Xna.Framework.DrawableGameComponent
{
    //Manager code
}

Hopefully this additional information helps.

End Edit

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:53:59+00:00Added an answer on June 18, 2026 at 8:53 am

    It could be anything without seeing the code. It shouldn’t cause any stuttering problems though as long as you’re using gameTime.ElapsedGameTime in your movement calculations.

    For example:

    sprite.Location += sprite.Velocity * (float)gameTime.ElapsedGameTime.TotalSeconds;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are experiencing some random NetConnection.Call.Failed: HTTP: Failed when using the flex 4 mx.messaging.channels::SecureAMFChannel
We are using Rails 2.3.5 and have been experiencing seemingly random Timeout::Error: execution expired
When experiencing networking problems on client machines, I'd like to be able to run
I am experiencing a fatal error while using artisan on the (fantastic) Laravel PHP
I'm experiencing a seemingly random System resource exceeded exception when running my code. The
I'm experiencing a very strange problem with Rails and ajax using jQuery (although I
I am experiencing random occurrences of caching of Ajax requests created through Jquery's get.
On one of our project we been experiencing random session timeout issues. With recent
We are experiencing random intermittent slow-downs in our ASP.NET application. Most pages take between
Recently two users of our software from the same company started experiencing random closures

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.