diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2021-10-24 11:53:05 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2021-10-24 11:53:05 -0400 |
commit | 9523f936cf6f761ccc6127546540580cb57f9a5f (patch) | |
tree | 895b333dd0c07c1a94cff80f3fd2227dfd46437e | |
parent | 7e76d1c2005435c412ff96bf3e0f0f6be12c22c5 (diff) |
Preparing for release!
-rw-r--r-- | assets/images/chickadee.png | bin | 0 -> 6073 bytes | |||
-rw-r--r-- | assets/images/lightness.png | bin | 0 -> 1181 bytes | |||
-rw-r--r-- | assets/sounds/alarm.wav | bin | 0 -> 53122 bytes | |||
-rw-r--r-- | bonnie-bee/assets.scm | 6 | ||||
-rw-r--r-- | bonnie-bee/bullet.scm | 2 | ||||
-rw-r--r-- | bonnie-bee/game.scm | 35 | ||||
-rw-r--r-- | bonnie-bee/player.scm | 4 | ||||
-rw-r--r-- | bonnie-bee/splash.scm | 14 | ||||
-rw-r--r-- | bundle.scm | 5 |
9 files changed, 50 insertions, 16 deletions
diff --git a/assets/images/chickadee.png b/assets/images/chickadee.png Binary files differnew file mode 100644 index 0000000..d383312 --- /dev/null +++ b/assets/images/chickadee.png diff --git a/assets/images/lightness.png b/assets/images/lightness.png Binary files differnew file mode 100644 index 0000000..ebe75ac --- /dev/null +++ b/assets/images/lightness.png diff --git a/assets/sounds/alarm.wav b/assets/sounds/alarm.wav Binary files differnew file mode 100644 index 0000000..6dbf1ed --- /dev/null +++ b/assets/sounds/alarm.wav diff --git a/bonnie-bee/assets.scm b/bonnie-bee/assets.scm index 7c96307..38d6582 100644 --- a/bonnie-bee/assets.scm +++ b/bonnie-bee/assets.scm @@ -8,6 +8,8 @@ background-image particle-image darkness-image + lightness-image + chickadee-image bee-atlas bullet-atlas popcorn-atlas @@ -24,6 +26,7 @@ player-bomb-sound pollen-release-sound hehehe-sound + alarm-sound intro-music main-music)) @@ -36,6 +39,8 @@ (define-asset background-image (load-image (scope-datadir "assets/images/background.png"))) (define-asset particle-image (load-image (scope-datadir "assets/images/particle.png"))) (define-asset darkness-image (load-image (scope-datadir "assets/images/darkness.png"))) +(define-asset lightness-image (load-image (scope-datadir "assets/images/lightness.png"))) +(define-asset chickadee-image (load-image (scope-datadir "assets/images/chickadee.png"))) (define-asset bee-atlas (load-tileset (scope-datadir "assets/images/bee.png") 32 32)) (define-asset bullet-atlas (load-tileset (scope-datadir "assets/images/bullets.png") 16 16)) (define-asset flower-atlas (load-tileset (scope-datadir "assets/images/flower.png") 64 64)) @@ -52,5 +57,6 @@ (define-asset player-bomb-sound (load-audio (scope-datadir "assets/sounds/player-bomb.wav"))) (define-asset pollen-release-sound (load-audio (scope-datadir "assets/sounds/pollen-release.wav"))) (define-asset hehehe-sound (load-audio (scope-datadir "assets/sounds/hehehe.wav"))) +(define-asset alarm-sound (load-audio (scope-datadir "assets/sounds/alarm.wav"))) (define-asset intro-music (load-audio (scope-datadir "assets/sounds/intro.ogg") #:mode 'stream)) (define-asset main-music (load-audio (scope-datadir "assets/sounds/main.ogg") #:mode 'stream)) diff --git a/bonnie-bee/bullet.scm b/bonnie-bee/bullet.scm index 758ff5a..95c925c 100644 --- a/bonnie-bee/bullet.scm +++ b/bonnie-bee/bullet.scm @@ -202,7 +202,7 @@ (< (rect-left h) -16.0) (> (rect-right h) 336.0) (< (rect-bottom h) -16.0) - (> (rect-top h) 272.0)) + (> (rect-top h) 284.0)) (remove-bullet bullets i) (loop i)) ((and (= (vec2-x v) 0.0) diff --git a/bonnie-bee/game.scm b/bonnie-bee/game.scm index 4d02490..18b177b 100644 --- a/bonnie-bee/game.scm +++ b/bonnie-bee/game.scm @@ -90,7 +90,7 @@ #:end-color (make-color 1.0 1.0 1.0 0.0))) (make <bullets> #:name 'bullets - #:rank 3 + #:rank 4 #:quadtree (quadtree game)) (make <shadow-label> #:name 'hud-lives @@ -453,7 +453,7 @@ (when (< i 8) (let* ((arc-start (- (* pi 1.5) 0.2)) (arc-end (+ (* pi 1.5) 0.2)) - (n 8) + (n 9) (arc-step (/ (- arc-end arc-start) n)) (speed 1.9)) (audio-play (asset-ref enemy-shoot-sound)) @@ -474,7 +474,6 @@ (unless (getenv "SKIP_WAVE3") (spawn-moth (vec2 (* %game-width 0.5) (+ %game-height 16.0))) (spawn-flower (* %game-width 0.125)) - (spawn-flower (* %game-width 0.875)) (sleep 4.0) (spawn-moth (vec2 (* %game-width 0.25) (+ %game-height 16.0))) (spawn-flower (* %game-width 0.375)) @@ -509,6 +508,10 @@ ;; Boss (unless (getenv "SKIP_BOSS") (run-script game + (repeat 8 + (audio-play (asset-ref alarm-sound)) + (sleep 1.0))) + (run-script game (let ((warning (make <shadow-label> #:name 'warning #:rank 9 @@ -533,7 +536,8 @@ (tween 1.0 15.0 0.0 (lambda (speed) (change-scroll-speed game speed))) - (wait-until (dead? (& game boss)))) + (wait-until (dead? (& game boss))) + (clear-bullets (bullets game))) ;; Victory! (set! (invincible? (player game)) #t) (add-to-score (player game) (* (lives (player game)) 50000)) @@ -556,7 +560,7 @@ (spawn game (make <player> #:name 'player - #:rank 4 + #:rank 3 #:position (vec2 (/ %game-width 2.0) 20.0) #:hitbox (make-rect -0.5 -0.5 1.0 1.0))) (run-level game)) @@ -654,11 +658,13 @@ (if (paused? game) (begin (detach (& game pause-overlay)) + (source-play (music-source game)) (resume game)) (let ((overlay (make <node-2d> #:name 'pause-overlay #:rank 99))) (pause game) + (source-pause (music-source game)) (attach-to overlay (make <sprite> #:texture darkness-image @@ -673,6 +679,7 @@ (attach-to game overlay)))) (define-method (play-again (game <game>)) + (change-state game 'play-again) (run-script game (tween 0.5 1.0 0.0 (lambda (volume) @@ -683,6 +690,12 @@ (fade-out game 1.0) (reset-game game))) +(define-method (close-game (game <game>)) + (pop-scene (current-kernel))) + +(define-method (on-quit (game <game>)) + (close-game game)) + (define-method (on-key-press (game <game>) key modifiers repeat?) (case (state game) ((play) @@ -699,20 +712,20 @@ (set! (shoot? (player game)) #t)) ((x) (bomb (player game))) - ((q) - (pop-scene (current-kernel))) + ((escape) + (close-game game)) ((return) (toggle-pause game)))) ((intro) (case key - ((q) - (pop-scene (current-kernel))) + ((escape) + (close-game game)) ((return) (toggle-pause game)))) ((game-over game-complete) (case key - ((q) - (pop-scene (current-kernel))) + ((escape) + (close-game game)) ((return) (play-again game)))))) diff --git a/bonnie-bee/player.scm b/bonnie-bee/player.scm index f990657..1a524e7 100644 --- a/bonnie-bee/player.scm +++ b/bonnie-bee/player.scm @@ -6,6 +6,7 @@ #:use-module (bonnie-bee flower) #:use-module (chickadee audio) #:use-module (chickadee game-loop) + #:use-module (chickadee graphics particles) #:use-module (chickadee math) #:use-module (chickadee math vector) #:use-module (chickadee scripting) @@ -116,6 +117,9 @@ (set! (pollen player) 0) (set! (invincible? player) #t) (audio-play (asset-ref player-death-sound)) + (add-particle-emitter (particles (particles (parent player))) + (make-particle-emitter (world-hitbox player) + 10 5)) (run-script player (blink player 20 (steps 5)) (set! (invincible? player) #f)))) diff --git a/bonnie-bee/splash.scm b/bonnie-bee/splash.scm index 98239d6..7059f91 100644 --- a/bonnie-bee/splash.scm +++ b/bonnie-bee/splash.scm @@ -14,16 +14,22 @@ (define-class <splash> (<scene-2d>)) -(define %text-color (rgb #xfee761)) +(define %text-color (rgb #x181425)) (define-method (on-boot (splash <splash>)) (set-cameras! splash) (attach-to splash (make <sprite> - #:texture darkness-image) + #:texture lightness-image) + (make <sprite> + #:texture chickadee-image + #:position (vec2 (/ %game-width 2.0) + (/ %game-height 2.0)) + #:origin (vec2 8.0 8.0) + #:scale (vec2 4.0 4.0)) (make <label> #:rank 1 - #:position (vec2 (/ %game-width 2.0) 120.0) + #:position (vec2 (/ %game-width 2.0) 70.5) #:font monogram-font #:color %text-color #:align 'center @@ -31,7 +37,7 @@ #:text "Made with Chickadee") (make <label> #:rank 1 - #:position (vec2 (/ %game-width 2.0) 100.0) + #:position (vec2 (/ %game-width 2.0) 50.5) #:font monogram-font #:color %text-color #:align 'center diff --git a/bundle.scm b/bundle.scm new file mode 100644 index 0000000..54d8035 --- /dev/null +++ b/bundle.scm @@ -0,0 +1,5 @@ +'((asset-directories . ("assets/fonts" "assets/images" "assets/sounds")) + (bundle-name . "bonnie-bee-0.1") + (code . "bonnie-bee.scm") + (ignore-files . ("\\.xcf$" "\\.xm$")) + (launcher-name . "bonnie-bee")) |