summaryrefslogtreecommitdiff
path: root/src/tools/world_generator/scenes
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-06-03 21:13:19 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-06-03 21:13:19 -0600
commitf922fe4669080d1633e0a345a3f8981867c9e841 (patch)
tree7c2c98bfca20fda37fe34ba99e2d3caa9a39ca02 /src/tools/world_generator/scenes
parent898877f09808691a5e5d45850d27ae85f270db16 (diff)
add working world gen, fixed food placing, minor refactoring
Diffstat (limited to 'src/tools/world_generator/scenes')
-rw-r--r--src/tools/world_generator/scenes/WalkerHead.tscn6
-rw-r--r--src/tools/world_generator/scenes/WalkerUnit.tscn6
-rw-r--r--src/tools/world_generator/scenes/WorldGenerator.tscn65
3 files changed, 77 insertions, 0 deletions
diff --git a/src/tools/world_generator/scenes/WalkerHead.tscn b/src/tools/world_generator/scenes/WalkerHead.tscn
new file mode 100644
index 0000000..a62b9ed
--- /dev/null
+++ b/src/tools/world_generator/scenes/WalkerHead.tscn
@@ -0,0 +1,6 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://tools/world_generator/scripts/walker_head.gd" type="Script" id=1]
+
+[node name="WalkerHead" type="Node2D"]
+script = ExtResource( 1 )
diff --git a/src/tools/world_generator/scenes/WalkerUnit.tscn b/src/tools/world_generator/scenes/WalkerUnit.tscn
new file mode 100644
index 0000000..bf10698
--- /dev/null
+++ b/src/tools/world_generator/scenes/WalkerUnit.tscn
@@ -0,0 +1,6 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://tools/world_generator/scripts/walker_unit.gd" type="Script" id=1]
+
+[node name="WalkerUnit" type="Node2D"]
+script = ExtResource( 1 )
diff --git a/src/tools/world_generator/scenes/WorldGenerator.tscn b/src/tools/world_generator/scenes/WorldGenerator.tscn
new file mode 100644
index 0000000..32ed939
--- /dev/null
+++ b/src/tools/world_generator/scenes/WorldGenerator.tscn
@@ -0,0 +1,65 @@
+[gd_scene load_steps=8 format=2]
+
+[ext_resource path="res://tools/world_generator/sprites/white.png" type="Texture" id=1]
+[ext_resource path="res://tools/world_generator/sprites/black.png" type="Texture" id=2]
+[ext_resource path="res://tools/world_generator/scenes/WalkerUnit.tscn" type="PackedScene" id=3]
+[ext_resource path="res://tools/world_generator/scenes/WalkerHead.tscn" type="PackedScene" id=4]
+[ext_resource path="res://tools/world_generator/scripts/world_generator.gd" type="Script" id=5]
+
+[sub_resource type="ConvexPolygonShape2D" id=2]
+points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 )
+
+[sub_resource type="TileSet" id=1]
+0/name = "white.png 0"
+0/texture = ExtResource( 1 )
+0/tex_offset = Vector2( 0, 0 )
+0/modulate = Color( 1, 1, 1, 1 )
+0/region = Rect2( 0, 0, 16, 16 )
+0/tile_mode = 0
+0/occluder_offset = Vector2( 0, 0 )
+0/navigation_offset = Vector2( 0, 0 )
+0/shape_offset = Vector2( 0, 0 )
+0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
+0/shape_one_way = false
+0/shape_one_way_margin = 0.0
+0/shapes = [ ]
+0/z_index = 0
+1/name = "black.png 1"
+1/texture = ExtResource( 2 )
+1/tex_offset = Vector2( 0, 0 )
+1/modulate = Color( 1, 1, 1, 1 )
+1/region = Rect2( 0, 0, 16, 16 )
+1/tile_mode = 0
+1/occluder_offset = Vector2( 0, 0 )
+1/navigation_offset = Vector2( 0, 0 )
+1/shape_offset = Vector2( 0, 0 )
+1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
+1/shape = SubResource( 2 )
+1/shape_one_way = false
+1/shape_one_way_margin = 1.0
+1/shapes = [ {
+"autotile_coord": Vector2( 0, 0 ),
+"one_way": false,
+"one_way_margin": 1.0,
+"shape": SubResource( 2 ),
+"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
+} ]
+1/z_index = 0
+
+[node name="WorldGenerator" type="Node2D"]
+script = ExtResource( 5 )
+TILEMAP_NP = NodePath("TileMap")
+
+[node name="TileMap" type="TileMap" parent="."]
+tile_set = SubResource( 1 )
+cell_size = Vector2( 16, 16 )
+cell_quadrant_size = 4
+format = 1
+
+[node name="WalkerHead" parent="." instance=ExtResource( 4 )]
+TILEMAP_NP = NodePath("../TileMap")
+WALKER_UNIT_NP = ExtResource( 3 )
+
+[node name="Camera" type="Camera2D" parent="."]
+current = true
+zoom = Vector2( 5, 5 )