XNA丢帧

时间:2011-08-23 18:28:42

标签: performance xna frames frame-rate

我已经读过,可以删除改进性能帧(超出60 fps)以允许更新与时间一致而不是减慢整个游戏。我认为这只是指绘制而不是更新/后退缓冲......?

即 - 跳帧可能会导致更多不稳定的动作,但不会让游戏变得不切实际。有没有人知道如何实现这个以及是否建议这样做?

1 个答案:

答案 0 :(得分:2)

如果你将IsFixedTime设置为true,xna游戏类会以自动方式管理它。

来自MSDN:

If IsFixedTimeStep is false, 
   Update and Draw will be called sequentially as often as possible. 
If IsFixedTimeStep is true, 
   Update will be called at the interval specified in TargetElapsedTime, 
   while Draw will continue to be called as often as possible. 
   If Draw is not called, IsRunningSlowly will be set to true.

http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.draw(v=XNAGameStudio.41).aspx