Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: What is the best way to limit fps?  (Read 1279 times)

0 Members and 1 Guest are viewing this topic.

Mad Engineer

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • Email
What is the best way to limit fps?
« on: February 17, 2013, 06:10:53 pm »
So i have problem with my game. It works very well on my computer. But when i play it on slower computer it just runs slow, and if i play it on faster computer everything moves faster. So my question is, what is the best way to limit loop per sec (fps) to 60 so it can run at the same speed on all computers ?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: What is the best way to limit fps?
« Reply #1 on: February 17, 2013, 06:19:04 pm »
You probably want to use, window.setFramerateLimit().
Besides that you should make your movement code framerate independent.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything