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

Author Topic: Newbie question about animating  (Read 1135 times)

0 Members and 1 Guest are viewing this topic.

n0body

  • Newbie
  • *
  • Posts: 10
    • View Profile
Newbie question about animating
« on: March 20, 2015, 02:33:05 pm »
Hi, this is probably a very noobish question, but when I make a simple main loop and draw a window with a circle in it, then take keyboard input to move the circle's position up, down, left, and right.

If I don't limit the framerate the circle moves position extremely fast.

So, my question is, how should you control the speed in which it moves?

Should it move based on a system clock or something?

Because obviously the rendering speed is going to be different for all different machines, so trying to control the speed by limiting framerate won't work right everywhere.

Rosme

  • Full Member
  • ***
  • Posts: 169
  • Proud member of the shoe club
    • View Profile
    • Code-Concept
Re: Newbie question about animating
« Reply #1 on: March 20, 2015, 03:05:19 pm »
This has been asked and answered numerous times, do a little search next time :)
Here is your answer: Fix your timestamp
GitHub
Code Concept
Twitter
Rosme on IRC/Discord

 

anything