Game Development Reference
Not much has changed, has it? We have one extra variable ( deltaTime ), which holds
the duration of the last frame (in seconds). When we pass the variable to the
Sprite::move() method, we are effectively saying "I want to move this car by
carSpeed pixels per second in the horizontal direction." It's very simple yet extremely
However, here is the million dollar question—how do we capture that elapsed time?