Why does my program stutter so much?
- by user36322
I've been very frustrated trying to solve this. I've looked it up, and all the answers are the same: set IsFixedTimeStep = false. This doesn't help me at all, the program is still jittery and stutters.
I have absolutely no idea what is going on, can you guys help?
Code for movement (objects is a list):
speed = Math.Min(speed + (speedIncrement * gameTime.ElapsedGameTime.Milliseconds / 200), maxSpeed);
for (int i = objects.Count - 1; i >= 0; i--)
{
objects[i].rect.Y += (int)(speed * gameTime.ElapsedGameTime.Milliseconds);
//Check if the object is past the screen. If it is, remove it
if (objects[i].rect.Y > screenHeight)
{
objects.Remove(objects[i]);
}
}