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

Author Topic: How does the timers/clocks work?  (Read 1306 times)

0 Members and 1 Guest are viewing this topic.

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
How does the timers/clocks work?
« on: October 24, 2012, 01:03:26 am »
Hi everybody :)

I dont really understand the timers/clocks. I just want my game to be on 60 fps on any computer.
In Allegro, it was very very easy.... just make a variable, start it and wupti... its 60 fps.

But in SFML it seems a little more confusing to me.

i looked at the tutorial here:
http://www.sfml-dev.org/tutorials/2.0/system-time.php

But i didn't really understand it :(

Hope someone helps
thanks!!!!  ;D

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: How does the timers/clocks work?
« Reply #1 on: October 24, 2012, 01:05:47 am »
http://www.sfml-dev.org/tutorials/2.0/window-window.php
in controlling the framerate section.. can't imagine it being any simpler..
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
AW: How does the timers/clocks work?
« Reply #2 on: October 24, 2012, 01:35:45 am »
How about window.setFramerateLimit(60);? ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Assassinbeast

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: How does the timers/clocks work?
« Reply #3 on: October 24, 2012, 01:57:43 am »
Thanks for help!!! that was easy  ;D

 

anything