aboutsummaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorGene Pasquet <dev@etenil.net>2026-04-08 01:57:20 +0100
committerGene Pasquet <dev@etenil.net>2026-04-08 01:57:20 +0100
commit9e8b75f9949259ef01942cd3717b79b044efddf7 (patch)
treec6b71291ade57f0560a9bbf0db9f5b66bab65cb3 /demo
parent84840ede6646ed793b61cdd889d3f57ab05e9311 (diff)
Refactor update pipelines
Diffstat (limited to 'demo')
-rw-r--r--demo/sandbox.scm15
-rw-r--r--demo/shmup.scm2
-rw-r--r--demo/tweens.scm2
3 files changed, 8 insertions, 11 deletions
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)