diff options
| author | Gene Pasquet <dev@etenil.net> | 2026-04-18 05:49:34 +0100 |
|---|---|---|
| committer | Gene Pasquet <dev@etenil.net> | 2026-04-18 05:49:34 +0100 |
| commit | c2085be2dd2a0cb3da05991847e35080915e547e (patch) | |
| tree | e89a0f3c347b3106b15b69b09dcf29f93a7ef627 /docs/entities.org | |
| parent | 38eee24832fe6da4f135cae455881ab97953b23a (diff) | |
rename modules
Diffstat (limited to 'docs/entities.org')
| -rw-r--r-- | docs/entities.org | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/entities.org b/docs/entities.org index 94e572c..2e97782 100644 --- a/docs/entities.org +++ b/docs/entities.org @@ -9,9 +9,9 @@ are no classes, no inheritance, no hidden state. You build entities either by hand as a plist and converting with =plist->alist=, or from a *prefab* data file that composes named mixins with inline fields. -The module that owns this vocabulary is =downstroke-entity= (all the +The module that owns this vocabulary is =(downstroke entity)= (all the =entity-*= procedures and the =define-pipeline= macro). The companion -module =downstroke-prefabs= loads prefab data files and instantiates +module =(downstroke prefabs)= loads prefab data files and instantiates them. Most games will touch both. * The minimum you need @@ -21,7 +21,7 @@ From the getting-started demo (=demo/getting-started.scm=): #+begin_src scheme (import (only (list-utils alist) plist->alist) - downstroke-entity) + (downstroke entity)) (define (make-player) (plist->alist @@ -144,7 +144,7 @@ Because everything is immutable, update chains are usually written as ** Prefabs and mixins Hand-writing a long plist for every enemy gets old fast. The -=downstroke-prefabs= module loads a data file that declares reusable +=(downstroke prefabs)= module loads a data file that declares reusable *mixins* (named bundles of keys) and *prefabs* (named entities built by combining mixins and inline overrides). @@ -205,7 +205,7 @@ Load a prefab file once at =create:= time, then instantiate as many entities as you need: #+begin_src scheme -(import downstroke-prefabs) +(import (downstroke prefabs)) (define registry (load-prefabs "demo/assets/animation-prefabs.scm" @@ -253,7 +253,7 @@ The predicate is =entity-skips-pipeline?=: #+end_src Every built-in step is defined with the =define-pipeline= macro -(=downstroke-entity=), which wraps the body in the skip check. The +(=(downstroke entity)=), which wraps the body in the skip check. The macro has two shapes: #+begin_src scheme @@ -363,7 +363,7 @@ reach for =define-pipeline= instead of writing a plain function. A minimal example: #+begin_src scheme -(import downstroke-entity) +(import (downstroke entity)) ;; A decay step. Users can skip it with #:skip-pipelines '(decay). (define-pipeline (apply-decay decay) (scene entity dt) |
