diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-10-28 22:08:54 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-10-28 22:08:54 -0400 |
commit | 1ce62a60d6da7588a0bf26329fd2cc831241fc19 (patch) | |
tree | 026f1e8ad617e0f737b3a7a850a477007db61b5b | |
parent | d2dd26e7629d2925a096556cc0dcd2be6a8e2b91 (diff) |
Boss placeholder, pre-boss WARNING message.
-rw-r--r-- | game.scm | 26 | ||||
-rw-r--r-- | images/boss.ase | bin | 899 -> 2032 bytes | |||
-rw-r--r-- | images/boss.png | bin | 899 -> 2354 bytes | |||
-rw-r--r-- | level.tmx | 3 |
4 files changed, 25 insertions, 4 deletions
@@ -737,6 +737,7 @@ (duration (or (assq-ref properties 'duration) 0))) (when speed (change-scroll-speed speed duration)))) + ('warning (do-warning)) (_ #t))) (define max-scroll (- (* (level-height level) tile-height) game-height)) (define (level-update! level) @@ -1013,9 +1014,9 @@ (define (spawn-boss x y) (spawn-enemy - (make-enemy 'boss 300 (vec2 x y) (vec2 100.0 40.0) - (vec2 0.0 0.0) #f 1000000 - #(0.0 0.0 0.0 0.0) image:boss (vec2 120.0 80.0)))) + (make-enemy 'boss 300 (vec2 x y) (vec2 144.0 50.0) + (vec2 0.0 0.0) #f 500000 + #(0.0 0.0 0.0 0.0) image:boss (vec2 144.0 96.0)))) ;; Player state: (define player-position (vec2 (/ game-width 2.0) (- game-height 12.0))) @@ -1271,6 +1272,18 @@ (set! *canvas-width* (* game-width *canvas-scale*)) (set! *canvas-height* (* game-height *canvas-scale*)))) + ;; Boss warning message state + (define *show-warning?* #f) + (define (do-warning) + (run-script + (lambda () + (do ((i 0 (+ i 1))) + ((= i 10)) + (set! *show-warning?* #t) + (wait 15) + (set! *show-warning?* #f) + (wait 15))))) + (define (clear-screen) (clear-rect context 0.0 0.0 *canvas-width* *canvas-height*)) @@ -1323,6 +1336,13 @@ (draw-enemies enemies time) (draw-player) (draw-enemy-bullets) + (when *show-warning?* + (set-fill-color! context "#d27d2c") + (set-text-align! context "center") + (set-font! context "bold 72px monogram") + (fill-text context "WARNING" + (/ game-width 2.0) + (/ game-height 2.0))) (draw-hud)) (define (draw-pause time) diff --git a/images/boss.ase b/images/boss.ase Binary files differindex 2cd8f96..70b2ee5 100644 --- a/images/boss.ase +++ b/images/boss.ase diff --git a/images/boss.png b/images/boss.png Binary files differindex 17c2b22..0b1ab82 100644 --- a/images/boss.png +++ b/images/boss.png @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<map version="1.8" tiledversion="1.8.6" orientation="orthogonal" renderorder="right-down" width="15" height="500" tilewidth="16" tileheight="16" infinite="0" nextlayerid="8" nextobjectid="257"> +<map version="1.8" tiledversion="1.8.6" orientation="orthogonal" renderorder="right-down" width="15" height="500" tilewidth="16" tileheight="16" infinite="0" nextlayerid="8" nextobjectid="258"> <tileset firstgid="1" source="tiles.tsx"/> <tileset firstgid="7" source="background.tsx"/> <objectgroup id="7" name="background" visible="0" parallaxy="0.75"> @@ -1227,5 +1227,6 @@ <object id="225" type="popcorn" x="48" y="2160" width="16" height="16"/> <object id="226" type="popcorn" x="48" y="2064" width="16" height="16"/> <object id="256" type="turret" x="96" y="7712" width="16" height="16"/> + <object id="257" type="warning" x="0" y="224" width="16" height="16"/> </objectgroup> </map> |