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/guide.org | |
| parent | 38eee24832fe6da4f135cae455881ab97953b23a (diff) | |
rename modules
Diffstat (limited to 'docs/guide.org')
| -rw-r--r-- | docs/guide.org | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/guide.org b/docs/guide.org index 1b16d92..21a70bc 100644 --- a/docs/guide.org +++ b/docs/guide.org @@ -14,7 +14,7 @@ The smallest Downstroke program you can write opens a window, runs the main loop #+begin_src scheme (import scheme (chicken base) - downstroke-engine) + (downstroke engine)) (game-run! (make-game @@ -53,9 +53,9 @@ In the ~create:~ hook you typically build a scene and hand it to the game with ~ #+begin_src scheme (import scheme (chicken base) - downstroke-engine - downstroke-world - downstroke-scene-loader) + (downstroke engine) + (downstroke world) + (downstroke scene-loader)) (game-run! (make-game @@ -108,7 +108,7 @@ Compile and run, and you should see a light-blue 32×32 square on a dark backgro ** Reading input -Input in Downstroke is organised around /actions/ rather than raw keys. The engine ships with a default input config (~*default-input-config*~ in ~downstroke-input~) that maps the arrow keys, WASD, a couple of action buttons, and game-controller buttons to a small set of action symbols: +Input in Downstroke is organised around /actions/ rather than raw keys. The engine ships with a default input config (~*default-input-config*~ in ~(downstroke input)~) that maps the arrow keys, WASD, a couple of action buttons, and game-controller buttons to a small set of action symbols: | Action | Default keys | |----------+-------------------| @@ -123,7 +123,7 @@ Input in Downstroke is organised around /actions/ rather than raw keys. The engi | ~quit~ | =Escape= | -Inside ~update:~ you reach the input state with ~(game-input game)~, and then query it with three predicates from ~downstroke-input~: +Inside ~update:~ you reach the input state with ~(game-input game)~, and then query it with three predicates from ~(downstroke input)~: - ~(input-held? input 'left)~ — ~#t~ while the player holds the action down. - ~(input-pressed? input 'a)~ — ~#t~ only on the first frame the action goes down (edge). @@ -193,11 +193,11 @@ Here is the full =demo/getting-started.scm= source. Read it top to bottom — ea (import scheme (chicken base) (only (list-utils alist) plist->alist) - downstroke-engine - downstroke-world - downstroke-entity - downstroke-input - downstroke-scene-loader) + (downstroke engine) + (downstroke world) + (downstroke entity) + (downstroke input) + (downstroke scene-loader)) (define +speed+ 2) |
