Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Tips on writing FPS independent games

I'm writing a little 2D game and for the moment there is a FPS limit in it. I would like to make the game speed independent of the FPS so that faster computers can get smoother animations. Does anyone know any article/newsgroup covering this? (Windows/DirectX/Any language)




Comments

  • : I'm writing a little 2D game and for the moment there is a FPS limit in it. I would like to make the game speed independent of the FPS so that faster computers can get smoother animations. Does anyone know any article/newsgroup covering this? (Windows/DirectX/Any language)


    Base your IO off of a timer that is system-clock independent. Then make your graphics run in a callback loop which only polls the variables and prints to the screen and is based off of system clock ticks.


    -Xotor-


  • re: frame independance....


    I've never bothered trying to write one (a frame independant engine...), but wouldn't it work if you simply specified a "unit"'s speed in pixles/second rather than pixels/frame?


Sign In or Register to comment.