Constant framerate in WPF for game

后端 未结 3 1714
没有蜡笔的小新
没有蜡笔的小新 2021-02-08 19:17

Im creating a simple vehicle and projectile simulation game in WPF using C#. I need to have a constant frame rate (i.e. i need to know how much to move an object with a certain

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-08 19:44

    Even if you don't want to go with XNA for game development consider reading on how time management is done there - fixed frame rate is not necessary equal or required to stable game time. Try to base your physics on game time (which may be the same as real time or computed based on real time delatas - i.e. if you want to have "fast forward" mode or pause the game) instead of frame rate.

    Following 2 links discuss "game time", "real time" and related concepts: http://blogs.msdn.com/shawnhar/archive/2007/07/25/understanding-gametime.aspx, http://blogs.msdn.com/shawnhar/archive/2007/11/23/game-timing-in-xna-game-studio-2-0.aspx

提交回复
热议问题