From 0cbc6cbfc7439e413cbd18dd72509a6ef42703db Mon Sep 17 00:00:00 2001 From: Conor Edmonds Date: Thu, 4 Jun 2026 17:29:47 -0400 Subject: [PATCH] changing map size --- Art/tile_set.png | Bin 628 -> 735 bytes Globals.cs | 1 + PlayArea.tscn | 689 ++++++----------------------------------------- Tower.cs | 74 ++--- attack.tscn | 4 +- enemy.tscn | 4 +- main.tscn | 6 +- 7 files changed, 124 insertions(+), 654 deletions(-) diff --git a/Art/tile_set.png b/Art/tile_set.png index 8905a209fce7890707ac6b8aff248e455e8b8952..c88cc02373df590e07f63c28f77019d6917d9421 100644 GIT binary patch delta 276 zcmeyua-UVPGr-TCmrII^fq{Y7)59eQNS^@W01hS~d6|Fh^Nos|897))1@&j1=}(+| zhf$;cn5TMC2mSpsZd_Oeamo&RK7q^joGx$}AbmKlAI zP|#^<-QWeo-U3d5r^MiU&wpFfQRLPh4*%oV0J6+DK;9XY`3M(?b+uxgYWt4=dJI$o;}~8 ya{w9Kf4lkcp{SRQ8}iq`Ij~z^o(&oJ6*Ks_@+_*2|BwN+oWax8&t;ucLK6UF&OMd@ diff --git a/Globals.cs b/Globals.cs index 6d884a4..f650a9f 100644 --- a/Globals.cs +++ b/Globals.cs @@ -4,5 +4,6 @@ using System; public partial class Globals : Node { public static Random _rng = new(); + public static float _gravity = (float)ProjectSettings.GetSetting("physics/2d/default_gravity"), _drag = (float)ProjectSettings.GetSetting("physics/2d/default_linear_damp"); } diff --git a/PlayArea.tscn b/PlayArea.tscn index 0dc58fb..acaaaa7 100644 --- a/PlayArea.tscn +++ b/PlayArea.tscn @@ -1,16 +1,43 @@ -[gd_scene format=3 uid="uid://la8pwcc0tjuu"] +[gd_scene format=4 uid="uid://dumcridek4xy3"] [ext_resource type="Script" uid="uid://bnaxgcafcvtfv" path="res://PlayArea.cs" id="1_lq4m8"] -[ext_resource type="PackedScene" uid="uid://mjinvqj25wha" path="res://Map.tscn" id="2_wqv88"] +[ext_resource type="PackedScene" path="res://Map.tscn" id="2_wqv88"] +[ext_resource type="Texture2D" uid="uid://cf554xlykq1o4" path="res://Art/tile_set.png" id="3_md2b6"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_q4dkg"] -size = Vector2(1600, 800) +size = Vector2(640, 800) [sub_resource type="RectangleShape2D" id="RectangleShape2D_wqv88"] size = Vector2(400, 1000) [sub_resource type="RectangleShape2D" id="RectangleShape2D_7h2rc"] -size = Vector2(400, 16) +size = Vector2(400, 80) + +[sub_resource type="TileMapPattern" id="TileMapPattern_xy0lb"] +tile_data = PackedInt32Array(0, 0, 0, 65536, 0, 1, 1, 0, 1, 65537, 0, 0) + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_vqhsw"] +texture = ExtResource("3_md2b6") +texture_region_size = Vector2i(40, 40) +0:0/0 = 0 +1:0/0 = 0 +2:0/0 = 0 +3:0/0 = 0 +3:0/0/custom_data_0 = true +4:0/0 = 0 +0:1/0 = 0 +1:1/0 = 0 +2:1/0 = 0 +2:1/0/custom_data_0 = true +3:1/0 = 0 +4:1/0 = 0 + +[sub_resource type="TileSet" id="TileSet_he03c"] +tile_size = Vector2i(40, 40) +custom_data_layer_0/name = "is_solid" +custom_data_layer_0/type = 1 +sources/0 = SubResource("TileSetAtlasSource_vqhsw") +pattern_0 = SubResource("TileMapPattern_xy0lb") [node name="PlayArea" type="Node2D" unique_id=1123610167] script = ExtResource("1_lq4m8") @@ -27,356 +54,76 @@ shape = SubResource("RectangleShape2D_q4dkg") [node name="Collision" type="StaticBody2D" parent="LeftEdge" unique_id=1584516089] [node name="CollisionShape2D" type="CollisionShape2D" parent="LeftEdge/Collision" unique_id=1557835667] -position = Vector2(-1000, 0) +position = Vector2(-523, 0) shape = SubResource("RectangleShape2D_wqv88") [node name="Section1" type="Area2D" parent="LeftEdge" unique_id=430038177] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section1" unique_id=1546734575] -position = Vector2(-800, -392) +position = Vector2(-480, -360) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Section2" type="Area2D" parent="LeftEdge" unique_id=61057132] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section2" unique_id=1682498045] -position = Vector2(-800, -376) +position = Vector2(-480, -280) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Section3" type="Area2D" parent="LeftEdge" unique_id=868122440] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section3" unique_id=902262355] -position = Vector2(-800, -360) +position = Vector2(-480, -200) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Section4" type="Area2D" parent="LeftEdge" unique_id=1842242245] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section4" unique_id=1316706017] -position = Vector2(-800, -344) +position = Vector2(-480, -120) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Section5" type="Area2D" parent="LeftEdge" unique_id=936374910] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section5" unique_id=1628834606] -position = Vector2(-800, -328) +position = Vector2(-480, -40) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Section6" type="Area2D" parent="LeftEdge" unique_id=2146055078] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section6" unique_id=53765240] -position = Vector2(-800, -312) +position = Vector2(-480, 40) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Section7" type="Area2D" parent="LeftEdge" unique_id=1447981252] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section7" unique_id=1258555334] -position = Vector2(-800, -296) +position = Vector2(-480, 120) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Section8" type="Area2D" parent="LeftEdge" unique_id=337373465] [node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section8" unique_id=1274223146] -position = Vector2(-800, -280) +position = Vector2(-480, 200) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section9" type="Area2D" parent="LeftEdge" unique_id=901870020] +[node name="Section9" type="Area2D" parent="LeftEdge" unique_id=1702636605] -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section9" unique_id=1259981684] -position = Vector2(-800, -264) +[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section9" unique_id=781702202] +position = Vector2(-480, 280) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section10" type="Area2D" parent="LeftEdge" unique_id=1056474804] +[node name="Section10" type="Area2D" parent="LeftEdge" unique_id=2136154270] -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section10" unique_id=1759439321] -position = Vector2(-800, -248) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section11" type="Area2D" parent="LeftEdge" unique_id=1181042227] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section11" unique_id=222922] -position = Vector2(-800, -232) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section12" type="Area2D" parent="LeftEdge" unique_id=1873794858] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section12" unique_id=2110889621] -position = Vector2(-800, -216) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section13" type="Area2D" parent="LeftEdge" unique_id=851218486] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section13" unique_id=2112458974] -position = Vector2(-800, -200) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section14" type="Area2D" parent="LeftEdge" unique_id=974944046] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section14" unique_id=1529796563] -position = Vector2(-800, -184) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section15" type="Area2D" parent="LeftEdge" unique_id=692639654] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section15" unique_id=1410460024] -position = Vector2(-800, -168) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section16" type="Area2D" parent="LeftEdge" unique_id=1372113566] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section16" unique_id=2053438582] -position = Vector2(-800, -152) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section17" type="Area2D" parent="LeftEdge" unique_id=238385742] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section17" unique_id=457844067] -position = Vector2(-800, -136) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section18" type="Area2D" parent="LeftEdge" unique_id=190659144] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section18" unique_id=424918850] -position = Vector2(-800, -120) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section19" type="Area2D" parent="LeftEdge" unique_id=634578260] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section19" unique_id=36682950] -position = Vector2(-800, -104) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section20" type="Area2D" parent="LeftEdge" unique_id=204918277] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section20" unique_id=712695236] -position = Vector2(-800, -88) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section21" type="Area2D" parent="LeftEdge" unique_id=219094111] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section21" unique_id=873761173] -position = Vector2(-800, -72) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section22" type="Area2D" parent="LeftEdge" unique_id=250510816] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section22" unique_id=426052783] -position = Vector2(-800, -56) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section23" type="Area2D" parent="LeftEdge" unique_id=1097172903] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section23" unique_id=1114945969] -position = Vector2(-800, -40) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section24" type="Area2D" parent="LeftEdge" unique_id=1942112896] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section24" unique_id=1782463412] -position = Vector2(-800, -24) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section25" type="Area2D" parent="LeftEdge" unique_id=1015683736] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section25" unique_id=1162374677] -position = Vector2(-800, -8) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section26" type="Area2D" parent="LeftEdge" unique_id=1619701176] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section26" unique_id=1235922181] -position = Vector2(-800, 8) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section27" type="Area2D" parent="LeftEdge" unique_id=1696342857] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section27" unique_id=961536461] -position = Vector2(-800, 24) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section28" type="Area2D" parent="LeftEdge" unique_id=1294258782] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section28" unique_id=342799648] -position = Vector2(-800, 40) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section29" type="Area2D" parent="LeftEdge" unique_id=1656001812] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section29" unique_id=924521689] -position = Vector2(-800, 56) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section30" type="Area2D" parent="LeftEdge" unique_id=533699546] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section30" unique_id=158150258] -position = Vector2(-800, 72) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section31" type="Area2D" parent="LeftEdge" unique_id=1008415509] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section31" unique_id=91985115] -position = Vector2(-800, 88) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section32" type="Area2D" parent="LeftEdge" unique_id=36226276] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section32" unique_id=712543162] -position = Vector2(-800, 104) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section33" type="Area2D" parent="LeftEdge" unique_id=1145093196] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section33" unique_id=1177372463] -position = Vector2(-800, 120) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section34" type="Area2D" parent="LeftEdge" unique_id=1565041850] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section34" unique_id=1233985246] -position = Vector2(-800, 136) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section35" type="Area2D" parent="LeftEdge" unique_id=1040996273] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section35" unique_id=918000097] -position = Vector2(-800, 152) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section36" type="Area2D" parent="LeftEdge" unique_id=816442400] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section36" unique_id=1905044566] -position = Vector2(-800, 168) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section37" type="Area2D" parent="LeftEdge" unique_id=1417465023] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section37" unique_id=1943562251] -position = Vector2(-800, 184) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section38" type="Area2D" parent="LeftEdge" unique_id=556115591] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section38" unique_id=391245756] -position = Vector2(-800, 200) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section39" type="Area2D" parent="LeftEdge" unique_id=484959370] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section39" unique_id=288895680] -position = Vector2(-800, 216) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section40" type="Area2D" parent="LeftEdge" unique_id=1732761482] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section40" unique_id=1780145193] -position = Vector2(-800, 232) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section41" type="Area2D" parent="LeftEdge" unique_id=1540540627] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section41" unique_id=23987948] -position = Vector2(-800, 248) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section42" type="Area2D" parent="LeftEdge" unique_id=1303790723] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section42" unique_id=18393667] -position = Vector2(-800, 264) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section43" type="Area2D" parent="LeftEdge" unique_id=1052945829] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section43" unique_id=1206466164] -position = Vector2(-800, 280) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section44" type="Area2D" parent="LeftEdge" unique_id=1142021014] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section44" unique_id=737477490] -position = Vector2(-800, 296) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section45" type="Area2D" parent="LeftEdge" unique_id=1612764933] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section45" unique_id=646091076] -position = Vector2(-800, 312) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section46" type="Area2D" parent="LeftEdge" unique_id=1321600094] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section46" unique_id=2061893484] -position = Vector2(-800, 328) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section47" type="Area2D" parent="LeftEdge" unique_id=1461352194] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section47" unique_id=1046604709] -position = Vector2(-800, 344) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section48" type="Area2D" parent="LeftEdge" unique_id=1296405253] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section48" unique_id=840702218] -position = Vector2(-800, 360) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section49" type="Area2D" parent="LeftEdge" unique_id=504056717] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section49" unique_id=81829382] -position = Vector2(-800, 376) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section50" type="Area2D" parent="LeftEdge" unique_id=1324779824] - -[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section50" unique_id=172331545] -position = Vector2(-800, 392) +[node name="Bounds" type="CollisionShape2D" parent="LeftEdge/Section10" unique_id=1298321736] +position = Vector2(-480, 360) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) @@ -385,357 +132,79 @@ debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Collision" type="StaticBody2D" parent="RightEdge" unique_id=741866416] [node name="CollisionShape2D" type="CollisionShape2D" parent="RightEdge/Collision" unique_id=180709933] -position = Vector2(1000, 0) +position = Vector2(522, 0) shape = SubResource("RectangleShape2D_wqv88") -[node name="Section1" type="Area2D" parent="RightEdge" unique_id=566451137] +[node name="Section1" type="Area2D" parent="RightEdge" unique_id=252540847] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section1" unique_id=1162946372] -position = Vector2(800, -392) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section1" unique_id=1820961127] +position = Vector2(480, -360) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section2" type="Area2D" parent="RightEdge" unique_id=106536779] +[node name="Section2" type="Area2D" parent="RightEdge" unique_id=267891984] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section2" unique_id=736715833] -position = Vector2(800, -376) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section2" unique_id=804691774] +position = Vector2(480, -280) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section3" type="Area2D" parent="RightEdge" unique_id=1805848452] +[node name="Section3" type="Area2D" parent="RightEdge" unique_id=121529244] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section3" unique_id=1610058988] -position = Vector2(800, -360) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section3" unique_id=50380052] +position = Vector2(480, -200) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section4" type="Area2D" parent="RightEdge" unique_id=1798802462] +[node name="Section4" type="Area2D" parent="RightEdge" unique_id=989416428] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section4" unique_id=1089856407] -position = Vector2(800, -344) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section4" unique_id=166799963] +position = Vector2(480, -120) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section5" type="Area2D" parent="RightEdge" unique_id=1846105031] +[node name="Section5" type="Area2D" parent="RightEdge" unique_id=559247798] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section5" unique_id=682865084] -position = Vector2(800, -328) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section5" unique_id=1711739887] +position = Vector2(480, -40) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section6" type="Area2D" parent="RightEdge" unique_id=1193151924] +[node name="Section6" type="Area2D" parent="RightEdge" unique_id=1703456342] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section6" unique_id=1374861600] -position = Vector2(800, -312) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section6" unique_id=1898050073] +position = Vector2(480, 40) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section7" type="Area2D" parent="RightEdge" unique_id=176787041] +[node name="Section7" type="Area2D" parent="RightEdge" unique_id=217445677] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section7" unique_id=302250092] -position = Vector2(800, -296) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section7" unique_id=1089776683] +position = Vector2(480, 120) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section8" type="Area2D" parent="RightEdge" unique_id=801651109] +[node name="Section8" type="Area2D" parent="RightEdge" unique_id=1351019631] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section8" unique_id=1699982357] -position = Vector2(800, -280) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section8" unique_id=1913911859] +position = Vector2(480, 200) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section9" type="Area2D" parent="RightEdge" unique_id=553208391] +[node name="Section9" type="Area2D" parent="RightEdge" unique_id=351144802] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section9" unique_id=282786821] -position = Vector2(800, -264) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section9" unique_id=931389292] +position = Vector2(480, 280) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) -[node name="Section10" type="Area2D" parent="RightEdge" unique_id=982588899] +[node name="Section10" type="Area2D" parent="RightEdge" unique_id=2002509833] -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section10" unique_id=1857628962] -position = Vector2(800, -248) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section11" type="Area2D" parent="RightEdge" unique_id=1324604837] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section11" unique_id=142331492] -position = Vector2(800, -232) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section12" type="Area2D" parent="RightEdge" unique_id=1815206858] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section12" unique_id=2027952296] -position = Vector2(800, -216) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section13" type="Area2D" parent="RightEdge" unique_id=1449098547] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section13" unique_id=668691165] -position = Vector2(800, -200) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section14" type="Area2D" parent="RightEdge" unique_id=1883630071] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section14" unique_id=1544098744] -position = Vector2(800, -184) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section15" type="Area2D" parent="RightEdge" unique_id=597392371] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section15" unique_id=1423947441] -position = Vector2(800, -168) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section16" type="Area2D" parent="RightEdge" unique_id=1443807763] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section16" unique_id=1425757260] -position = Vector2(800, -152) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section17" type="Area2D" parent="RightEdge" unique_id=1005947283] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section17" unique_id=222838920] -position = Vector2(800, -136) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section18" type="Area2D" parent="RightEdge" unique_id=524830094] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section18" unique_id=469857280] -position = Vector2(800, -120) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section19" type="Area2D" parent="RightEdge" unique_id=413590139] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section19" unique_id=243878226] -position = Vector2(800, -104) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section20" type="Area2D" parent="RightEdge" unique_id=1110606375] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section20" unique_id=235389123] -position = Vector2(800, -88) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section21" type="Area2D" parent="RightEdge" unique_id=16182674] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section21" unique_id=904832212] -position = Vector2(800, -72) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section22" type="Area2D" parent="RightEdge" unique_id=1601885509] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section22" unique_id=2039893709] -position = Vector2(800, -56) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section23" type="Area2D" parent="RightEdge" unique_id=1162355588] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section23" unique_id=964885666] -position = Vector2(800, -40) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section24" type="Area2D" parent="RightEdge" unique_id=1333775329] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section24" unique_id=1603234567] -position = Vector2(800, -24) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section25" type="Area2D" parent="RightEdge" unique_id=1934772448] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section25" unique_id=590197771] -position = Vector2(800, -8) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section26" type="Area2D" parent="RightEdge" unique_id=1839405855] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section26" unique_id=900614103] -position = Vector2(800, 8) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section27" type="Area2D" parent="RightEdge" unique_id=267166679] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section27" unique_id=933773121] -position = Vector2(800, 24) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section28" type="Area2D" parent="RightEdge" unique_id=747983280] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section28" unique_id=956564400] -position = Vector2(800, 40) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section29" type="Area2D" parent="RightEdge" unique_id=2072812997] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section29" unique_id=499370874] -position = Vector2(800, 56) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section30" type="Area2D" parent="RightEdge" unique_id=1395972049] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section30" unique_id=1570176460] -position = Vector2(800, 72) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section31" type="Area2D" parent="RightEdge" unique_id=941446687] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section31" unique_id=1900110145] -position = Vector2(800, 88) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section32" type="Area2D" parent="RightEdge" unique_id=440832576] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section32" unique_id=751552698] -position = Vector2(800, 104) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section33" type="Area2D" parent="RightEdge" unique_id=521144619] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section33" unique_id=1152870676] -position = Vector2(800, 120) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section34" type="Area2D" parent="RightEdge" unique_id=1165765614] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section34" unique_id=268715988] -position = Vector2(800, 136) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section35" type="Area2D" parent="RightEdge" unique_id=1788341717] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section35" unique_id=1061710870] -position = Vector2(800, 152) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section36" type="Area2D" parent="RightEdge" unique_id=308660710] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section36" unique_id=662024888] -position = Vector2(800, 168) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section37" type="Area2D" parent="RightEdge" unique_id=1350770414] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section37" unique_id=1199683463] -position = Vector2(800, 184) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section38" type="Area2D" parent="RightEdge" unique_id=1566986649] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section38" unique_id=1105242198] -position = Vector2(800, 200) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section39" type="Area2D" parent="RightEdge" unique_id=1458090041] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section39" unique_id=753703647] -position = Vector2(800, 216) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section40" type="Area2D" parent="RightEdge" unique_id=2145724444] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section40" unique_id=1014998136] -position = Vector2(800, 232) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section41" type="Area2D" parent="RightEdge" unique_id=575895172] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section41" unique_id=1837836194] -position = Vector2(800, 248) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section42" type="Area2D" parent="RightEdge" unique_id=21796120] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section42" unique_id=1967683827] -position = Vector2(800, 264) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section43" type="Area2D" parent="RightEdge" unique_id=142243474] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section43" unique_id=1904914569] -position = Vector2(800, 280) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section44" type="Area2D" parent="RightEdge" unique_id=999300481] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section44" unique_id=527489309] -position = Vector2(800, 296) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section45" type="Area2D" parent="RightEdge" unique_id=1932089151] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section45" unique_id=2145439985] -position = Vector2(800, 312) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section46" type="Area2D" parent="RightEdge" unique_id=1314425648] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section46" unique_id=1409500033] -position = Vector2(800, 328) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section47" type="Area2D" parent="RightEdge" unique_id=616193091] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section47" unique_id=1723787819] -position = Vector2(800, 344) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section48" type="Area2D" parent="RightEdge" unique_id=744645434] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section48" unique_id=804209730] -position = Vector2(800, 360) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section49" type="Area2D" parent="RightEdge" unique_id=1808841231] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section49" unique_id=1576094252] -position = Vector2(800, 376) -shape = SubResource("RectangleShape2D_7h2rc") -debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) - -[node name="Section50" type="Area2D" parent="RightEdge" unique_id=592363479] - -[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section50" unique_id=2042481999] -position = Vector2(800, 392) +[node name="Bounds" type="CollisionShape2D" parent="RightEdge/Section10" unique_id=1347884847] +position = Vector2(480, 360) shape = SubResource("RectangleShape2D_7h2rc") debug_color = Color(0.98836404, 0, 0.30800217, 0.41960785) [node name="Map" parent="." unique_id=1033871459 instance=ExtResource("2_wqv88")] +tile_map_data = PackedByteArray("AAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAAAAEAAAAAAP//AAAAAAEAAAD///3/AAAAAAAAAAD///7/AAAAAAEAAAAAAP3/AAAAAAEAAAAA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AAAFAAYAAAAAAAEAAAAFAAcAAAAAAAAAAAAEAAgAAAAAAAAAAAAEAAkAAAAAAAEAAAAFAAgAAAAAAAEAAAAFAAkAAAAAAAAAAAAGAPb/AAAAAAAAAAAGAPf/AAAAAAEAAAAHAPb/AAAAAAEAAAAHAPf/AAAAAAAAAAAGAPj/AAAAAAAAAAAGAPn/AAAAAAEAAAAHAPj/AAAAAAEAAAAHAPn/AAAAAAAAAAAGAPr/AAAAAAAAAAAGAPv/AAAAAAEAAAAHAPr/AAAAAAEAAAAHAPv/AAAAAAAAAAAGAPz/AAAAAAAAAAAGAP3/AAAAAAEAAAAHAPz/AAAAAAEAAAAHAP3/AAAAAAAAAAAGAP7/AAAAAAAAAAAGAP//AAAAAAEAAAAHAP7/AAAAAAEAAAAHAP//AAAAAAAAAAAGAAAAAAAAAAAAAAAGAAEAAAAAAAEAAAAHAAAAAAAAAAEAAAAHAAEAAAAAAAAAAAAGAAIAAAAAAAAAAAAGAAMAAAAAAAEAAAAHAAIAAAAAAAEAAAAHAAMAAAAAAAAAAAAGAAQAAAAAAAAAAAAGAAUAAAAAAAEAAAAHAAQAAAAAAAEAAAAHAAUAAAAAAAAAAAAGAAYAAAAAAAAAAAAGAAcAAAAAAAEAAAAHAAYAAAAAAAEAAAAHAAcAAAAAAAAAAAAGAAgAAAAAAAAAAAAGAAkAAAAAAAEAAAAHAAgAAAAAAAEAAAAHAAkAAAAAAAAAAAA=") +tile_set = SubResource("TileSet_he03c") diff --git a/Tower.cs b/Tower.cs index 0b3c9f4..b2e9cc7 100644 --- a/Tower.cs +++ b/Tower.cs @@ -6,8 +6,7 @@ using System.Diagnostics; public partial class Tower : Sprite2D { public bool _hovered, _aiming; - public int _launchForce = 1000, _arcIterations = 50; - public float _gravity, _drag; + public int _launchSpeed = 1000, _arcIterations = 50; public Vector2 _aimOffset, _arcEnd; public List _arc = new(); public Marker2D _offset, _attackSpawn; @@ -16,8 +15,6 @@ public partial class Tower : Sprite2D public override void _Ready() { base._Ready(); - _gravity = (float)ProjectSettings.GetSetting("physics/2d/default_gravity"); - _drag = (float)ProjectSettings.GetSetting("physics/2d/default_linear_damp"); _area = GetNode("Area"); _offset = GetNode("Offset"); @@ -32,8 +29,7 @@ public partial class Tower : Sprite2D { if (_arcEnd != GetGlobalMousePosition()) { - CalculateLaunchAngle(_attackSpawn.GlobalPosition, GetGlobalMousePosition(), _launchForce, _gravity, _drag); - DrawArc(); + DrawArc(_attackSpawn.GlobalPosition, GetGlobalMousePosition()); } if (Input.IsActionJustPressed("rightClick")) { @@ -43,9 +39,11 @@ public partial class Tower : Sprite2D else if (Input.IsActionJustPressed("leftClick")) { - _aimOffset = CalculateLaunchAngle(_attackSpawn.GlobalPosition, GetGlobalMousePosition(), _launchForce, _gravity, _drag); + _aimOffset = CalculateLaunchAngle(_attackSpawn.GlobalPosition, GetGlobalMousePosition()); _commander.ShootCurrentAttack(_aimOffset); + + ClearArc(); _aiming = false; } } @@ -60,29 +58,25 @@ public partial class Tower : Sprite2D } } - public Vector2 CalculateLaunchAngle(Vector2 startPos, Vector2 targetPos, float launchSpeed, float gravity, float drag, int maxIterations = 20) + public Vector2 CalculateLaunchAngle(Vector2 START, Vector2 END, int MAX_ITERATIONS = 20) { - Vector2 toTarget = targetPos - startPos; - float baseAngle = toTarget.Angle(); // Directly pointing at the target + Vector2 offset = END - START; + float baseAngle = offset.Angle(); - // Pure vertical angle going straight up (-Y is up in Godot) float straightUpAngle = -Mathf.Pi / 2.0f; - // We use a normalized 0.0 to 1.0 search range to avoid radian sign confusion - float lowT = 0.0f; // 0% = pointing straight at target - float highT = 1.0f; // 100% = pointing straight up + float lowAngle = 0.0f; + float highAngle = 1.0f; float bestAngle = baseAngle; - float delta = 1.0f / 60.0f; // Matches standard physics step - for (int i = 0; i < maxIterations; i++) + for (int i = 0; i < MAX_ITERATIONS; i++) { - float testT = (lowT + highT) / 2.0f; + float averageAngle = (lowAngle + highAngle) / 2.0f; - // Interpolate smoothly between the base angle and straight up - float testAngle = Mathf.LerpAngle(baseAngle, straightUpAngle, testT); + float testAngle = Mathf.LerpAngle(baseAngle, straightUpAngle, averageAngle); - float error = EvaluateSimulationError(testAngle, startPos, targetPos, launchSpeed, gravity, drag, delta); + float error = EvaluateSimulationError(testAngle, START, END); if (Mathf.Abs(error) < 0.2f) { @@ -90,28 +84,34 @@ public partial class Tower : Sprite2D break; } - // error > 0 means the simulated projectile landed below the target (+Y is down) if (error > 0) { - // It fell short or low. We need to loft it higher up (move toward 1.0) - lowT = testT; + lowAngle = averageAngle; } else { - // It flew over the target. We need to lower the arc (move toward 0.0) - highT = testT; + highAngle = averageAngle; } bestAngle = testAngle; } - return Vector2.FromAngle(bestAngle) * _launchForce; + return Vector2.FromAngle(bestAngle) * _launchSpeed; } - public void DrawArc() + public void ClearArc() { Path2D path = _commander._attack.GetNode("PredictedPath"); path.Curve.ClearPoints(); + } + + public void DrawArc(Vector2 START, Vector2 END, int MAX_ITERATIONS = 20) + { + CalculateLaunchAngle(START, END); + + Path2D path = _commander._attack.GetNode("PredictedPath"); + path.Curve.ClearPoints(); + for (int i = 0; i < _arc.Count; i++) { path.Curve.AddPoint(_arc[i]); @@ -119,15 +119,16 @@ public partial class Tower : Sprite2D GD.Print(path.Curve.PointCount); } - private float EvaluateSimulationError(float angle, Vector2 start, Vector2 target, float speed, float gravity, float drag, float delta) + private float EvaluateSimulationError(float ANGLE, Vector2 START, Vector2 TARGET) { - Vector2 velocity = new Vector2(Mathf.Cos(angle), Mathf.Sin(angle)) * speed; - Vector2 position = start; + float speed = _launchSpeed, gravity = Globals._gravity, drag = Globals._drag, delta = 1.0f / 60.0f; + Vector2 velocity = new Vector2(Mathf.Cos(ANGLE), Mathf.Sin(ANGLE)) * speed; + Vector2 position = START; - float directionSign = Mathf.Sign(target.X - start.X); + float directionSign = Mathf.Sign(TARGET.X - START.X); float maxFlightTime = 6.0f; int totalSteps = (int)(maxFlightTime / delta); - _arc = [start]; + _arc = [START]; for (int step = 0; step < totalSteps; step++) { @@ -136,17 +137,16 @@ public partial class Tower : Sprite2D position += velocity * delta; _arc.Add(position); - // Check if our projectile crossed the target line on the X axis - bool reachedTargetX = (directionSign >= 0) ? (position.X >= target.X) : (position.X <= target.X); + bool reachedTargetX = (directionSign >= 0) ? (position.X >= TARGET.X) : (position.X <= TARGET.X); if (reachedTargetX) { - return position.Y - target.Y; + return position.Y - TARGET.Y; } } + _arcEnd = _arc[^1]; - // If it ran out of time or hit a wall before crossing target.X, penalize it heavily - return (position.Y > target.Y) ? 99999f : -99999f; + return (position.Y > TARGET.Y) ? 99999f : -99999f; } public void StartTurn() diff --git a/attack.tscn b/attack.tscn index cae122a..7b5c956 100644 --- a/attack.tscn +++ b/attack.tscn @@ -7,7 +7,7 @@ bounce = 0.25 [sub_resource type="CircleShape2D" id="CircleShape2D_7yfhp"] -radius = 8.0 +radius = 12.5 [sub_resource type="Curve2D" id="Curve2D_63pi1"] @@ -22,7 +22,7 @@ script = ExtResource("1_63pi1") shape = SubResource("CircleShape2D_7yfhp") [node name="Sprite2D" type="Sprite2D" parent="." unique_id=1583277900] -scale = Vector2(0.32, 0.32) +scale = Vector2(0.5, 0.5) texture = ExtResource("2_hqc8w") [node name="PredictedPath" type="Path2D" parent="." unique_id=1505290715] diff --git a/enemy.tscn b/enemy.tscn index a3ab2b9..7656d96 100644 --- a/enemy.tscn +++ b/enemy.tscn @@ -7,7 +7,7 @@ bounce = 0.5 [sub_resource type="CircleShape2D" id="CircleShape2D_4gyqm"] -radius = 8.0 +radius = 12.5 [node name="Enemy" type="StaticBody2D" unique_id=1417697759] physics_material_override = SubResource("PhysicsMaterial_7k104") @@ -17,5 +17,5 @@ script = ExtResource("1_4gyqm") shape = SubResource("CircleShape2D_4gyqm") [node name="Sprite2D" type="Sprite2D" parent="." unique_id=1941012605] -scale = Vector2(0.32, 0.32) +scale = Vector2(0.5, 0.5) texture = ExtResource("1_7k104") diff --git a/main.tscn b/main.tscn index efa6ec5..cd23f6b 100644 --- a/main.tscn +++ b/main.tscn @@ -1,15 +1,15 @@ [gd_scene format=3 uid="uid://dcp7p6al4i0b7"] [ext_resource type="Script" uid="uid://cg1m762ed04kv" path="res://Main.cs" id="1_ig7tw"] -[ext_resource type="PackedScene" uid="uid://la8pwcc0tjuu" path="res://PlayArea.tscn" id="3_h2yge"] +[ext_resource type="PackedScene" path="res://PlayArea.tscn" id="2_1bvp3"] [ext_resource type="PackedScene" uid="uid://c6b188d2a20eq" path="res://enemy_controller.tscn" id="4_1bvp3"] [ext_resource type="PackedScene" uid="uid://b7kvx7p0b2086" path="res://player_controller.tscn" id="4_lquwl"] [node name="Main" type="Node" unique_id=535208469] script = ExtResource("1_ig7tw") -[node name="PlayArea" parent="." unique_id=1123610167 instance=ExtResource("3_h2yge")] -position = Vector2(960, 600) +[node name="PlayArea" parent="." unique_id=1123610167 instance=ExtResource("2_1bvp3")] +position = Vector2(960, 510) [node name="EnemyController" parent="." unique_id=1894449838 instance=ExtResource("4_1bvp3")]