summaryrefslogtreecommitdiff
path: root/scenes
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-11-06 10:56:14 +0100
committerRicardo Wurmus <rekado@elephly.net>2023-11-06 12:07:11 +0100
commit95e09b602176716c747338507123ff8130610417 (patch)
treee1fe97b097a19c2073f9939f07c6c8c327b41ba9 /scenes
parente5acb707aaceb92982b81f7170add924cc41653f (diff)
Express all durations in seconds.
Diffstat (limited to 'scenes')
-rw-r--r--scenes/death.scm31
-rw-r--r--scenes/game.scm9
-rw-r--r--scenes/intro.scm4
3 files changed, 22 insertions, 22 deletions
diff --git a/scenes/death.scm b/scenes/death.scm
index 67e24a7..9aacdc1 100644
--- a/scenes/death.scm
+++ b/scenes/death.scm
@@ -168,7 +168,7 @@ quite short."))
(wait-until (any key-pressed? '(escape q return space)))
;; Fade out
- (tween 60 0.0 1.0
+ (tween 1 0.0 1.0
(lambda (alpha)
(set! fade-box-fill
(make-color 0 0 0 alpha))))
@@ -176,33 +176,34 @@ quite short."))
(script
;; Fade in
- (tween 15 1.0 0.0
+ (tween 0.25 1.0 0.0
(lambda (alpha)
(set! fade-box-fill
(make-color 0 0 0 alpha))))
- (tween 300 0.0 0.5
+ (tween 5 0.0 0.5
(lambda (alpha)
(set! (tint *player*)
(make-color 1.0 1.0 1.0 alpha))))
(walk *player* '(right))
- (sleep 3000)
+ (sleep 3)
(walk *player* '(right) 'stop)
(walk *player* '(idle-front))
- (sleep 1900)
+ (sleep 3)
(walk *player* '(up))
(walk *reaper* '(up))
- (sleep 2000)
+ (sleep 3)
;; Slowly fade out the map and the top text.
- (tween 600 0.0 1.0 (lambda (value)
- (set! fade-map-fill
- ;; That's the colour of the "black" cave tile.
- (make-color 0.125 0.09 0.161 value))))
+ (tween 5 0.0 1.0
+ (lambda (value)
+ (set! fade-map-fill
+ ;; That's the colour of the "black" cave tile.
+ (make-color 0.125 0.09 0.161 value))))
(set! pretend-walking? #true)
- (sleep 1000)
+ (sleep 8)
;; Roll credits
(for-each
@@ -217,12 +218,12 @@ quite short."))
lines
(iota (length lines)))))
(set! *labels* (append *labels* labels))
- (sleep 3000)
+ (sleep 4)
(for-each (lambda (label)
(set! (visible? label) #false))
labels)))
credits)
- (sleep 6000)
+ (sleep 5)
(for-each (lambda (text)
(let ((label
@@ -235,9 +236,9 @@ quite short."))
#:position
(vec2 16.0 180))))
(set! *labels* (cons label *labels*))
- (sleep 3000)
+ (sleep 5)
(set! (visible? label) #false)
- (sleep (+ (random 10000) 4000))))
+ (sleep (+ (random 5) 4))))
`("There is nothing more to see here."
"I'm serious."
"What are you waiting for?"
diff --git a/scenes/game.scm b/scenes/game.scm
index 442071e..f784356 100644
--- a/scenes/game.scm
+++ b/scenes/game.scm
@@ -138,7 +138,7 @@ map's positions layer."
(wait-until (any key-pressed? '(escape)))
;; Fade out
- (tween 160 0.0 1.0
+ (tween 2 0.0 1.0
(lambda (alpha)
(set! fade-box-fill
(make-color 0 0 0 alpha))))
@@ -181,15 +181,14 @@ map's positions layer."
;; Handle background noise fade in
(spawn-script
(lambda ()
- (tween 60 0.0 1.0
+ (tween 2 0.0 1.0
(lambda (a)
- (set-source-volume! background-music a)
- (sleep 100))
+ (set-source-volume! background-music a))
#:ease ease-out-sine)))
;; Fade in
(script
- (tween 60 1.0 0.0
+ (tween 1 1.0 0.0
(lambda (alpha)
(set! fade-box-fill
(make-color 0 0 0 alpha))))))
diff --git a/scenes/intro.scm b/scenes/intro.scm
index 15a25c0..422d2ec 100644
--- a/scenes/intro.scm
+++ b/scenes/intro.scm
@@ -84,7 +84,7 @@ The leaf begins to dry."))
(wait-until (key-pressed? 'return))
;; Fade out
- (tween 60 0.0 1.0
+ (tween 1 0.0 1.0
(lambda (alpha)
(set! fade-box-fill
(make-color 0 0 0 alpha))))
@@ -92,7 +92,7 @@ The leaf begins to dry."))
(module-ref (resolve-interface '(scenes game)) 'scene))))
(script
;; Fade in
- (tween 120 1.0 0.0
+ (tween 2 1.0 0.0
(lambda (alpha)
(set! fade-box-fill
(make-color 1 1 1 alpha))))))