summaryrefslogtreecommitdiff
path: root/platformer/src/main.c
diff options
context:
space:
mode:
authorSchark <jordan@schark.online>2026-09-29 21:02:22 -0400
committerSchark <jordan@schark.online>2026-09-29 21:02:22 -0400
commit21404c26d3907cefa524878fb031e7a2022fb3d7 (patch)
tree38b2bb26d6d0c05447213edca4911ccc3887f474 /platformer/src/main.c
parent5f04f3ae87fb307e055d39e81f7c0c841e8a9af8 (diff)
downloadgamedev-21404c26d3907cefa524878fb031e7a2022fb3d7.tar.gz
gamedev-21404c26d3907cefa524878fb031e7a2022fb3d7.zip
Game world test with updated movement
Diffstat (limited to '')
-rw-r--r--platformer/src/main.c4
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();