summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-05-22 17:50:54 -0400
committerbd <bdunahu@operationnull.com>2025-05-22 17:50:54 -0400
commitf9d7b55634049e0ae6533fb94e058c2a368cd49b (patch)
treeaf980b24c517af4ba11bd5b1b72d728a679d533d
parent8c5c4863aeacb4afcf70f339df6d601e2df1a7a6 (diff)
Experiment with path generation
-rw-r--r--project.godot1
-rw-r--r--resources/tiles.tres1087
-rw-r--r--scenes/path.tscn6
-rw-r--r--scripts/path_generator.gd48
-rw-r--r--scripts/path_tester.gd55
-rw-r--r--scripts/path_tester.gd.uid1
-rw-r--r--scripts/tile_manager.gd9
-rw-r--r--scripts/tile_manager.gd.uid1
8 files changed, 1201 insertions, 7 deletions
diff --git a/project.godot b/project.godot
index 5e1f0ed..4ab933d 100644
--- a/project.godot
+++ b/project.godot
@@ -18,6 +18,7 @@ config/icon="res://icon.svg"
[autoload]
GameData="*res://scripts/game_data.gd"
+TileManager="*res://scripts/tile_manager.gd"
[display]
diff --git a/resources/tiles.tres b/resources/tiles.tres
new file mode 100644
index 0000000..36df90e
--- /dev/null
+++ b/resources/tiles.tres
@@ -0,0 +1,1087 @@
+[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://blp0cbjwav76t"]
+
+[ext_resource type="Texture2D" uid="uid://di2vybjsniag4" path="res://assets/tilemap.png" id="1_4eb6g"]
+
+[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ojpid"]
+texture = ExtResource("1_4eb6g")
+1:0/0 = 0
+2:0/0 = 0
+3:0/0 = 0
+4:0/0 = 0
+5:0/0 = 0
+6:0/0 = 0
+7:0/0 = 0
+8:0/0 = 0
+9:0/0 = 0
+10:0/0 = 0
+11:0/0 = 0
+12:0/0 = 0
+13:0/0 = 0
+14:0/0 = 0
+15:0/0 = 0
+16:0/0 = 0
+17:0/0 = 0
+18:0/0 = 0
+19:0/0 = 0
+20:0/0 = 0
+21:0/0 = 0
+22:0/0 = 0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/0 = 0
+48:9/0 = 0
+0:10/0 = 0
+1:10/0 = 0
+2:10/0 = 0
+3:10/0 = 0
+4:10/0 = 0
+5:10/0 = 0
+6:10/0 = 0
+7:10/0 = 0
+8:10/0 = 0
+9:10/0 = 0
+10:10/0 = 0
+11:10/0 = 0
+12:10/0 = 0
+13:10/0 = 0
+14:10/0 = 0
+15:10/0 = 0
+16:10/0 = 0
+17:10/0 = 0
+18:10/0 = 0
+19:10/0 = 0
+20:10/0 = 0
+21:10/0 = 0
+22:10/0 = 0
+23:10/0 = 0
+24:10/0 = 0
+25:10/0 = 0
+26:10/0 = 0
+27:10/0 = 0
+28:10/0 = 0
+29:10/0 = 0
+30:10/0 = 0
+31:10/0 = 0
+32:10/0 = 0
+33:10/0 = 0
+34:10/0 = 0
+35:10/0 = 0
+36:10/0 = 0
+37:10/0 = 0
+38:10/0 = 0
+39:10/0 = 0
+40:10/0 = 0
+41:10/0 = 0
+42:10/0 = 0
+43:10/0 = 0
+44:10/0 = 0
+45:10/0 = 0
+46:10/0 = 0
+47:10/0 = 0
+48:10/0 = 0
+0:11/0 = 0
+1:11/0 = 0
+2:11/0 = 0
+3:11/0 = 0
+4:11/0 = 0
+5:11/0 = 0
+6:11/0 = 0
+7:11/0 = 0
+8:11/0 = 0
+9:11/0 = 0
+10:11/0 = 0
+11:11/0 = 0
+12:11/0 = 0
+13:11/0 = 0
+14:11/0 = 0
+15:11/0 = 0
+16:11/0 = 0
+17:11/0 = 0
+18:11/0 = 0
+19:11/0 = 0
+20:11/0 = 0
+21:11/0 = 0
+22:11/0 = 0
+23:11/0 = 0
+24:11/0 = 0
+25:11/0 = 0
+26:11/0 = 0
+27:11/0 = 0
+28:11/0 = 0
+29:11/0 = 0
+30:11/0 = 0
+31:11/0 = 0
+32:11/0 = 0
+33:11/0 = 0
+34:11/0 = 0
+35:11/0 = 0
+36:11/0 = 0
+37:11/0 = 0
+38:11/0 = 0
+39:11/0 = 0
+40:11/0 = 0
+41:11/0 = 0
+42:11/0 = 0
+43:11/0 = 0
+44:11/0 = 0
+45:11/0 = 0
+46:11/0 = 0
+47:11/0 = 0
+48:11/0 = 0
+0:12/0 = 0
+1:12/0 = 0
+2:12/0 = 0
+3:12/0 = 0
+4:12/0 = 0
+5:12/0 = 0
+6:12/0 = 0
+7:12/0 = 0
+8:12/0 = 0
+9:12/0 = 0
+10:12/0 = 0
+11:12/0 = 0
+12:12/0 = 0
+13:12/0 = 0
+14:12/0 = 0
+15:12/0 = 0
+16:12/0 = 0
+17:12/0 = 0
+18:12/0 = 0
+19:12/0 = 0
+20:12/0 = 0
+21:12/0 = 0
+22:12/0 = 0
+23:12/0 = 0
+24:12/0 = 0
+25:12/0 = 0
+26:12/0 = 0
+27:12/0 = 0
+28:12/0 = 0
+29:12/0 = 0
+30:12/0 = 0
+31:12/0 = 0
+32:12/0 = 0
+33:12/0 = 0
+34:12/0 = 0
+35:12/0 = 0
+36:12/0 = 0
+37:12/0 = 0
+38:12/0 = 0
+39:12/0 = 0
+40:12/0 = 0
+41:12/0 = 0
+42:12/0 = 0
+43:12/0 = 0
+44:12/0 = 0
+45:12/0 = 0
+46:12/0 = 0
+47:12/0 = 0
+48:12/0 = 0
+0:13/0 = 0
+1:13/0 = 0
+2:13/0 = 0
+3:13/0 = 0
+4:13/0 = 0
+5:13/0 = 0
+6:13/0 = 0
+7:13/0 = 0
+8:13/0 = 0
+9:13/0 = 0
+10:13/0 = 0
+11:13/0 = 0
+12:13/0 = 0
+13:13/0 = 0
+14:13/0 = 0
+15:13/0 = 0
+16:13/0 = 0
+17:13/0 = 0
+18:13/0 = 0
+19:13/0 = 0
+20:13/0 = 0
+21:13/0 = 0
+22:13/0 = 0
+23:13/0 = 0
+24:13/0 = 0
+25:13/0 = 0
+26:13/0 = 0
+27:13/0 = 0
+28:13/0 = 0
+29:13/0 = 0
+30:13/0 = 0
+31:13/0 = 0
+32:13/0 = 0
+33:13/0 = 0
+34:13/0 = 0
+35:13/0 = 0
+36:13/0 = 0
+37:13/0 = 0
+38:13/0 = 0
+39:13/0 = 0
+40:13/0 = 0
+41:13/0 = 0
+42:13/0 = 0
+43:13/0 = 0
+44:13/0 = 0
+45:13/0 = 0
+46:13/0 = 0
+47:13/0 = 0
+48:13/0 = 0
+0:14/0 = 0
+1:14/0 = 0
+2:14/0 = 0
+3:14/0 = 0
+4:14/0 = 0
+5:14/0 = 0
+6:14/0 = 0
+7:14/0 = 0
+8:14/0 = 0
+9:14/0 = 0
+10:14/0 = 0
+11:14/0 = 0
+12:14/0 = 0
+13:14/0 = 0
+14:14/0 = 0
+15:14/0 = 0
+16:14/0 = 0
+17:14/0 = 0
+18:14/0 = 0
+19:14/0 = 0
+20:14/0 = 0
+21:14/0 = 0
+22:14/0 = 0
+23:14/0 = 0
+24:14/0 = 0
+25:14/0 = 0
+26:14/0 = 0
+27:14/0 = 0
+28:14/0 = 0
+29:14/0 = 0
+30:14/0 = 0
+31:14/0 = 0
+32:14/0 = 0
+33:14/0 = 0
+34:14/0 = 0
+35:14/0 = 0
+36:14/0 = 0
+37:14/0 = 0
+38:14/0 = 0
+39:14/0 = 0
+40:14/0 = 0
+41:14/0 = 0
+42:14/0 = 0
+43:14/0 = 0
+44:14/0 = 0
+45:14/0 = 0
+46:14/0 = 0
+47:14/0 = 0
+48:14/0 = 0
+0:15/0 = 0
+1:15/0 = 0
+2:15/0 = 0
+3:15/0 = 0
+4:15/0 = 0
+5:15/0 = 0
+6:15/0 = 0
+7:15/0 = 0
+8:15/0 = 0
+9:15/0 = 0
+10:15/0 = 0
+11:15/0 = 0
+12:15/0 = 0
+13:15/0 = 0
+14:15/0 = 0
+15:15/0 = 0
+16:15/0 = 0
+17:15/0 = 0
+18:15/0 = 0
+19:15/0 = 0
+20:15/0 = 0
+21:15/0 = 0
+22:15/0 = 0
+23:15/0 = 0
+24:15/0 = 0
+25:15/0 = 0
+26:15/0 = 0
+27:15/0 = 0
+28:15/0 = 0
+29:15/0 = 0
+30:15/0 = 0
+31:15/0 = 0
+32:15/0 = 0
+33:15/0 = 0
+34:15/0 = 0
+35:15/0 = 0
+36:15/0 = 0
+37:15/0 = 0
+38:15/0 = 0
+39:15/0 = 0
+40:15/0 = 0
+41:15/0 = 0
+42:15/0 = 0
+43:15/0 = 0
+44:15/0 = 0
+45:15/0 = 0
+46:15/0 = 0
+47:15/0 = 0
+48:15/0 = 0
+0:16/0 = 0
+1:16/0 = 0
+2:16/0 = 0
+3:16/0 = 0
+4:16/0 = 0
+5:16/0 = 0
+6:16/0 = 0
+7:16/0 = 0
+8:16/0 = 0
+9:16/0 = 0
+10:16/0 = 0
+11:16/0 = 0
+12:16/0 = 0
+13:16/0 = 0
+14:16/0 = 0
+15:16/0 = 0
+16:16/0 = 0
+17:16/0 = 0
+18:16/0 = 0
+19:16/0 = 0
+20:16/0 = 0
+21:16/0 = 0
+22:16/0 = 0
+23:16/0 = 0
+24:16/0 = 0
+25:16/0 = 0
+26:16/0 = 0
+27:16/0 = 0
+28:16/0 = 0
+29:16/0 = 0
+30:16/0 = 0
+31:16/0 = 0
+32:16/0 = 0
+33:16/0 = 0
+34:16/0 = 0
+35:16/0 = 0
+36:16/0 = 0
+37:16/0 = 0
+38:16/0 = 0
+39:16/0 = 0
+40:16/0 = 0
+41:16/0 = 0
+42:16/0 = 0
+43:16/0 = 0
+44:16/0 = 0
+45:16/0 = 0
+46:16/0 = 0
+47:16/0 = 0
+48:16/0 = 0
+0:17/0 = 0
+1:17/0 = 0
+2:17/0 = 0
+3:17/0 = 0
+4:17/0 = 0
+5:17/0 = 0
+6:17/0 = 0
+7:17/0 = 0
+8:17/0 = 0
+9:17/0 = 0
+10:17/0 = 0
+11:17/0 = 0
+12:17/0 = 0
+13:17/0 = 0
+14:17/0 = 0
+15:17/0 = 0
+16:17/0 = 0
+17:17/0 = 0
+18:17/0 = 0
+19:17/0 = 0
+20:17/0 = 0
+21:17/0 = 0
+22:17/0 = 0
+23:17/0 = 0
+24:17/0 = 0
+25:17/0 = 0
+26:17/0 = 0
+27:17/0 = 0
+28:17/0 = 0
+29:17/0 = 0
+30:17/0 = 0
+31:17/0 = 0
+32:17/0 = 0
+33:17/0 = 0
+34:17/0 = 0
+35:17/0 = 0
+36:17/0 = 0
+37:17/0 = 0
+38:17/0 = 0
+39:17/0 = 0
+40:17/0 = 0
+41:17/0 = 0
+42:17/0 = 0
+43:17/0 = 0
+44:17/0 = 0
+45:17/0 = 0
+46:17/0 = 0
+47:17/0 = 0
+48:17/0 = 0
+0:18/0 = 0
+1:18/0 = 0
+2:18/0 = 0
+3:18/0 = 0
+4:18/0 = 0
+5:18/0 = 0
+6:18/0 = 0
+7:18/0 = 0
+8:18/0 = 0
+9:18/0 = 0
+10:18/0 = 0
+11:18/0 = 0
+12:18/0 = 0
+13:18/0 = 0
+14:18/0 = 0
+15:18/0 = 0
+16:18/0 = 0
+17:18/0 = 0
+18:18/0 = 0
+19:18/0 = 0
+20:18/0 = 0
+21:18/0 = 0
+22:18/0 = 0
+23:18/0 = 0
+24:18/0 = 0
+25:18/0 = 0
+26:18/0 = 0
+27:18/0 = 0
+28:18/0 = 0
+29:18/0 = 0
+30:18/0 = 0
+31:18/0 = 0
+32:18/0 = 0
+33:18/0 = 0
+34:18/0 = 0
+35:18/0 = 0
+36:18/0 = 0
+37:18/0 = 0
+38:18/0 = 0
+39:18/0 = 0
+40:18/0 = 0
+41:18/0 = 0
+42:18/0 = 0
+43:18/0 = 0
+44:18/0 = 0
+45:18/0 = 0
+46:18/0 = 0
+47:18/0 = 0
+48:18/0 = 0
+0:19/0 = 0
+1:19/0 = 0
+2:19/0 = 0
+3:19/0 = 0
+4:19/0 = 0
+5:19/0 = 0
+6:19/0 = 0
+7:19/0 = 0
+8:19/0 = 0
+9:19/0 = 0
+10:19/0 = 0
+11:19/0 = 0
+12:19/0 = 0
+13:19/0 = 0
+14:19/0 = 0
+15:19/0 = 0
+16:19/0 = 0
+17:19/0 = 0
+18:19/0 = 0
+19:19/0 = 0
+20:19/0 = 0
+21:19/0 = 0
+22:19/0 = 0
+23:19/0 = 0
+24:19/0 = 0
+25:19/0 = 0
+26:19/0 = 0
+27:19/0 = 0
+28:19/0 = 0
+29:19/0 = 0
+30:19/0 = 0
+31:19/0 = 0
+32:19/0 = 0
+33:19/0 = 0
+34:19/0 = 0
+35:19/0 = 0
+36:19/0 = 0
+37:19/0 = 0
+38:19/0 = 0
+39:19/0 = 0
+40:19/0 = 0
+41:19/0 = 0
+42:19/0 = 0
+43:19/0 = 0
+44:19/0 = 0
+45:19/0 = 0
+46:19/0 = 0
+47:19/0 = 0
+48:19/0 = 0
+0:20/0 = 0
+1:20/0 = 0
+2:20/0 = 0
+3:20/0 = 0
+4:20/0 = 0
+5:20/0 = 0
+6:20/0 = 0
+7:20/0 = 0
+8:20/0 = 0
+9:20/0 = 0
+10:20/0 = 0
+11:20/0 = 0
+12:20/0 = 0
+13:20/0 = 0
+14:20/0 = 0
+15:20/0 = 0
+16:20/0 = 0
+17:20/0 = 0
+18:20/0 = 0
+19:20/0 = 0
+20:20/0 = 0
+21:20/0 = 0
+22:20/0 = 0
+23:20/0 = 0
+24:20/0 = 0
+25:20/0 = 0
+26:20/0 = 0
+27:20/0 = 0
+28:20/0 = 0
+29:20/0 = 0
+30:20/0 = 0
+31:20/0 = 0
+32:20/0 = 0
+33:20/0 = 0
+34:20/0 = 0
+35:20/0 = 0
+36:20/0 = 0
+37:20/0 = 0
+38:20/0 = 0
+39:20/0 = 0
+40:20/0 = 0
+41:20/0 = 0
+42:20/0 = 0
+43:20/0 = 0
+44:20/0 = 0
+45:20/0 = 0
+46:20/0 = 0
+47:20/0 = 0
+48:20/0 = 0
+0:21/0 = 0
+1:21/0 = 0
+2:21/0 = 0
+3:21/0 = 0
+4:21/0 = 0
+5:21/0 = 0
+6:21/0 = 0
+7:21/0 = 0
+8:21/0 = 0
+9:21/0 = 0
+10:21/0 = 0
+11:21/0 = 0
+12:21/0 = 0
+13:21/0 = 0
+14:21/0 = 0
+15:21/0 = 0
+16:21/0 = 0
+17:21/0 = 0
+18:21/0 = 0
+19:21/0 = 0
+20:21/0 = 0
+21:21/0 = 0
+22:21/0 = 0
+23:21/0 = 0
+24:21/0 = 0
+25:21/0 = 0
+26:21/0 = 0
+27:21/0 = 0
+28:21/0 = 0
+29:21/0 = 0
+30:21/0 = 0
+31:21/0 = 0
+32:21/0 = 0
+33:21/0 = 0
+34:21/0 = 0
+35:21/0 = 0
+36:21/0 = 0
+37:21/0 = 0
+38:21/0 = 0
+39:21/0 = 0
+40:21/0 = 0
+41:21/0 = 0
+42:21/0 = 0
+43:21/0 = 0
+44:21/0 = 0
+45:21/0 = 0
+46:21/0 = 0
+47:21/0 = 0
+48:21/0 = 0
+0:0/0 = 0
+
+[resource]
+sources/0 = SubResource("TileSetAtlasSource_ojpid")
diff --git a/scenes/path.tscn b/scenes/path.tscn
new file mode 100644
index 0000000..5344e6c
--- /dev/null
+++ b/scenes/path.tscn
@@ -0,0 +1,6 @@
+[gd_scene load_steps=2 format=3 uid="uid://cdgeamr56c0mx"]
+
+[ext_resource type="Script" uid="uid://unlqpkn1bwel" path="res://scripts/path_tester.gd" id="1_1dods"]
+
+[node name="Path" type="Node2D"]
+script = ExtResource("1_1dods")
diff --git a/scripts/path_generator.gd b/scripts/path_generator.gd
index fae2c76..e87a8f4 100644
--- a/scripts/path_generator.gd
+++ b/scripts/path_generator.gd
@@ -1,11 +1,45 @@
-extends Node
+extends Object
+class_name PathGenerator
-# Called when the node enters the scene tree for the first time.
-func _ready() -> void:
- pass # Replace with function body.
+var _grid_width : int
+var _grid_height : int
+var _path : Array[Vector2i]
-# Called every frame. 'delta' is the elapsed time since the previous frame.
-func _process(delta: float) -> void:
- pass
+func _init(width:int, height:int):
+ _grid_width = width
+ _grid_height = height
+
+func generate_path():
+ _path.clear()
+
+ var x : int = 0
+ var y : int = randi_range(1, _grid_height-2)
+
+ while x < _grid_width:
+ if not _path.has(Vector2i(x,y)):
+ _path.append(Vector2i(x, y))
+
+ var choice : int = randi_range(0,2)
+
+ # every even tile goes right to leave room for towers
+ if choice == 0 || x % 2 == 0 || x == _grid_width - 1:
+ x += 1
+ elif choice == 1 && y < _grid_height - 2 && !_path.has(Vector2i(x, y + 1)):
+ y += 1
+ elif choice == 2 && y > 1 && !_path.has(Vector2i(x, y - 1)):
+ y -= 1
+ return _path
+
+func get_tile_score(tile : Vector2i) -> int:
+ var score : int = 0
+ var x : int = tile.x
+ var y : int = tile.y
+
+ score += 1 if _path.has(Vector2i(x, y - 1)) else 0
+ score += 2 if _path.has(Vector2i(x + 1, y)) else 0
+ score += 4 if _path.has(Vector2i(x, y + 1)) else 0
+ score += 8 if _path.has(Vector2i(x - 1, y)) else 0
+
+ return score
diff --git a/scripts/path_tester.gd b/scripts/path_tester.gd
new file mode 100644
index 0000000..5add640
--- /dev/null
+++ b/scripts/path_tester.gd
@@ -0,0 +1,55 @@
+extends Node2D
+
+@export var grid_width : int = 20
+@export var grid_height : int = 14
+@export var tile_size : int = 16
+
+var _pg : PathGenerator
+var path_straight_atlas_coords : Vector2i = Vector2i(8, 1)
+var path_corner_atlas_coords : Vector2i = Vector2i(9, 1)
+var path_empty_atlas_coords : Vector2i = Vector2i(0, 0)
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ _pg = PathGenerator.new(grid_width, grid_height)
+ _display_path()
+
+func _display_path():
+ var _path : Array[Vector2i] = []
+ while _path.size() < 35:
+ _path = _pg.generate_path()
+
+ for i in _path:
+ var score : int = _pg.get_tile_score(i)
+
+ var atlas_coords : Vector2i = path_empty_atlas_coords
+ var rotation : float = 0.0
+
+ match score:
+ 2, 8, 10:
+ atlas_coords = path_straight_atlas_coords
+ rotation = 90.0
+ 1, 4, 5:
+ atlas_coords = path_straight_atlas_coords
+ 3:
+ atlas_coords = path_corner_atlas_coords
+ rotation = -90.0
+ 6:
+ atlas_coords = path_corner_atlas_coords
+ 12:
+ atlas_coords = path_corner_atlas_coords
+ rotation = 90
+ 9:
+ atlas_coords = path_corner_atlas_coords
+ rotation = 180
+
+ var tile : Sprite2D = Sprite2D.new()
+ tile.texture = TileManager.get_tile_texture(atlas_coords)
+ tile.global_rotation_degrees = rotation
+ _display_tile(tile, i)
+
+func _display_tile(tile : Sprite2D, pos : Vector2i):
+ tile.global_position = (pos * tile_size) + (Vector2i.ONE * tile_size / 2)
+ add_child(tile)
+
+
diff --git a/scripts/path_tester.gd.uid b/scripts/path_tester.gd.uid
new file mode 100644
index 0000000..f5dc38a
--- /dev/null
+++ b/scripts/path_tester.gd.uid
@@ -0,0 +1 @@
+uid://unlqpkn1bwel
diff --git a/scripts/tile_manager.gd b/scripts/tile_manager.gd
new file mode 100644
index 0000000..191b39f
--- /dev/null
+++ b/scripts/tile_manager.gd
@@ -0,0 +1,9 @@
+extends Node
+
+@export var tile_set : TileSet = preload("res://resources/tiles.tres")
+
+func get_tile_texture(atlas_coords: Vector2i) -> Texture:
+ var source : TileSetAtlasSource = tile_set.get_source(0)
+ var texture_region : Rect2i = source.get_tile_texture_region(atlas_coords)
+ var tile_image : Image = source.texture.get_image().get_region(texture_region)
+ return ImageTexture.create_from_image(tile_image)
diff --git a/scripts/tile_manager.gd.uid b/scripts/tile_manager.gd.uid
new file mode 100644
index 0000000..8ffa51b
--- /dev/null
+++ b/scripts/tile_manager.gd.uid
@@ -0,0 +1 @@
+uid://ptg2yb4qw4xj