summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-02-11 21:41:06 -0500
committerDavid Thompson <dthompson2@worcester.edu>2016-02-11 21:41:06 -0500
commite6a691a322ef243fa6c879b91ea9ad5f04e3521f (patch)
tree5e4632f7837306f066fc18bbfeb2d95699abf7e5
parent82f6da8de526685d1d279730111366c0670da78e (diff)
Update README.
-rw-r--r--README27
1 files changed, 13 insertions, 14 deletions
diff --git a/README b/README
index fe201d8..b478a57 100644
--- a/README
+++ b/README
@@ -29,21 +29,22 @@ Sly differentiates itself from most other game engines by encouraging
#+BEGIN_SRC scheme
(use-modules (sly))
- ;; Create OpenGL context and do other setup.
- (sly-init)
-
- ;; Load a GNU head sprite.
- (define gnu
- (load-sprite "gnu.png"))
-
;; The way we see the world.
(define camera
(2d-camera #:area (make-rect 0 0 640 480)))
+ ;; Load a GNU head sprite when the game starts. Until the game
+ ;; starts, this "signal" holds the null sprite.
+ (define-signal gnu
+ (on-start (load-sprite "gnu.png")
+ null-sprite))
+
;; View the sprite from the perspective of the camera.
(define-signal scene
- (with-camera camera
- (move (vector2 320 240) (render-sprite gnu))))
+ (signal-let ((gnu gnu))
+ (with-camera (2d-camera #:area (make-rect 0 0 640 480))
+ (move (vector2 320 240)
+ (render-sprite gnu)))))
(with-window (make-window #:title "Hello, world!")
(run-game-loop scene))
@@ -70,7 +71,7 @@ Sly differentiates itself from most other game engines by encouraging
#+BEGIN_SRC scheme
(with-window (make-window #:title "Best Game Ever"
#:resolution #(640 480))
- (run-game-loop))
+ (run-game-loop scene))
#+END_SRC
** Functional Reactive Programming
@@ -160,8 +161,7 @@ Sly differentiates itself from most other game engines by encouraging
#+BEGIN_SRC sh
guix environment -l guix.scm
- ./bootstrap && ./configure \
- --with-libgslcblas-prefix=$(guix build gsl)
+ ./bootstrap && ./configure
#+END_SRC
* Running Examples
@@ -193,10 +193,9 @@ Sly differentiates itself from most other game engines by encouraging
* Dependencies
- - GNU Guile >= 2.0.11
+ - GNU Guile >= 2.0.11 (Guile 2.2.x recommended for best performance)
- [[http://www.gnu.org/software/guile-opengl/][guile-opengl]] >= 0.1.0
- [[https://dthompson.us/pages/software/guile-sdl2.html][guile-sdl2]] >= 0.1.0
- - GNU Scientific Library (GSL)
* Releases