I just noticed today, that when I compile and run a new XNA 4.0 game, one of CPU threads is running at 100% and the framerate drops to 54 FPS.
The weird thing is that sometimes it works at 60 FPS, but then it just drops to 54 FPS.
I haven't noticed this behaviour before, so I don't know if this is normal. I uninstalled my antivirus and reinstalled XNA Game Studio, XNA Redistributable and .NET Framework 4.
If I set IsFixedTimeStep to false, the game runs at 60 FPS and CPU usage is minimal (1-2%). but as far as I know, this requires me to do velocity calculations using ElapsedGameTime, but I don't know how to do it, since I'm fairly new to XNA. But some say that setting it to false reduces jerky animations.
I already checked this forum thread, but no one has found a good solution.
Has anyone experienced this problem?
EDIT: I did some more research and I implemented a FPS counter (until now, I measured it with Fraps), and my counter shows the game running at 60 FPS (with IsFixedTimeStep = true), so this solves the FPS issue, but the high CPU usage remains. Is it possible that this happens to everyone?
while(1) { update(); draw(); }
never sleeps (otherwise the game will lag), so you should expect at least 100% of one logical core to be utilized. (so if you had a dual core cpu it should be 50%, dual core with hyperthreading, should be around 25%) – bobobobo