summaryrefslogtreecommitdiff
path: root/bonnie-bee
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2021-10-23 17:09:34 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2021-10-23 17:09:34 -0400
commit3fc18437f905f18aa4bf3b688930dbc68f8721b3 (patch)
treee14a25532309c88e2a33d5a7641f381a69733966 /bonnie-bee
parentfb31282c18f33acb6de24e604059df6d05477491 (diff)
Lots of tweaks and also sprite animations!
Diffstat (limited to 'bonnie-bee')
-rw-r--r--bonnie-bee/actor.scm4
-rw-r--r--bonnie-bee/assets.scm24
-rw-r--r--bonnie-bee/boss.scm11
-rw-r--r--bonnie-bee/bullet.scm2
-rw-r--r--bonnie-bee/common.scm27
-rw-r--r--bonnie-bee/flower.scm28
-rw-r--r--bonnie-bee/game.scm96
-rw-r--r--bonnie-bee/moth.scm9
-rw-r--r--bonnie-bee/player.scm39
-rw-r--r--bonnie-bee/popcorn.scm9
-rw-r--r--bonnie-bee/splash.scm32
-rw-r--r--bonnie-bee/turret.scm9
12 files changed, 205 insertions, 85 deletions
diff --git a/bonnie-bee/actor.scm b/bonnie-bee/actor.scm
index 90938c8..8aec98a 100644
--- a/bonnie-bee/actor.scm
+++ b/bonnie-bee/actor.scm
@@ -29,7 +29,8 @@
<grounded>
player
bullets
- scroll-speed))
+ scroll-speed
+ spawn))
(define-class <actor> (<node-2d>)
(velocity #:getter velocity #:init-keyword #:velocity #:init-form (vec2 0.0 0.0))
@@ -149,3 +150,4 @@
(define-generic player)
(define-generic bullets)
+(define-generic spawn)
diff --git a/bonnie-bee/assets.scm b/bonnie-bee/assets.scm
index 3542043..7c96307 100644
--- a/bonnie-bee/assets.scm
+++ b/bonnie-bee/assets.scm
@@ -7,13 +7,14 @@
monogram-font
background-image
particle-image
+ darkness-image
bee-atlas
bullet-atlas
- popcorn-image
- flower-image
- turret-image
- moth-image
- beetle-image
+ popcorn-atlas
+ flower-atlas
+ turret-atlas
+ moth-atlas
+ beetle-atlas
explosion-sound
pickup-sound
enemy-shoot-sound
@@ -22,6 +23,7 @@
player-shoot-sound
player-bomb-sound
pollen-release-sound
+ hehehe-sound
intro-music
main-music))
@@ -33,13 +35,14 @@
(define-asset monogram-font (load-font (scope-datadir "assets/fonts/monogram_extended.ttf") 12))
(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 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-image (load-image (scope-datadir "assets/images/flower.png")))
-(define-asset popcorn-image (load-image (scope-datadir "assets/images/popcorn.png")))
-(define-asset turret-image (load-image (scope-datadir "assets/images/flower-turret.png")))
-(define-asset moth-image (load-image (scope-datadir "assets/images/moth.png")))
-(define-asset beetle-image (load-image (scope-datadir "assets/images/beetle.png")))
+(define-asset flower-atlas (load-tileset (scope-datadir "assets/images/flower.png") 64 64))
+(define-asset popcorn-atlas (load-tileset (scope-datadir "assets/images/popcorn.png") 32 32))
+(define-asset turret-atlas (load-tileset (scope-datadir "assets/images/turret.png") 64 64))
+(define-asset moth-atlas (load-tileset (scope-datadir "assets/images/moth.png") 64 64))
+(define-asset beetle-atlas (load-tileset (scope-datadir "assets/images/beetle.png") 128 64))
(define-asset explosion-sound (load-audio (scope-datadir "assets/sounds/explosion.wav")))
(define-asset pickup-sound (load-audio (scope-datadir "assets/sounds/pickup.wav")))
(define-asset enemy-shoot-sound (load-audio (scope-datadir "assets/sounds/enemy-shoot.wav")))
@@ -48,5 +51,6 @@
(define-asset player-shoot-sound (load-audio (scope-datadir "assets/sounds/player-shoot.wav")))
(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 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/boss.scm b/bonnie-bee/boss.scm
index 885f0bc..e312d4e 100644
--- a/bonnie-bee/boss.scm
+++ b/bonnie-bee/boss.scm
@@ -21,9 +21,12 @@
(define-method (on-boot (boss <boss>))
(attach-to boss
- (make <sprite>
- #:texture beetle-image
- #:origin (vec2 64.0 32.0))))
+ (make <animated-sprite>
+ #:atlas beetle-atlas
+ #:origin (vec2 64.0 32.0)
+ #:animations `((default . ,(make <animation>
+ #:frames #(0 1)
+ #:frame-duration 0.4))))))
(define-method (on-enter (boss <boss>))
(define (circle-shot n offset speed type)
@@ -51,13 +54,13 @@
(little-speed 1.0))
(while (> (health boss) 800)
(let ((d (direction-to boss (player (parent boss)))))
+ (audio-play (asset-ref enemy-shoot-sound))
(add-bullet (bullets (parent boss))
large-enemy-bullet
(position boss)
(vec2* d big-speed))
(let loop ((i 0))
(when (< i 16)
- (audio-play (asset-ref enemy-shoot-sound))
(random-shot little-speed)
(sleep (* (current-timestep) 2.0))
(loop (+ i 1)))))))
diff --git a/bonnie-bee/bullet.scm b/bonnie-bee/bullet.scm
index 1ec40b5..758ff5a 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) 256.0))
+ (> (rect-top h) 272.0))
(remove-bullet bullets i)
(loop i))
((and (= (vec2-x v) 0.0)
diff --git a/bonnie-bee/common.scm b/bonnie-bee/common.scm
index 75a6bc4..885ab33 100644
--- a/bonnie-bee/common.scm
+++ b/bonnie-bee/common.scm
@@ -1,17 +1,22 @@
(define-module (bonnie-bee common)
+ #:use-module (bonnie-bee assets)
#:use-module (chickadee game-loop)
#:use-module (chickadee graphics color)
#:use-module (chickadee graphics viewport)
#:use-module (chickadee math vector)
+ #:use-module (chickadee scripting)
#:use-module (oop goops)
#:use-module (starling scene)
+ #:use-module (starling node)
#:use-module (starling node-2d)
#:export (%window-width
%window-height
%game-width
%game-height
set-cameras!
- steps))
+ steps
+ fade-in
+ fade-out))
(define %window-width 960)
(define %window-height 720)
@@ -27,3 +32,23 @@
(define (steps n)
(* n (current-timestep)))
+
+(define-method (fade-in (scene <scene-2d>) duration)
+ (let ((bg (make <sprite>
+ #:rank 999
+ #:texture darkness-image)))
+ (attach-to scene bg)
+ (tween duration 1.0 0.0
+ (lambda (a)
+ (set! (tint bg) (transparency a))))
+ (detach bg)))
+
+(define-method (fade-out (scene <scene-2d>) duration)
+ (let ((bg (make <sprite>
+ #:rank 999
+ #:texture darkness-image)))
+ (attach-to scene bg)
+ (tween duration 0.0 1.0
+ (lambda (a)
+ (set! (tint bg) (transparency a))))
+ (detach bg)))
diff --git a/bonnie-bee/flower.scm b/bonnie-bee/flower.scm
index 13d8c10..5e9eb12 100644
--- a/bonnie-bee/flower.scm
+++ b/bonnie-bee/flower.scm
@@ -21,6 +21,8 @@
(define-class <flower> (<grounded> <damageable> <actor>)
(emit-pollen? #:allocation #:class #:init-value #f))
+(define-class <pollinated-flower> (<grounded> <actor>))
+
(define (pollen-enabled?)
(class-slot-ref <flower> 'emit-pollen?))
@@ -32,9 +34,19 @@
(define-method (on-boot (flower <flower>))
(attach-to flower
- (make <sprite>
- #:texture flower-image
- #:origin (vec2 32.0 32.0))))
+ (make <animated-sprite>
+ #:atlas flower-atlas
+ #:origin (vec2 32.0 32.0)
+ #:animations `((default . ,(make <animation>
+ #:frames #(0 1 0 2)
+ #:frame-duration .45))))))
+
+(define-method (on-boot (flower <pollinated-flower>))
+ (attach-to flower
+ (make <atlas-sprite>
+ #:atlas flower-atlas
+ #:origin (vec2 32.0 32.0)
+ #:index 3)))
(define-method (on-collide (flower <flower>) (bullet <bullet>))
(cond
@@ -56,12 +68,18 @@
(begin
(audio-play (asset-ref pollen-release-sound))
(for-range ((i 16))
- (let ((theta (- (* (random:uniform) (/ pi -2.0)) (/ pi 4.0)))
+ (let ((theta (- (* (- (random:uniform) 0.5) (/ pi 3.0))
+ (/ pi 2.0)))
(speed (+ (* (random:uniform) 1.0) 1.0)))
(add-bullet (bullets (parent flower))
pollen-pickup p
(vec2 (* (cos theta) speed)
- (* (sin theta) speed))))))
+ (* (sin theta) speed)))))
+ (spawn (parent flower)
+ (make <pollinated-flower>
+ #:rank 1
+ #:position (position flower)
+ #:hitbox (make-rect -1.0 -1.0 2.0 2.0))))
(begin
(audio-play (asset-ref explosion-sound))
(add-particle-emitter (particles (particles (parent flower)))
diff --git a/bonnie-bee/game.scm b/bonnie-bee/game.scm
index feb395e..b868cd2 100644
--- a/bonnie-bee/game.scm
+++ b/bonnie-bee/game.scm
@@ -85,7 +85,9 @@
#:texture background-image)
(make <particles>
#:name 'particles
- #:particles (make-particles 2048 #:texture (asset-ref particle-image)))
+ #:particles (make-particles 2048
+ #:texture (asset-ref particle-image)
+ #:end-color (make-color 1.0 1.0 1.0 0.0)))
(make <bullets>
#:name 'bullets
#:rank 3
@@ -185,18 +187,20 @@
(sleep 2.0))
(detach l)))
(run-script game
+ (fade-in game 1.0))
+ (run-script game
(unless (getenv "SKIP_INTRO")
;; Intro
(let ((popcorn (make-popcorn (vec2 (/ %game-width 2.0) (+ %game-height 16.0))))
(bullet-speed 5.0)
- (flower-1 (make-flower (vec2 174.0 227.0)))
- (flower-2 (make-flower (vec2 50.0 226.0)))
+ (flower-1 (make-flower (vec2 194.0 210.0)))
+ (flower-2 (make-flower (vec2 50.0 206.0)))
(flower-3 (make-flower (vec2 280.0 201.0)))
(flower-4 (make-flower (vec2 121.0 197.0)))
- (flower-5 (make-flower (vec2 54.0 134.0)))
- (flower-6 (make-flower (vec2 150.0 121.0)))
- (flower-7 (make-flower (vec2 256.0 131.0)))
- (flower-8 (make-flower (vec2 307.0 109.0))))
+ (flower-5 (make-flower (vec2 58.0 134.0)))
+ (flower-6 (make-flower (vec2 145.0 135.0)))
+ (flower-7 (make-flower (vec2 220.0 151.0)))
+ (flower-8 (make-flower (vec2 290.0 129.0))))
(define (shoot-at flower)
(audio-play (asset-ref enemy-shoot-sound))
(add-bullet (bullets game)
@@ -204,7 +208,6 @@
(position popcorn)
(vec2* (direction-to popcorn flower) bullet-speed)))
(change-state game 'intro)
- (play-music game intro-music)
(spawn game flower-1)
(spawn game flower-2)
(spawn game flower-3)
@@ -214,13 +217,13 @@
(spawn game flower-7)
(spawn game flower-8)
(spawn game (make-flower (vec2 194.0 95.0)))
- (spawn game (make-flower (vec2 102.0 76.0)))
- (spawn game (make-flower (vec2 26.0 58.0)))
+ (spawn game (make-flower (vec2 102.0 82.0)))
(spawn game (make-flower (vec2 247.0 45.0)))
- (spawn game (make-flower (vec2 169.0 12.0)))
- (spawn game (make-flower (vec2 53.0 7.0)))
- (teleport (player game) 169.0 12.0)
- (sleep 0.6)
+ (spawn game (make-flower (vec2 159.0 40.0)))
+ (spawn game (make-flower (vec2 73.0 28.0)))
+ (teleport (player game) 159.0 40.0)
+ (play-music game intro-music)
+ (sleep 1.0)
(audio-play (asset-ref pollen-release-sound))
(sleep 0.6)
(move-to (player game) 247.0 45.0 1.0)
@@ -238,8 +241,9 @@
(source-stop (music-source game))
(spawn game popcorn)
(change-velocity popcorn 0.0 -1.0)
- (sleep 1.5)
- (change-velocity popcorn 0.0 0.0)
+ (tween 2.4 -1.0 0.0
+ (lambda (dy)
+ (change-velocity popcorn 0.0 dy)))
(shoot-at flower-1)
(sleep 0.3)
(shoot-at flower-2)
@@ -248,15 +252,19 @@
(sleep 0.3)
(shoot-at flower-4)
(sleep 0.3)
- (shoot-at flower-5)
- (sleep 0.3)
- (shoot-at flower-6)
+ (shoot-at flower-8)
(sleep 0.3)
(shoot-at flower-7)
(sleep 0.3)
- (shoot-at flower-8)
- (sleep 2.0)
- (change-velocity popcorn 0.0 1.5)
+ (shoot-at flower-6)
+ (sleep 0.3)
+ (shoot-at flower-5)
+ (sleep 1.0)
+ (audio-play (asset-ref hehehe-sound))
+ (sleep 1.0)
+ (tween 0.5 0.0 1.5
+ (lambda (dy)
+ (change-velocity popcorn 0.0 dy)))
(sleep 1.0)))
(enable-pollen!)
(change-state game 'play)
@@ -318,7 +326,6 @@
(vec2 -2.0 2.0) 0.2)
(sleep 3.0))
;; Wave 2
- ;; kamikaze popcorn, turrets, more flowers
(define (spawn-turret x)
(spawn game (make-turret (vec2 x (+ %game-height 32.0)))))
(define (shoot-down enemy)
@@ -393,9 +400,16 @@
(spawn-flower 153.0)
(sleep 1.0)
(spawn-turret 209.0)
+ (sleep 1.0)
(popcorn-line 10 (vec2 (+ %game-width 16.0) 200.0)
(vec2 -3.0 -0.5) 0.2)
- (sleep 8.0)
+ (sleep 1.0)
+ (popcorn-line 10 (vec2 -16.0 200.0)
+ (vec2 3.0 -0.5) 0.2)
+ (sleep 1.0)
+ (popcorn-line 10 (vec2 (+ %game-width 16.0) 200.0)
+ (vec2 -3.0 -0.5) 0.2)
+ (sleep 1.0)
(run-script game
(spawn-turret (* %game-width 0.25))
(sleep 2.0)
@@ -408,7 +422,8 @@
(spawn-turret (* %game-width 0.25)))
(repeat 100
(let ((popcorn (make-popcorn (vec2 (+ (/ %game-width 2.0)
- (* (/ %game-width 4.0) (- (random:uniform) 0.5)))
+ (* (/ %game-width 4.0)
+ (- (random:uniform) 0.5)))
(+ %game-height 16.0))
(vec2 0.0 -2.0))))
(spawn game popcorn)
@@ -424,7 +439,6 @@
(sleep 0.1))
(sleep 8.0))
;; Wave 3
- ;; moths, more turrets, more flowers
(define (spawn-moth p)
(let ((moth (make-moth p)))
(spawn game moth)
@@ -490,23 +504,21 @@
(spawn-moth (vec2 (* %game-width 0.25) (+ %game-height 16.0)))
(spawn-moth (vec2 (* %game-width 0.5) (+ %game-height 16.0)))
(spawn-moth (vec2 (* %game-width 0.75) (+ %game-height 16.0)))
- (sleep 6.0))
+ (sleep 14.0))
;; Boss
- (tween 1.0 15.0 0.0
- (lambda (speed)
- (change-scroll-speed game speed)))
(unless (getenv "SKIP_BOSS")
- (let ((boss (make <boss>
+ (spawn game (make <boss>
#:name 'boss
#:rank 2
- #:position (vec2 (/ %game-width 2.0) (+ %game-height 32.0))
+ #:position (vec2 (/ %game-width 2.0)
+ (+ %game-height 32.0))
#:hitbox (make-rect -64.0 -32.0 128.0 64.0)
#:health 1200
- #:points 100000)))
- (spawn game boss)
- (change-velocity boss 0.0 -1.0)
- (sleep 1.4)
- (change-velocity boss 0.0 0.0))
+ #:points 100000))
+ (sleep 4.5)
+ (tween 1.0 15.0 0.0
+ (lambda (speed)
+ (change-scroll-speed game speed)))
(wait-until (dead? (& game boss))))
;; Victory!
(set! (invincible? (player game)) #t)
@@ -538,7 +550,6 @@
(reset-game game))
(define-method (game-complete (game <game>))
- (hide (& game hud-lives))
(hide (& game hud-pollen))
(tween 1.0 1.0 0.0
(lambda (volume)
@@ -647,7 +658,14 @@
((q)
(pop-scene (current-kernel)))
((return)
- (reset-game game))))
+ (run-script game
+ (tween 1.0 1.0 0.0
+ (lambda (volume)
+ (set-source-volume! (music-source game) volume)))
+ (source-stop (music-source game)))
+ (run-script game
+ (fade-out game 1.0)
+ (reset-game game)))))
((intro)
(case key
((q)
diff --git a/bonnie-bee/moth.scm b/bonnie-bee/moth.scm
index 8f4ed5f..bcd165b 100644
--- a/bonnie-bee/moth.scm
+++ b/bonnie-bee/moth.scm
@@ -19,9 +19,12 @@
(define-method (on-boot (moth <moth>))
(attach-to moth
- (make <sprite>
- #:texture moth-image
- #:origin (vec2 32.0 32.0))))
+ (make <animated-sprite>
+ #:atlas moth-atlas
+ #:origin (vec2 32.0 32.0)
+ #:animations `((default . ,(make <animation>
+ #:frames #(0 1 0 2)
+ #:frame-duration .1))))))
(define-method (on-collide (moth <moth>) (bullet <bullet>))
(cond
diff --git a/bonnie-bee/player.scm b/bonnie-bee/player.scm
index 0d7f1e0..f990657 100644
--- a/bonnie-bee/player.scm
+++ b/bonnie-bee/player.scm
@@ -32,8 +32,8 @@
(define %max-pollen 50)
(define-class <player> (<actor>)
- (move-left? #:accessor move-left? #:init-value #f)
- (move-right? #:accessor move-right? #:init-value #f)
+ (move-left? #:accessor move-left? #:init-value #f #:watch? #t)
+ (move-right? #:accessor move-right? #:init-value #f #:watch? #t)
(move-down? #:accessor move-down? #:init-value #f)
(move-up? #:accessor move-up? #:init-value #f)
(shoot? #:accessor shoot? #:init-value #f #:watch? #t)
@@ -48,16 +48,43 @@
(define-method (on-boot (player <player>))
(attach-to player
- (make <atlas-sprite>
+ (make <animated-sprite>
+ #:name 'sprite
#:atlas bee-atlas
- #:index 12
- #:origin (vec2 16.0 16.0))))
+ #:origin (vec2 16.0 16.0)
+ #:animations `((default . ,(make <animation>
+ #:frames #(0 1)
+ #:frame-duration 0.05))
+ (move-left . ,(make <animation>
+ #:frames #(2 3)
+ #:frame-duration 0.05))
+ (move-right . ,(make <animation>
+ #:frames #(4 5)
+ #:frame-duration 0.05))
+ (idle . ,(make <animation>
+ #:frames #(0 1)
+ #:frame-duration 0.75))))))
+
+(define-method (update-animation (player <player>))
+ (change-animation (& player sprite)
+ (cond
+ ((and (move-left? player)
+ (not (move-right? player)))
+ 'move-left)
+ ((and (not (move-left? player))
+ (move-right? player))
+ 'move-right)
+ (else
+ 'default))))
(define-method (on-change (player <player>) slot-name old new)
(case slot-name
((shoot?)
(when (and new (not (and old new)))
- (set! (last-shot player) 0)))))
+ (set! (last-shot player) 0)))
+ ((move-left? move-right?)
+ (unless (eq? old new)
+ (update-animation player)))))
(define-method (after-move (player <player>))
(let ((p (position player)))
diff --git a/bonnie-bee/popcorn.scm b/bonnie-bee/popcorn.scm
index 8c70326..594e88c 100644
--- a/bonnie-bee/popcorn.scm
+++ b/bonnie-bee/popcorn.scm
@@ -19,9 +19,12 @@
(define-method (on-boot (popcorn <popcorn>))
(attach-to popcorn
- (make <sprite>
- #:texture popcorn-image
- #:origin (vec2 16.0 16.0))))
+ (make <animated-sprite>
+ #:atlas popcorn-atlas
+ #:origin (vec2 16.0 16.0)
+ #:animations `((default . ,(make <animation>
+ #:frames #(0 1)
+ #:frame-duration .25))))))
(define-method (on-collide (popcorn <popcorn>) (bullet <bullet>))
(if (player-bullet? bullet)
diff --git a/bonnie-bee/splash.scm b/bonnie-bee/splash.scm
index 3b8fba6..98239d6 100644
--- a/bonnie-bee/splash.scm
+++ b/bonnie-bee/splash.scm
@@ -14,23 +14,37 @@
(define-class <splash> (<scene-2d>))
+(define %text-color (rgb #xfee761))
+
(define-method (on-boot (splash <splash>))
(set-cameras! splash)
(attach-to splash
+ (make <sprite>
+ #:texture darkness-image)
+ (make <label>
+ #:rank 1
+ #:position (vec2 (/ %game-width 2.0) 120.0)
+ #:font monogram-font
+ #:color %text-color
+ #:align 'center
+ #:vertical-align 'center
+ #:text "Made with Chickadee")
(make <label>
- #:name 'label
- #:font chonkly-font
- #:color black
+ #:rank 1
+ #:position (vec2 (/ %game-width 2.0) 100.0)
+ #:font monogram-font
+ #:color %text-color
#:align 'center
#:vertical-align 'center
- #:position (vec2 (/ %game-width 2.0) (/ %game-height 2.0)))))
+ #:text "https://dthompson.us/projects/chickadee.html")))
(define-method (on-enter (splash <splash>))
- (unless (getenv "SKIP_SPLASH")
- (run-script splash
- (set! (text (& splash label)) "made with chickadee")
- (sleep 0.5)
- (replace-scene (current-kernel) (make <game>)))))
+ (run-script splash
+ (unless (getenv "SKIP_SPLASH")
+ (fade-in splash 1.0)
+ (sleep 1.0)
+ (fade-out splash 1.0))
+ (replace-scene (current-kernel) (make <game>))))
(define (launch-game)
(boot-kernel (make <kernel>
diff --git a/bonnie-bee/turret.scm b/bonnie-bee/turret.scm
index 9474c65..5aae796 100644
--- a/bonnie-bee/turret.scm
+++ b/bonnie-bee/turret.scm
@@ -19,9 +19,12 @@
(define-method (on-boot (turret <turret>))
(attach-to turret
- (make <sprite>
- #:texture turret-image
- #:origin (vec2 32.0 32.0))))
+ (make <animated-sprite>
+ #:atlas turret-atlas
+ #:origin (vec2 32.0 32.0)
+ #:animations `((default . ,(make <animation>
+ #:frames #(0 1 2 3)
+ #:frame-duration .15))))))
(define-method (on-collide (turret <turret>) (bullet <bullet>))
(cond