From 21404c26d3907cefa524878fb031e7a2022fb3d7 Mon Sep 17 00:00:00 2001 From: Schark Date: Tue, 29 Sep 2026 21:02:22 -0400 Subject: Game world test with updated movement --- platformer/src/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platformer/src/main.c') diff --git a/platformer/src/main.c b/platformer/src/main.c index ce02b85..23f06d2 100644 --- a/platformer/src/main.c +++ b/platformer/src/main.c @@ -30,6 +30,8 @@ * window_poll_events(); * * while accumulator >= TICK_DT: // 0, 1 or several ticks + * world_update(TICK_DT); // moving platforms first, + * // so the player rides them * controls_poll(&input); * if input.quit_pressed: window_request_close(); * if input.reset_pressed: @@ -156,6 +158,8 @@ int main(void) window_poll_events(); while (accumulator >= TICK_DT) { + /* Moving platforms move first, so the player rides where they are now. */ + world_update(TICK_DT); controls_poll(&input); if (input.quit_pressed) window_request_close(); -- cgit v1.2.3-18-g5258