diff options
| author | Schark <jordan@schark.online> | 2026-09-29 21:02:22 -0400 |
|---|---|---|
| committer | Schark <jordan@schark.online> | 2026-09-29 21:02:22 -0400 |
| commit | 21404c26d3907cefa524878fb031e7a2022fb3d7 (patch) | |
| tree | 38b2bb26d6d0c05447213edca4911ccc3887f474 /platformer/src/main.c | |
| parent | 5f04f3ae87fb307e055d39e81f7c0c841e8a9af8 (diff) | |
| download | gamedev-21404c26d3907cefa524878fb031e7a2022fb3d7.tar.gz gamedev-21404c26d3907cefa524878fb031e7a2022fb3d7.zip | |
Game world test with updated movement
Diffstat (limited to '')
| -rw-r--r-- | platformer/src/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |
