Closed BlastWind closed 3 years ago
Furthermore, Spritesheet.cpp
uses sf::Clock
as well, migrate this?
No
Haha, mean!
For those wondering why we chose not to: sf::Clock
doesn't provide much extra abstraction, so, we are better off using the C++ standard library std
to handle time. This way, if we were to for some reason migrate to another rendering library like SDL
, we can still retain the time handling code.
In
bin/main.cpp
, we are usingstd::chrono
to implement a fixed 60 frames per second game loop. SFML provides asf::Clock
module in handling this kind of stuff as well, perhaps use it instead?https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Clock.php