1
General / Re: Smoothest possible movement
« on: September 11, 2015, 11:26:04 pm »
GraphicsWhale,
Glad I found this thread!
I just started learning SFML (just after completing "basic" C++), and got stuck on this FPS problem. It's really hard for me to grasp the concept, and I've read many articles explaining how to do it correctly, but since I'm not really experienced programmer, and many times the articles use examples in different programming languages, I don't seem to follow them.
But your example is simple, and uses SFML, so far, so good!
Tell me if I'm wrong:
So as I understand, all this example does is: it takes the difference in time between the While iterations, puts it in a variable, and only when it reaches 60 frames per second it updates the game logic (processes the key events).
But the articles, including the one mentioned here, talk about something called interpolation a lot and I'm having trouble understanding that concept.
Could you please explain it in SFML "language" by adding it to the example?
And sometimes there are examples where movement is multiplied by the difference in time, so what is about that?
Sorry if I'm sounding too noob, but I just don't want to continue without understanding the concept. (I could for example copy the code and get on with it!)
Thank you very much!
Glad I found this thread!
I just started learning SFML (just after completing "basic" C++), and got stuck on this FPS problem. It's really hard for me to grasp the concept, and I've read many articles explaining how to do it correctly, but since I'm not really experienced programmer, and many times the articles use examples in different programming languages, I don't seem to follow them.
But your example is simple, and uses SFML, so far, so good!
Tell me if I'm wrong:
So as I understand, all this example does is: it takes the difference in time between the While iterations, puts it in a variable, and only when it reaches 60 frames per second it updates the game logic (processes the key events).
But the articles, including the one mentioned here, talk about something called interpolation a lot and I'm having trouble understanding that concept.
Could you please explain it in SFML "language" by adding it to the example?
And sometimes there are examples where movement is multiplied by the difference in time, so what is about that?
Sorry if I'm sounding too noob, but I just don't want to continue without understanding the concept. (I could for example copy the code and get on with it!)
Thank you very much!