Today I've started new project in XNA and I needed custom timer for my game. For this purpose I've used Stopwatch class. Then I modify my performance measurement tools and now they use my timer instead of GameTime. After those modifications I've observed very strange behavior. When I'm starting my game FPS is around 60(with enabled fixed time step and vertical sync) so its fine but when I click on title bar or move game window FPS drops to ~56.35 and it stays on this level. FirstI thought that there is some problem with my implementation but I've tested FpsCounter used by one of the XNA Framework developers(he also uses Stopwatchfor time measurement) and the behavior was the same.
Does anyoneknow what is the reason of this behavior ?
[XNA 4.0] FPS slightly drops after clicking\moving window.
Do you have Game.IsFixedTimeStep = false?
Nope, FixedTimeStep and SynchronizeWithVerticalRetrace is enabled.
Since you are using your own timer then turn Game.IsFixedTimeStep off. The XNA fixed time step with Vsync on will drop frames. There's a ton of threads about it:
http://forums.create.msdn.com/forums/t/23775.aspx
http://forums.create.msdn.com/forums/t/23775.aspx
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement