Closed birminghamallen closed 3 years ago
It is not useless. A game loop can run without a limit of frames per second, and game object movement will be ok if you still multiply things by deltatime. But the reason the author decided to introduce an FPS limit is just to make the game run at exactly 60 frames per second. If you want your game to have a consistent FPS count, wasting some milliseconds every frame is one way of doing so.
It is not useless. A game loop can run without a limit of frames per second, and game object movement will be ok if you still multiply things by deltatime. But the reason the author decided to introduce an FPS limit is just to make the game run at exactly 60 frames per second. If you want your game to have a consistent FPS count, wasting some milliseconds every frame is one way of doing so.
Cool, thank you so much! :-)
Commented out this code and it use useless. What is it for?
// Wait until 16ms has elapsed since last frame //while (!SDL_TICKS_PASSED(SDL_GetTicks(), mTicksCount)) //;