From 5b86ef5c577ae2cebe64aa3c3a218ecddf3f4d44 Mon Sep 17 00:00:00 2001 From: RobinsAviary Date: Mon, 29 Sep 2025 12:25:12 -0400 Subject: [PATCH] more explanation --- examples/core/core_delta_time.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/core/core_delta_time.c b/examples/core/core_delta_time.c index feb219243..6430fc642 100644 --- a/examples/core/core_delta_time.c +++ b/examples/core/core_delta_time.c @@ -87,10 +87,11 @@ int main(void) currentFps += mouseWheel; SetTargetFPS(currentFps); } - - // Use of delta time to make the circle look like it's moving at a "consistent" speed regardless of FPS. + // GetFrameTime() returns the time it took to draw the last frame, in seconds (usually called delta time). - // Multiply by 6.0 (an arbitrary value) in order to make the speed visually closer to the other circle (at 60 fps), for comparison. + // Uses the delta time to make the circle look like it's moving at a "consistent" speed regardless of FPS. + + // Multiply by 6.0 (an arbitrary value) in order to make the speed visually closer to the other circle (at 60 fps), for comparison. deltaX += GetFrameTime() * 6.0 * speed; // This circle can move faster or slower visually depending on the FPS. frameX += .1 * speed;