1
Graphics / SFML Graphics, or Box2D
« on: August 04, 2010, 08:55:48 am »
You are right, it is not the whole code base, ball is a circle shape, and move takes advantage of the SF::Shape .Move function. You are also right that the ball is being moved by a velocity factor every call.
So I thought the line Game.SetFramerateLimit(60); enforced the frame rate of 60, if this is not the case what does it do? Does it simply prevent going over 60 frames? This is a little confusing...
If I understand the example from the link,I would have to force my program to sleep when not enough time has passed, and skip the logic in the other case. However we are talking about a very insignificant amount of logic here, and on this system running it to completion every time should not be a problem.
On a side note while asking google about this problem today I found a link that referenced the .UseVerticalSync(true) while this did resolve the issue, I read that it could cause more issues, I will try to implement a system more like what you pointed out in the link.
So I thought the line Game.SetFramerateLimit(60); enforced the frame rate of 60, if this is not the case what does it do? Does it simply prevent going over 60 frames? This is a little confusing...
If I understand the example from the link,I would have to force my program to sleep when not enough time has passed, and skip the logic in the other case. However we are talking about a very insignificant amount of logic here, and on this system running it to completion every time should not be a problem.
On a side note while asking google about this problem today I found a link that referenced the .UseVerticalSync(true) while this did resolve the issue, I read that it could cause more issues, I will try to implement a system more like what you pointed out in the link.