►Full Series Playlist: SFML Playlist: • SFML - Simple Fast Media Library
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel: / @mikeshah
►Lesson Description: In this lesson I show you how to calculate the framerate for an application. I talk about the problem with not limiting the framerate from our previous application (i.e. the sprite will move too fast on different machines), and we see how to correct it using SFML's built-in frame limiting function. You will also understand after this lesson how to compute and limit the framerate yourself, if you'd like to build your own utility.
NOTE: It's probably worth providing an assertion to ensure currentTime does not return 0.
NOTE: If you also do not see a change in framerate with the setFramerateLimit function, you may have to disable vertical sync.
00:00 Introduction and framerate defined
1:00 Illustrating the problem--demo
1:54 Framerate calculation explanation
4:00 sf::clock and sf::time classes in SFML
4:40 Elapsed time calculation
5:40 Implementation of calculating frames per second calculation
9:00 Limit frame rate (setFramerateLimit)
11:57 Conclusion
►YouTube Channel: / mikeshah
►Please like and subscribe to help the channel!
►Join our free community: https://courses.mshah.io/communities/...
Watch video SFML Framerate (FPS) calculation and frame rate limiting online, duration hours minute second in high quality that is uploaded to the channel Mike Shah 17 February 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 4,518 times and liked it 112 visitors.