From e6a691a322ef243fa6c879b91ea9ad5f04e3521f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 11 Feb 2016 21:41:06 -0500 Subject: Update README. --- README | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'README') 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 -- cgit v1.2.3