aboutsummaryrefslogtreecommitdiff
path: root/docs/scenes.org
diff options
context:
space:
mode:
authorGene Pasquet <dev@etenil.net>2026-04-18 05:49:34 +0100
committerGene Pasquet <dev@etenil.net>2026-04-18 05:49:34 +0100
commitc2085be2dd2a0cb3da05991847e35080915e547e (patch)
treee89a0f3c347b3106b15b69b09dcf29f93a7ef627 /docs/scenes.org
parent38eee24832fe6da4f135cae455881ab97953b23a (diff)
rename modules
Diffstat (limited to 'docs/scenes.org')
-rw-r--r--docs/scenes.org16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/scenes.org b/docs/scenes.org
index da62291..87b9256 100644
--- a/docs/scenes.org
+++ b/docs/scenes.org
@@ -15,10 +15,10 @@ The smallest scene is a sprite-only one with a single entity, built inside the ~
(import scheme
(chicken base)
(only (list-utils alist) plist->alist)
- downstroke-engine
- downstroke-world
- downstroke-entity
- downstroke-scene-loader)
+ (downstroke engine)
+ (downstroke world)
+ (downstroke entity)
+ (downstroke scene-loader))
(define (make-player)
(plist->alist
@@ -43,7 +43,7 @@ That is all that is required to put a blue square on a dark background. ~make-sp
** The scene record
-~scene~ is a record type defined with ~defstruct~ in ~downstroke-world~. Its fields map one-to-one onto the things the engine needs to know about the current frame:
+~scene~ is a record type defined with ~defstruct~ in ~(downstroke world)~. Its fields map one-to-one onto the things the engine needs to know about the current frame:
| Field | Type | Purpose |
|-------------------+--------------------------------+--------------------------------------------------------------------------------------------------|
@@ -101,7 +101,7 @@ This is the form the ~shmup~ and ~scaling~ demos use to turn off the physics pip
*** ~make-sprite-scene~ — convenient sprite-only scenes
-~make-sprite-scene~ lives in ~downstroke-scene-loader~ and wraps ~make-scene~ with sensible defaults for sprite-only games:
+~make-sprite-scene~ lives in ~(downstroke scene-loader)~ and wraps ~make-scene~ with sensible defaults for sprite-only games:
#+begin_src scheme
(make-sprite-scene
@@ -175,7 +175,7 @@ This pattern — load once in ~preload:~ (or early in ~create:~), retrieve many
** Manipulating scene entities
-All scene transformers in ~downstroke-world~ are /functional/: they take a scene and return a new one. Nothing is mutated; the idiomatic pattern inside an ~update:~ hook is always
+All scene transformers in ~(downstroke world)~ are /functional/: they take a scene and return a new one. Nothing is mutated; the idiomatic pattern inside an ~update:~ hook is always
#+begin_src scheme
(game-scene-set! game (<transformer> (game-scene game) ...))
@@ -197,7 +197,7 @@ or, when composing multiple transformations, a ~chain~ form from ~srfi-197~.
~(scene-map-entities scene proc ...)~ applies each ~proc~ in sequence to every entity in the scene. Each ~proc~ has the signature ~(lambda (scene entity) ...) → entity~ — it receives the /current/ scene (read-only, snapshot at the start of the call) and one entity, and must return a replacement entity. Multiple procs are applied like successive ~map~ passes, in argument order.
-This is the workhorse of the physics pipeline; see ~default-engine-update~ in ~downstroke-engine~ for how it is chained to apply acceleration, gravity, velocity, and so on. In game code you use it for per-entity updates that do not need to see each other:
+This is the workhorse of the physics pipeline; see ~default-engine-update~ in ~(downstroke engine)~ for how it is chained to apply acceleration, gravity, velocity, and so on. In game code you use it for per-entity updates that do not need to see each other:
#+begin_src scheme
(scene-map-entities scene