Original Post
Hi All,
I am implementing time based movement for my spaceship and the formula that I have been using is the following:
NewXPos += sin(angle) * time_difference_between_frames * scaler_constant;
Similarly for Y position, I have:
NewYPos += cos(angle) * time_difference_between_frames * scaler_constant;
I do not want to turn Vsync off because it causes image tearing and I can notice missed frames due to vsync being off. When I am testing the spaceship in a partial window, I am getting about 84FPS. When I enlarge the window to full, my FPS immediately drop to around 55. I know this is probably caused by vsync being on. However, the spaceship also flies&turns much slower with the window being full-sized. I thought that my time based movement on the spaceship would compensate for the window being enlarged. Am I completely off on this?
What would be the best way to achieve similar speeds in both partial and full windows without actually turning VSync off?
Do you guys also believe that turning vsync off is pretty bad, because it does cause frames rendered being missed, which causes "funky" visual effects?
Finally, my last question is: Did I at least get the time-based movement right?
Thanks a bunch guys,
TommyB