summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game.scm15
-rw-r--r--images/map.asebin1090 -> 1096 bytes
-rw-r--r--images/map.pngbin401 -> 452 bytes
-rw-r--r--level.tmx14
4 files changed, 15 insertions, 14 deletions
diff --git a/game.scm b/game.scm
index 30e04fb..7d8a6a3 100644
--- a/game.scm
+++ b/game.scm
@@ -688,7 +688,8 @@
(cond
((or (enemy-dead? enemy)
(enemy-out-of-bounds? enemy))
- (sound-effect-play sound:explosion)
+ (when (enemy-dead? enemy)
+ (sound-effect-play sound:explosion))
(enemy-pool-remove! pool i)
(loop i (- k 1)))
(else
@@ -1032,12 +1033,12 @@
(let ((x* (- x (/ w 2.0)))
(y* (- y(/ h 2.0))))
(or (out-of-bounds? x* y* w h)
- (rect-collides-with-level? level x* y* w h)
- ;; (if (rect-collides-with-level? level x* y* w h)
- ;; (begin
- ;; (sound-effect-play sound:bullet-hit 0.1)
- ;; #t)
- ;; #f)
+ ;; (rect-collides-with-level? level x* y* w h)
+ (if (rect-collides-with-level? level x* y* w h)
+ (begin
+ (sound-effect-play sound:bullet-hit 0.01)
+ #t)
+ #f)
(if (rect-within? x y w h
(vec2-x player-hitbox-position)
(vec2-y player-hitbox-position)
diff --git a/images/map.ase b/images/map.ase
index 81fed57..8985475 100644
--- a/images/map.ase
+++ b/images/map.ase
Binary files differ
diff --git a/images/map.png b/images/map.png
index 5338adf..58f01d7 100644
--- a/images/map.png
+++ b/images/map.png
Binary files differ
diff --git a/level.tmx b/level.tmx
index c16eb72..94b5628 100644
--- a/level.tmx
+++ b/level.tmx
@@ -58,17 +58,17 @@
1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,
1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,
1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,
-1,1,1,1,1,1,1,0,0,0,0,3,1,1,1,
-1,1,1,1,1,1,0,0,0,0,3,1,1,1,1,
-1,1,1,1,1,0,0,0,0,3,1,1,1,1,1,
+1,1,1,1,1,1,1,5,0,0,0,3,1,1,1,
+1,1,1,1,1,1,5,0,0,0,3,1,1,1,1,
+1,1,1,1,1,5,0,0,0,3,1,1,1,1,1,
1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,
1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,
1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,
1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,
-1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,
-1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,
-1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,
-1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,
+1,1,1,1,5,0,0,0,0,4,1,1,1,1,1,
+1,1,1,5,0,0,0,0,0,0,4,1,1,1,1,
+1,1,5,0,0,0,0,0,0,0,0,4,1,1,1,
+1,5,0,0,0,0,0,0,0,0,0,0,4,1,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,