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

Author Topic: Can I make an object move smoothly without stuttering?  (Read 1630 times)

0 Members and 2 Guests are viewing this topic.

kingsman142

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can I make an object move smoothly without stuttering?
« on: January 11, 2012, 10:59:37 pm »
Is there a way that I can make an object move, say a ball, in one direction without using a variable to move it each frame?  

As of now, I have a sprite with a variable that equals 2.6 and that's how far it's x value increases each frame.  But if I have it as 2.6, the ball moves very slowly across the screen but it's pretty smooth.  If I increased that to like 50, it'd move fast across the screen but there's be large margins that it'd skip.

So back to my question.  Can I move, for example the ball, fast across the screen but make it move smoothly?
OS: Windows 7
SFML Version: 2
Compiler: Code::Blocks with MinGW

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Can I make an object move smoothly without stuttering?
« Reply #1 on: January 12, 2012, 12:23:18 am »
You can increase the FPS to get smoother results, but anything above 60 FPS is not noticeable by the human eye (and probably not even shown by the monitor, depending on its frequency).

kingsman142

  • Newbie
  • *
  • Posts: 10
    • View Profile
Can I make an object move smoothly without stuttering?
« Reply #2 on: January 12, 2012, 01:01:36 am »
Thanks, it worked.
OS: Windows 7
SFML Version: 2
Compiler: Code::Blocks with MinGW