فهرست منبع

tweeked game balance

Tim Strasser 2 سال پیش
والد
کامیت
136adfd022
2فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 5 4
      includes/missile.c
  2. 1 1
      includes/missile.h

+ 5 - 4
includes/missile.c

@@ -59,16 +59,17 @@ void draw_missiles(const MISSILE* missiles, Canvas* const canvas, const GameSpri
 bool missile_colides(MISSILE* const missile, BARRY* const barry) {
     return !(
         barry->point.x >
-            missile->point.x + MISSILE_WIDTH - 10 || // Barry is to the right of the missile
-        barry->point.x + BARRY_WIDTH < missile->point.x || // Barry is to the left of the missile
-        barry->point.y > missile->point.y + MISSILE_WIDTH || // Barry is below the missile
+            missile->point.x + MISSILE_WIDTH - 14 || // Barry is to the right of the missile
+        barry->point.x + BARRY_WIDTH - 3 <
+            missile->point.x || // Barry is to the left of the missile
+        barry->point.y > missile->point.y + MISSILE_HEIGHT || // Barry is below the missile
         barry->point.y + BARRY_HEIGHT < missile->point.y); // Barry is above the missile
 }
 
 int get_rocket_spawn_distance(int player_distance) {
     // Define the start and end points for rocket spawn distance
     int start_distance = 256;
-    int end_distance = 32;
+    int end_distance = 24;
 
     // Define the maximum player distance at which the spawn distance should be at its minimum
     int max_player_distance = 5000; // Adjust this value based on your game's difficulty curve

+ 1 - 1
includes/missile.h

@@ -8,7 +8,7 @@
 #include "point.h"
 #include "barry.h"
 
-#define MISSILES_MAX 3
+#define MISSILES_MAX 5
 
 typedef struct {
     POINT point;