From 9e8b75f9949259ef01942cd3717b79b044efddf7 Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Wed, 8 Apr 2026 01:57:20 +0100 Subject: Refactor update pipelines --- demo/sandbox.scm | 15 ++++++--------- demo/shmup.scm | 2 +- demo/tweens.scm | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'demo') diff --git a/demo/sandbox.scm b/demo/sandbox.scm index 6a6030f..a34ebd9 100644 --- a/demo/sandbox.scm +++ b/demo/sandbox.scm @@ -162,14 +162,11 @@ (let ((tm (scene-tilemap (game-scene game)))) (game-scene-set! game (chain (game-scene game) - (scene-update-entities _ (cut step-tweens <> dt)) - (scene-update-entities _ (cut integrate-entity <> dt tm)) - (scene-sync-groups _) - (scene-resolve-collisions _) - (scene-update-entities _ - (lambda (e) - (if (entity-ref e #:gravity? #f) - (detect-on-solid e tm (scene-entities _)) - e))))))))) + (scene-map-entities _ (cut step-tweens <> dt)) + (scene-map-entities _ (cut integrate-entity <> dt tm)) + (scene-transform-entities _ sync-groups) + (scene-transform-entities _ resolve-entity-collisions) + (scene-map-entities _ + (lambda (e) (detect-on-solid e tm (scene-entities _)))))))))) (game-run! *game*) diff --git a/demo/shmup.scm b/demo/shmup.scm index ab09957..fdffd71 100644 --- a/demo/shmup.scm +++ b/demo/shmup.scm @@ -147,7 +147,7 @@ (all (cons player (append new-entities spawned others)))) (game-scene-set! game (chain (update-scene scene entities: all) - (scene-update-entities _ + (scene-map-entities _ (lambda (e) (if (eq? (entity-type e) 'player) e (move-projectile e)))) (scene-remove-dead _) (scene-filter-entities _ diff --git a/demo/tweens.scm b/demo/tweens.scm index d036b6b..b2a22cc 100644 --- a/demo/tweens.scm +++ b/demo/tweens.scm @@ -83,7 +83,7 @@ update: (lambda (game dt) (game-scene-set! game - (scene-update-entities (game-scene game) + (scene-map-entities (game-scene game) (cut step-tweens <> dt)))) render: (lambda (game) -- cgit v1.2.3