LD56 is over. This is the game.

This commit is contained in:
Douwe Ravers
2024-10-07 02:28:14 +02:00
parent 4c0c57d5ba
commit af7a46cd23
183 changed files with 20357 additions and 442 deletions

6
scenes/buildings.gd Normal file
View File

@@ -0,0 +1,6 @@
class_name Buildings extends Node
static var instance:Buildings
func _init() -> void:
instance = self

15
scenes/enemy_ants.gd Normal file
View File

@@ -0,0 +1,15 @@
class_name EnemySpawn extends Node3D
var enemy_scene := preload("res://entities/ants/enemy_ant.tscn")
func _ready() -> void:
$Timer.wait_time = randi_range(1, 10)
$Timer.start()
func _on_timer_timeout() -> void:
$Timer.wait_time = randi_range(1, 10)
if $Ants.get_children().size() < Game.instance.enemies_per_spawn:
var enemy := enemy_scene.instantiate() as EnemyAnt
$Ants.add_child(enemy)
enemy.global_position = global_position

214
scenes/gam1217.tmp Normal file
View File

@@ -0,0 +1,214 @@
[gd_scene load_steps=24 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="Script" path="res://entities/faction/player/player.gd" id="2_kyivt"]
[ext_resource type="Script" path="res://entities/faction/player/player_camera.gd" id="3_6ujgl"]
[ext_resource type="Texture2D" uid="uid://b0ufbld7wt8h6" path="res://icon.svg" id="4_akimp"]
[ext_resource type="PackedScene" uid="uid://ch7ug2prgwyyn" path="res://entities/faction/fog_of_war.tscn" id="4_rheqo"]
[ext_resource type="Script" path="res://scenes/player_camp.gd" id="6_bdu2w"]
[ext_resource type="Script" path="res://entities/faction/enemy/enemy.gd" id="6_pj6iy"]
[ext_resource type="Script" path="res://entities/terrain.gd" id="7_js5w2"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_e001c"]
width = 16
height = 16
[sub_resource type="PrismMesh" id="PrismMesh_dw2jx"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nljwt"]
albedo_color = Color(1, 0, 0, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_kxcis"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="PrismMesh" id="PrismMesh_3qvl5"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xv1v4"]
albedo_color = Color(0, 0.766667, 1, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_88h6r"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_rbvxc"]
data = PackedVector3Array(10, 0, 10, -10, 0, 10, 10, 0, -10, -10, 0, 10, -10, 0, -10, 10, 0, -10)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ob58c"]
albedo_color = Color(0, 0.46, 0.145667, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_alxwk"]
material = SubResource("StandardMaterial3D_ob58c")
size = Vector2(20, 20)
[sub_resource type="NavigationMesh" id="NavigationMesh_6127e"]
vertices = PackedVector3Array(-5.25, 0.40872, 8, -6, 0.40872, 8.25, -6, 0.40872, 9.5, 9.5, 0.40872, 9.5, 7.25, 0.40872, -7.75, 7.75, 0.40872, -8, 7.75, 0.40872, -9.5, -9.5, 0.40872, -9.5, 9.5, 0.40872, -5.25, 8.25, 0.40872, -5.75, 7.25, 0.40872, -6, -5.5, 0.40872, 6, -9.5, 0.40872, 7.5, -6.75, 0.40872, 7.75, -6.75, 0.40872, 6.25, 8.75, 0.40872, -6, 8.75, 0.40872, -7.75, 9.5, 0.40872, -9.5, -9.5, 0.40872, 9.5)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(5, 4, 6), PackedInt32Array(6, 4, 7), PackedInt32Array(9, 8, 10), PackedInt32Array(10, 8, 3), PackedInt32Array(10, 3, 11), PackedInt32Array(10, 11, 7), PackedInt32Array(13, 12, 14), PackedInt32Array(14, 12, 7), PackedInt32Array(7, 4, 10), PackedInt32Array(3, 0, 11), PackedInt32Array(7, 11, 14), PackedInt32Array(15, 8, 9), PackedInt32Array(5, 6, 16), PackedInt32Array(16, 6, 17), PackedInt32Array(15, 16, 8), PackedInt32Array(8, 16, 17), PackedInt32Array(1, 2, 13), PackedInt32Array(13, 2, 18), PackedInt32Array(13, 18, 12)]
geometry_parsed_geometry_type = 1
geometry_source_geometry_mode = 1
geometry_source_group_name = &"TerrainEntities"
[sub_resource type="SphereMesh" id="SphereMesh_3yo4a"]
[node name="Game" type="Node3D"]
script = ExtResource("1_3n5gp")
[node name="Player" type="Node" parent="."]
script = ExtResource("2_kyivt")
[node name="PlayerCamera" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 2.38419e-07, 1.98981, 3.94427)
script = ExtResource("3_6ujgl")
[node name="Sprite3D" type="Sprite3D" parent="Player/PlayerCamera"]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 1, 0)
cast_shadow = 0
axis = 1
billboard = 2
texture = SubResource("NoiseTexture2D_e001c")
[node name="RayCast3D" type="RayCast3D" parent="Player"]
target_position = Vector3(0, 0, 0)
debug_shape_custom_color = Color(0, 0.633333, 1, 1)
[node name="PlayerUI" type="Control" parent="Player"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
[node name="header" type="HBoxContainer" parent="Player/PlayerUI"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
[node name="footer" type="HBoxContainer" parent="Player/PlayerUI"]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -255.0
grow_horizontal = 2
grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="Player/PlayerUI/footer"]
layout_mode = 2
size_flags_horizontal = 3
alignment = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Player/PlayerUI/footer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="LeftPadding" type="Control" parent="Player/PlayerUI/footer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 1
[node name="Button" type="Button" parent="Player/PlayerUI/footer/VBoxContainer/HBoxContainer"]
layout_mode = 2
icon = ExtResource("4_akimp")
[node name="RightPadding" type="Control" parent="Player/PlayerUI/footer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 1
[node name="SubViewportContainer" type="SubViewportContainer" parent="Player/PlayerUI/footer"]
layout_mode = 2
size_flags_vertical = 3
mouse_filter = 0
[node name="SubViewport" type="SubViewport" parent="Player/PlayerUI/footer/SubViewportContainer"]
handle_input_locally = false
size = Vector2i(255, 255)
render_target_update_mode = 4
[node name="Camera3D" type="Camera3D" parent="Player/PlayerUI/footer/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0)
projection = 1
size = 20.0
[node name="FogOfWar" parent="Player" instance=ExtResource("4_rheqo")]
[node name="Buildings" type="Node" parent="Player"]
[node name="PlayerCamp" type="StaticBody3D" parent="Player/Buildings" groups=["TerrainEntities"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0.40872, 7)
script = ExtResource("6_bdu2w")
[node name="PlayerCamp" type="MeshInstance3D" parent="Player/Buildings/PlayerCamp"]
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../../Environment/Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_nljwt")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player/Buildings/PlayerCamp"]
shape = SubResource("ConcavePolygonShape3D_kxcis")
[node name="Ants" type="Node" parent="Player"]
[node name="Enemy" type="Node" parent="."]
script = ExtResource("6_pj6iy")
[node name="FogOfWar" parent="Enemy" instance=ExtResource("4_rheqo")]
visual = false
[node name="Buildings" type="Node" parent="Enemy"]
[node name="MeshInstance3D3" type="MeshInstance3D" parent="Enemy/Buildings" groups=["TerrainEntities"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 0.40872, -7)
mesh = SubResource("PrismMesh_3qvl5")
skeleton = NodePath("../../../Environment/Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_xv1v4")
[node name="StaticBody3D" type="StaticBody3D" parent="Enemy/Buildings/MeshInstance3D3"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Enemy/Buildings/MeshInstance3D3/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_88h6r")
[node name="Units" type="Node" parent="Enemy"]
[node name="Environment" type="Node" parent="."]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Environment"]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"]
environment = SubResource("Environment_r8f2r")
[node name="Terrain" type="StaticBody3D" parent="Environment" groups=["TerrainEntities"]]
script = ExtResource("7_js5w2")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Environment/Terrain"]
shape = SubResource("ConcavePolygonShape3D_rbvxc")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Environment/Terrain"]
mesh = SubResource("PlaneMesh_alxwk")
skeleton = NodePath("../../..")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Environment/Terrain"]
navigation_mesh = SubResource("NavigationMesh_6127e")
[node name="Food" type="Node" parent="Environment"]
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Environment/Food"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.93551, 0.40872, 1.77864)
mesh = SubResource("SphereMesh_3yo4a")
skeleton = NodePath("../../Terrain/MeshInstance3D")

233
scenes/gam13D8.tmp Normal file
View File

@@ -0,0 +1,233 @@
[gd_scene load_steps=28 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="Script" path="res://player/player.gd" id="2_kyivt"]
[ext_resource type="Script" path="res://player/player_camera.gd" id="3_6ujgl"]
[ext_resource type="Script" path="res://scenes/player_ants.gd" id="4_nc8uk"]
[ext_resource type="Script" path="res://scenes/enemy_ants.gd" id="5_1xiir"]
[ext_resource type="Script" path="res://entities/player_camp.gd" id="6_bdu2w"]
[ext_resource type="Script" path="res://scenes/buildings.gd" id="6_sp1yx"]
[ext_resource type="Script" path="res://entities/terrain.gd" id="7_js5w2"]
[ext_resource type="Script" path="res://scenes/resources.gd" id="8_iuc0h"]
[ext_resource type="PackedScene" uid="uid://dsx7wydm6py7h" path="res://entities/resources/food_resource.tscn" id="9_ugogf"]
[sub_resource type="GDScript" id="GDScript_87ai3"]
script/source = "extends HBoxContainer
func _process(delta: float) -> void:
$Food.text = \"Food: %5d\" % PlayerCamp.instance.food_capacity
$Wood.text = \"Wood: %5d\" % PlayerCamp.instance.wood_capacity
$Stone.text = \"Stone: %5d\" % PlayerCamp.instance.stone_capacity
"
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_e001c"]
width = 16
height = 16
[sub_resource type="PrismMesh" id="PrismMesh_dw2jx"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nljwt"]
albedo_color = Color(1, 0, 0, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_kxcis"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xnv8j"]
albedo_color = Color(0.4, 0.2636, 0.152, 1)
[sub_resource type="SphereMesh" id="SphereMesh_7o2sd"]
material = SubResource("StandardMaterial3D_xnv8j")
[sub_resource type="SphereShape3D" id="SphereShape3D_mhi37"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4n51k"]
albedo_color = Color(0.45, 0.45, 0.45, 1)
[sub_resource type="SphereMesh" id="SphereMesh_jj3r8"]
material = SubResource("StandardMaterial3D_4n51k")
[sub_resource type="BoxShape3D" id="BoxShape3D_y1i3q"]
size = Vector3(100, 0.01, 100)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ob58c"]
albedo_color = Color(0, 0.46, 0.145667, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_alxwk"]
material = SubResource("StandardMaterial3D_ob58c")
size = Vector2(100, 100)
[sub_resource type="NavigationMesh" id="NavigationMesh_6127e"]
vertices = PackedVector3Array(2, 0.480707, -10.75, 3, 0.480707, -11, 3, 0.480707, -49.5, -49.5, 0.480707, -49.5, -49.5, 0.480707, -10, 2, 0.480707, -10, 3.75, 0.480707, -11, 4, 0.480707, -10, 49.5, 0.480707, -10, 49.5, 0.480707, -49.5, 0.5, 0.480707, -1, 0.75, 0.480707, -0.5, 2.5, 0.480707, -9, 2, 0.480707, -9.25, -0.5, 0.480707, -1, -49.5, 0.480707, 0.25, -0.75, 0.480707, 0.25, 3.75, 0.480707, -9, 0.75, 0.480707, 1, 49.5, 0.480707, 1.5, 0.25, 0.480707, 1.25, 0, 0.480707, 49.5, 0, 0.480707, 1.25, -0.75, 0.480707, 1, -49.5, 0.480707, 49.5, 49.5, 0.480707, 49.5)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(3, 0, 4), PackedInt32Array(0, 5, 4), PackedInt32Array(6, 1, 2), PackedInt32Array(6, 2, 7), PackedInt32Array(7, 2, 8), PackedInt32Array(8, 2, 9), PackedInt32Array(12, 11, 10), PackedInt32Array(12, 10, 13), PackedInt32Array(13, 10, 14), PackedInt32Array(14, 16, 15), PackedInt32Array(13, 14, 5), PackedInt32Array(5, 14, 4), PackedInt32Array(4, 14, 15), PackedInt32Array(11, 12, 17), PackedInt32Array(11, 17, 18), PackedInt32Array(18, 17, 19), PackedInt32Array(19, 17, 8), PackedInt32Array(17, 7, 8), PackedInt32Array(19, 20, 18), PackedInt32Array(22, 21, 23), PackedInt32Array(23, 21, 24), PackedInt32Array(23, 24, 15), PackedInt32Array(15, 16, 23), PackedInt32Array(22, 20, 21), PackedInt32Array(21, 20, 19), PackedInt32Array(21, 19, 25)]
geometry_parsed_geometry_type = 1
geometry_source_geometry_mode = 1
geometry_source_group_name = &"NavmeshTargets"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
offset_right = 40.0
offset_bottom = 40.0
script = SubResource("GDScript_87ai3")
[node name="Food" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Wood" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Stone" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="HBoxContainer2" type="VBoxContainer" parent="."]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 40.0
grow_horizontal = 0
[node name="Button" type="Button" parent="HBoxContainer2"]
layout_mode = 2
text = "Add line"
[node name="Player" type="Node" parent="."]
script = ExtResource("2_kyivt")
[node name="PlayerCamera" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 2.38419e-07, 1.98981, 3.94427)
current = true
script = ExtResource("3_6ujgl")
[node name="Sprite3D" type="Sprite3D" parent="Player/PlayerCamera"]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 1, 0)
cast_shadow = 0
axis = 1
billboard = 2
texture = SubResource("NoiseTexture2D_e001c")
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="Player/PlayerCamera"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
remote_path = NodePath("../../SubViewportContainer/SubViewport/Camera3D")
update_rotation = false
update_scale = false
[node name="RayCast3D" type="RayCast3D" parent="Player"]
target_position = Vector3(0, 0, 0)
debug_shape_custom_color = Color(0, 0.633333, 1, 1)
[node name="SubViewportContainer" type="SubViewportContainer" parent="Player"]
visible = false
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -255.0
offset_top = -255.0
grow_horizontal = 0
grow_vertical = 0
size_flags_vertical = 3
mouse_filter = 0
[node name="SubViewport" type="SubViewport" parent="Player/SubViewportContainer"]
handle_input_locally = false
size = Vector2i(255, 255)
render_target_update_mode = 0
[node name="Camera3D" type="Camera3D" parent="Player/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 2.38419e-07, 11.6491, 1.35608)
projection = 1
current = true
size = 20.0
[node name="PlayerAnts" type="Node" parent="."]
script = ExtResource("4_nc8uk")
[node name="EnemyAnts" type="Node" parent="."]
script = ExtResource("5_1xiir")
[node name="Buildings" type="Node" parent="."]
script = ExtResource("6_sp1yx")
[node name="PlayerCamp" type="StaticBody3D" parent="Buildings" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.480707, 0)
script = ExtResource("6_bdu2w")
[node name="PlayerCamp" type="MeshInstance3D" parent="Buildings/PlayerCamp"]
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_nljwt")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Buildings/PlayerCamp"]
shape = SubResource("ConcavePolygonShape3D_kxcis")
[node name="Resources" type="Node" parent="."]
script = ExtResource("8_iuc0h")
[node name="FoodResource" parent="Resources" groups=["NavmeshTargets"] instance=ExtResource("9_ugogf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, -10)
[node name="WoodResource" type="StaticBody3D" parent="Resources" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.587, 0.388953, -1.42182)
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Resources/WoodResource"]
mesh = SubResource("SphereMesh_7o2sd")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Resources/WoodResource"]
shape = SubResource("SphereShape3D_mhi37")
[node name="Timer" type="Timer" parent="Resources/WoodResource"]
autostart = true
[node name="StoneResource" type="StaticBody3D" parent="Resources" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0.404562, -1)
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Resources/StoneResource"]
mesh = SubResource("SphereMesh_jj3r8")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Resources/StoneResource"]
shape = SubResource("SphereShape3D_mhi37")
[node name="Timer" type="Timer" parent="Resources/StoneResource"]
autostart = true
[node name="Terrain" type="StaticBody3D" parent="." groups=["NavmeshTargets"]]
script = ExtResource("7_js5w2")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Terrain"]
shape = SubResource("BoxShape3D_y1i3q")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Terrain"]
mesh = SubResource("PlaneMesh_alxwk")
skeleton = NodePath("../..")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Terrain"]
navigation_mesh = SubResource("NavigationMesh_6127e")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")
[connection signal="timeout" from="Resources/WoodResource/Timer" to="Resources/WoodResource" method="_on_tick"]
[connection signal="timeout" from="Resources/StoneResource/Timer" to="Resources/StoneResource" method="_on_tick"]

214
scenes/gam19C.tmp Normal file
View File

@@ -0,0 +1,214 @@
[gd_scene load_steps=24 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="Script" path="res://entities/faction/player/player.gd" id="2_kyivt"]
[ext_resource type="Script" path="res://entities/faction/player/player_camera.gd" id="3_6ujgl"]
[ext_resource type="Texture2D" uid="uid://b0ufbld7wt8h6" path="res://icon.svg" id="4_akimp"]
[ext_resource type="PackedScene" uid="uid://ch7ug2prgwyyn" path="res://entities/faction/fog_of_war.tscn" id="4_rheqo"]
[ext_resource type="Script" path="res://scenes/player_camp.gd" id="6_bdu2w"]
[ext_resource type="Script" path="res://entities/faction/enemy/enemy.gd" id="6_pj6iy"]
[ext_resource type="Script" path="res://entities/terrain.gd" id="7_js5w2"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_e001c"]
width = 16
height = 16
[sub_resource type="PrismMesh" id="PrismMesh_dw2jx"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nljwt"]
albedo_color = Color(1, 0, 0, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_kxcis"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="PrismMesh" id="PrismMesh_3qvl5"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xv1v4"]
albedo_color = Color(0, 0.766667, 1, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_88h6r"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_rbvxc"]
data = PackedVector3Array(10, 0, 10, -10, 0, 10, 10, 0, -10, -10, 0, 10, -10, 0, -10, 10, 0, -10)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ob58c"]
albedo_color = Color(0, 0.46, 0.145667, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_alxwk"]
material = SubResource("StandardMaterial3D_ob58c")
size = Vector2(20, 20)
[sub_resource type="NavigationMesh" id="NavigationMesh_6127e"]
vertices = PackedVector3Array(-5.25, 0.40872, 8, -6, 0.40872, 8.25, -6, 0.40872, 9.5, 9.5, 0.40872, 9.5, 7.25, 0.40872, -7.75, 7.75, 0.40872, -8, 7.75, 0.40872, -9.5, -9.5, 0.40872, -9.5, 9.5, 0.40872, -5.25, 8.25, 0.40872, -5.75, 7.25, 0.40872, -6, -5.5, 0.40872, 6, -9.5, 0.40872, 7.5, -6.75, 0.40872, 7.75, -6.75, 0.40872, 6.25, 8.75, 0.40872, -6, 8.75, 0.40872, -7.75, 9.5, 0.40872, -9.5, -9.5, 0.40872, 9.5)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(5, 4, 6), PackedInt32Array(6, 4, 7), PackedInt32Array(9, 8, 10), PackedInt32Array(10, 8, 3), PackedInt32Array(10, 3, 11), PackedInt32Array(10, 11, 7), PackedInt32Array(13, 12, 14), PackedInt32Array(14, 12, 7), PackedInt32Array(7, 4, 10), PackedInt32Array(3, 0, 11), PackedInt32Array(7, 11, 14), PackedInt32Array(15, 8, 9), PackedInt32Array(5, 6, 16), PackedInt32Array(16, 6, 17), PackedInt32Array(15, 16, 8), PackedInt32Array(8, 16, 17), PackedInt32Array(1, 2, 13), PackedInt32Array(13, 2, 18), PackedInt32Array(13, 18, 12)]
geometry_parsed_geometry_type = 1
geometry_source_geometry_mode = 1
geometry_source_group_name = &"TerrainEntities"
[sub_resource type="SphereMesh" id="SphereMesh_3yo4a"]
[node name="Game" type="Node3D"]
script = ExtResource("1_3n5gp")
[node name="Player" type="Node" parent="."]
script = ExtResource("2_kyivt")
[node name="PlayerCamera" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 2.38419e-07, 1.98981, 3.94427)
script = ExtResource("3_6ujgl")
[node name="Sprite3D" type="Sprite3D" parent="Player/PlayerCamera"]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 1, 0)
cast_shadow = 0
axis = 1
billboard = 2
texture = SubResource("NoiseTexture2D_e001c")
[node name="RayCast3D" type="RayCast3D" parent="Player"]
target_position = Vector3(0, 0, 0)
debug_shape_custom_color = Color(0, 0.633333, 1, 1)
[node name="PlayerUI" type="Control" parent="Player"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
[node name="header" type="HBoxContainer" parent="Player/PlayerUI"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
[node name="footer" type="HBoxContainer" parent="Player/PlayerUI"]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -255.0
grow_horizontal = 2
grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="Player/PlayerUI/footer"]
layout_mode = 2
size_flags_horizontal = 3
alignment = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Player/PlayerUI/footer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="LeftPadding" type="Control" parent="Player/PlayerUI/footer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 1
[node name="Button" type="Button" parent="Player/PlayerUI/footer/VBoxContainer/HBoxContainer"]
layout_mode = 2
icon = ExtResource("4_akimp")
[node name="RightPadding" type="Control" parent="Player/PlayerUI/footer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 1
[node name="SubViewportContainer" type="SubViewportContainer" parent="Player/PlayerUI/footer"]
layout_mode = 2
size_flags_vertical = 3
mouse_filter = 0
[node name="SubViewport" type="SubViewport" parent="Player/PlayerUI/footer/SubViewportContainer"]
handle_input_locally = false
size = Vector2i(255, 255)
render_target_update_mode = 4
[node name="Camera3D" type="Camera3D" parent="Player/PlayerUI/footer/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0)
projection = 1
size = 20.0
[node name="FogOfWar" parent="Player" instance=ExtResource("4_rheqo")]
[node name="Buildings" type="Node" parent="Player"]
[node name="PlayerCamp" type="StaticBody3D" parent="Player/Buildings" groups=["TerrainEntities"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0.40872, 7)
script = ExtResource("6_bdu2w")
[node name="PlayerCamp" type="MeshInstance3D" parent="Player/Buildings/PlayerCamp"]
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../../Environment/Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_nljwt")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player/Buildings/PlayerCamp"]
shape = SubResource("ConcavePolygonShape3D_kxcis")
[node name="Ants" type="Node" parent="Player"]
[node name="Enemy" type="Node" parent="."]
script = ExtResource("6_pj6iy")
[node name="FogOfWar" parent="Enemy" instance=ExtResource("4_rheqo")]
visual = false
[node name="Buildings" type="Node" parent="Enemy"]
[node name="MeshInstance3D3" type="MeshInstance3D" parent="Enemy/Buildings" groups=["TerrainEntities"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 0.40872, -7)
mesh = SubResource("PrismMesh_3qvl5")
skeleton = NodePath("../../../Environment/Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_xv1v4")
[node name="StaticBody3D" type="StaticBody3D" parent="Enemy/Buildings/MeshInstance3D3"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Enemy/Buildings/MeshInstance3D3/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_88h6r")
[node name="Units" type="Node" parent="Enemy"]
[node name="Environment" type="Node" parent="."]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Environment"]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"]
environment = SubResource("Environment_r8f2r")
[node name="Terrain" type="StaticBody3D" parent="Environment" groups=["TerrainEntities"]]
script = ExtResource("7_js5w2")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Environment/Terrain"]
shape = SubResource("ConcavePolygonShape3D_rbvxc")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Environment/Terrain"]
mesh = SubResource("PlaneMesh_alxwk")
skeleton = NodePath("../../..")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Environment/Terrain"]
navigation_mesh = SubResource("NavigationMesh_6127e")
[node name="Food" type="Node" parent="Environment"]
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Environment/Food"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.93551, 0.40872, 1.77864)
mesh = SubResource("SphereMesh_3yo4a")
skeleton = NodePath("../../Terrain/MeshInstance3D")

70
scenes/gam1E41.tmp Normal file
View File

@@ -0,0 +1,70 @@
[gd_scene load_steps=12 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="PackedScene" uid="uid://chjbet2mt6llt" path="res://player/player.tscn" id="2_2fdmj"]
[ext_resource type="Script" path="res://scenes/enemy_ants.gd" id="5_1xiir"]
[ext_resource type="PackedScene" uid="uid://dsx7wydm6py7h" path="res://entities/resources/food_resource.tscn" id="6_xr7w4"]
[ext_resource type="PackedScene" uid="uid://kslywe6neejo" path="res://entities/resources/stone_resource.tscn" id="7_bkapj"]
[ext_resource type="Script" path="res://scenes/resources.gd" id="8_iuc0h"]
[ext_resource type="PackedScene" uid="uid://kh5xmgawk26n" path="res://entities/resources/wood_resource.tscn" id="8_jhxv1"]
[ext_resource type="PackedScene" uid="uid://befndbtsiwm0y" path="res://entities/terrain/terrain.tscn" id="10_qb084"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
glow_enabled = true
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="Enemy" type="Node" parent="."]
[node name="EnemySpawn" type="Marker3D" parent="Enemy"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -39.5054, 0, -85.415)
script = ExtResource("5_1xiir")
[node name="Timer" type="Timer" parent="Enemy/EnemySpawn"]
autostart = true
[node name="Ants" type="Node" parent="Enemy/EnemySpawn"]
[node name="Resources" type="Node" parent="."]
script = ExtResource("8_iuc0h")
[node name="FoodResource" parent="Resources" instance=ExtResource("6_xr7w4")]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, -3.78494, -0.292938, 12.8791)
[node name="StoneResource" parent="Resources" instance=ExtResource("7_bkapj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.4151, 0.126608, 1.54954)
[node name="WoodResource" parent="Resources" instance=ExtResource("8_jhxv1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 11.5346, 0.360575, 14.553)
[node name="Player" parent="." instance=ExtResource("2_2fdmj")]
[node name="PlayerCamera" parent="Player" index="0"]
transform = Transform3D(-0.971344, 0.136328, -0.194696, 0, 0.819152, 0.573576, 0.23768, 0.55714, -0.795678, -4.77009, 10.2295, -15.5818)
[node name="Camera3D" parent="Player/TextureRect/SubViewportContainer/SubViewport" index="0"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -3.40681, 18.421, -10.0104)
[node name="Terrain" parent="." instance=ExtResource("10_qb084")]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
light_color = Color(1, 0.913725, 0.917647, 1)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")
[connection signal="timeout" from="Enemy/EnemySpawn/Timer" to="Enemy/EnemySpawn" method="_on_timer_timeout"]
[editable path="Player"]

233
scenes/gam2DD7.tmp Normal file
View File

@@ -0,0 +1,233 @@
[gd_scene load_steps=28 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="Script" path="res://player/player.gd" id="2_kyivt"]
[ext_resource type="Script" path="res://player/player_camera.gd" id="3_6ujgl"]
[ext_resource type="Script" path="res://scenes/player_ants.gd" id="4_nc8uk"]
[ext_resource type="Script" path="res://scenes/enemy_ants.gd" id="5_1xiir"]
[ext_resource type="Script" path="res://entities/player_camp.gd" id="6_bdu2w"]
[ext_resource type="Script" path="res://scenes/buildings.gd" id="6_sp1yx"]
[ext_resource type="Script" path="res://entities/terrain.gd" id="7_js5w2"]
[ext_resource type="Script" path="res://scenes/resources.gd" id="8_iuc0h"]
[ext_resource type="PackedScene" uid="uid://dsx7wydm6py7h" path="res://entities/resources/food_resource.tscn" id="9_ugogf"]
[sub_resource type="GDScript" id="GDScript_87ai3"]
script/source = "extends HBoxContainer
func _process(delta: float) -> void:
$Food.text = \"Food: %5d\" % PlayerCamp.instance.food_capacity
$Wood.text = \"Wood: %5d\" % PlayerCamp.instance.wood_capacity
$Stone.text = \"Stone: %5d\" % PlayerCamp.instance.stone_capacity
"
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_e001c"]
width = 16
height = 16
[sub_resource type="PrismMesh" id="PrismMesh_dw2jx"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nljwt"]
albedo_color = Color(1, 0, 0, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_kxcis"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xnv8j"]
albedo_color = Color(0.4, 0.2636, 0.152, 1)
[sub_resource type="SphereMesh" id="SphereMesh_7o2sd"]
material = SubResource("StandardMaterial3D_xnv8j")
[sub_resource type="SphereShape3D" id="SphereShape3D_mhi37"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4n51k"]
albedo_color = Color(0.45, 0.45, 0.45, 1)
[sub_resource type="SphereMesh" id="SphereMesh_jj3r8"]
material = SubResource("StandardMaterial3D_4n51k")
[sub_resource type="BoxShape3D" id="BoxShape3D_y1i3q"]
size = Vector3(100, 0.01, 100)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ob58c"]
albedo_color = Color(0, 0.46, 0.145667, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_alxwk"]
material = SubResource("StandardMaterial3D_ob58c")
size = Vector2(100, 100)
[sub_resource type="NavigationMesh" id="NavigationMesh_6127e"]
vertices = PackedVector3Array(2, 0.480707, -10.75, 3, 0.480707, -11, 3, 0.480707, -49.5, -49.5, 0.480707, -49.5, -49.5, 0.480707, -10, 2, 0.480707, -10, 3.75, 0.480707, -11, 4, 0.480707, -10, 49.5, 0.480707, -10, 49.5, 0.480707, -49.5, 0.5, 0.480707, -1, 0.75, 0.480707, -0.5, 2.5, 0.480707, -9, 2, 0.480707, -9.25, -0.5, 0.480707, -1, -49.5, 0.480707, 0.25, -0.75, 0.480707, 0.25, 3.75, 0.480707, -9, 0.75, 0.480707, 1, 49.5, 0.480707, 1.5, 0.25, 0.480707, 1.25, 0, 0.480707, 49.5, 0, 0.480707, 1.25, -0.75, 0.480707, 1, -49.5, 0.480707, 49.5, 49.5, 0.480707, 49.5)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(3, 0, 4), PackedInt32Array(0, 5, 4), PackedInt32Array(6, 1, 2), PackedInt32Array(6, 2, 7), PackedInt32Array(7, 2, 8), PackedInt32Array(8, 2, 9), PackedInt32Array(12, 11, 10), PackedInt32Array(12, 10, 13), PackedInt32Array(13, 10, 14), PackedInt32Array(14, 16, 15), PackedInt32Array(13, 14, 5), PackedInt32Array(5, 14, 4), PackedInt32Array(4, 14, 15), PackedInt32Array(11, 12, 17), PackedInt32Array(11, 17, 18), PackedInt32Array(18, 17, 19), PackedInt32Array(19, 17, 8), PackedInt32Array(17, 7, 8), PackedInt32Array(19, 20, 18), PackedInt32Array(22, 21, 23), PackedInt32Array(23, 21, 24), PackedInt32Array(23, 24, 15), PackedInt32Array(15, 16, 23), PackedInt32Array(22, 20, 21), PackedInt32Array(21, 20, 19), PackedInt32Array(21, 19, 25)]
geometry_parsed_geometry_type = 1
geometry_source_geometry_mode = 1
geometry_source_group_name = &"NavmeshTargets"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
offset_right = 40.0
offset_bottom = 40.0
script = SubResource("GDScript_87ai3")
[node name="Food" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Wood" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Stone" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="HBoxContainer2" type="VBoxContainer" parent="."]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 40.0
grow_horizontal = 0
[node name="Button" type="Button" parent="HBoxContainer2"]
layout_mode = 2
text = "Add line"
[node name="Player" type="Node" parent="."]
script = ExtResource("2_kyivt")
[node name="PlayerCamera" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 2.38419e-07, 1.98981, 3.94427)
current = true
script = ExtResource("3_6ujgl")
[node name="Sprite3D" type="Sprite3D" parent="Player/PlayerCamera"]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 1, 0)
cast_shadow = 0
axis = 1
billboard = 2
texture = SubResource("NoiseTexture2D_e001c")
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="Player/PlayerCamera"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
remote_path = NodePath("../../SubViewportContainer/SubViewport/Camera3D")
update_rotation = false
update_scale = false
[node name="RayCast3D" type="RayCast3D" parent="Player"]
target_position = Vector3(0, 0, 0)
debug_shape_custom_color = Color(0, 0.633333, 1, 1)
[node name="SubViewportContainer" type="SubViewportContainer" parent="Player"]
visible = false
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -255.0
offset_top = -255.0
grow_horizontal = 0
grow_vertical = 0
size_flags_vertical = 3
mouse_filter = 0
[node name="SubViewport" type="SubViewport" parent="Player/SubViewportContainer"]
handle_input_locally = false
size = Vector2i(255, 255)
render_target_update_mode = 0
[node name="Camera3D" type="Camera3D" parent="Player/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 2.38419e-07, 11.6491, 1.35608)
projection = 1
current = true
size = 20.0
[node name="PlayerAnts" type="Node" parent="."]
script = ExtResource("4_nc8uk")
[node name="EnemyAnts" type="Node" parent="."]
script = ExtResource("5_1xiir")
[node name="Buildings" type="Node" parent="."]
script = ExtResource("6_sp1yx")
[node name="PlayerCamp" type="StaticBody3D" parent="Buildings" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.480707, 0)
script = ExtResource("6_bdu2w")
[node name="PlayerCamp" type="MeshInstance3D" parent="Buildings/PlayerCamp"]
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_nljwt")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Buildings/PlayerCamp"]
shape = SubResource("ConcavePolygonShape3D_kxcis")
[node name="Resources" type="Node" parent="."]
script = ExtResource("8_iuc0h")
[node name="FoodResource" parent="Resources" groups=["NavmeshTargets"] instance=ExtResource("9_ugogf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, -10)
[node name="WoodResource" type="StaticBody3D" parent="Resources" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.587, 0.388953, -1.42182)
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Resources/WoodResource"]
mesh = SubResource("SphereMesh_7o2sd")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Resources/WoodResource"]
shape = SubResource("SphereShape3D_mhi37")
[node name="Timer" type="Timer" parent="Resources/WoodResource"]
autostart = true
[node name="StoneResource" type="StaticBody3D" parent="Resources" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0.404562, -1)
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Resources/StoneResource"]
mesh = SubResource("SphereMesh_jj3r8")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Resources/StoneResource"]
shape = SubResource("SphereShape3D_mhi37")
[node name="Timer" type="Timer" parent="Resources/StoneResource"]
autostart = true
[node name="Terrain" type="StaticBody3D" parent="." groups=["NavmeshTargets"]]
script = ExtResource("7_js5w2")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Terrain"]
shape = SubResource("BoxShape3D_y1i3q")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Terrain"]
mesh = SubResource("PlaneMesh_alxwk")
skeleton = NodePath("../..")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Terrain"]
navigation_mesh = SubResource("NavigationMesh_6127e")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")
[connection signal="timeout" from="Resources/WoodResource/Timer" to="Resources/WoodResource" method="_on_tick"]
[connection signal="timeout" from="Resources/StoneResource/Timer" to="Resources/StoneResource" method="_on_tick"]

233
scenes/gam46E6.tmp Normal file
View File

@@ -0,0 +1,233 @@
[gd_scene load_steps=28 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="Script" path="res://player/player.gd" id="2_kyivt"]
[ext_resource type="Script" path="res://player/player_camera.gd" id="3_6ujgl"]
[ext_resource type="Script" path="res://scenes/player_ants.gd" id="4_nc8uk"]
[ext_resource type="Script" path="res://scenes/enemy_ants.gd" id="5_1xiir"]
[ext_resource type="Script" path="res://entities/player_camp.gd" id="6_bdu2w"]
[ext_resource type="Script" path="res://scenes/buildings.gd" id="6_sp1yx"]
[ext_resource type="Script" path="res://entities/terrain.gd" id="7_js5w2"]
[ext_resource type="Script" path="res://scenes/resources.gd" id="8_iuc0h"]
[ext_resource type="PackedScene" uid="uid://dsx7wydm6py7h" path="res://entities/resources/food_resource.tscn" id="9_ugogf"]
[sub_resource type="GDScript" id="GDScript_87ai3"]
script/source = "extends HBoxContainer
func _process(delta: float) -> void:
$Food.text = \"Food: %5d\" % PlayerCamp.instance.food_capacity
$Wood.text = \"Wood: %5d\" % PlayerCamp.instance.wood_capacity
$Stone.text = \"Stone: %5d\" % PlayerCamp.instance.stone_capacity
"
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_e001c"]
width = 16
height = 16
[sub_resource type="PrismMesh" id="PrismMesh_dw2jx"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nljwt"]
albedo_color = Color(1, 0, 0, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_kxcis"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xnv8j"]
albedo_color = Color(0.4, 0.2636, 0.152, 1)
[sub_resource type="SphereMesh" id="SphereMesh_7o2sd"]
material = SubResource("StandardMaterial3D_xnv8j")
[sub_resource type="SphereShape3D" id="SphereShape3D_mhi37"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4n51k"]
albedo_color = Color(0.45, 0.45, 0.45, 1)
[sub_resource type="SphereMesh" id="SphereMesh_jj3r8"]
material = SubResource("StandardMaterial3D_4n51k")
[sub_resource type="BoxShape3D" id="BoxShape3D_y1i3q"]
size = Vector3(100, 0.01, 100)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ob58c"]
albedo_color = Color(0, 0.46, 0.145667, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_alxwk"]
material = SubResource("StandardMaterial3D_ob58c")
size = Vector2(100, 100)
[sub_resource type="NavigationMesh" id="NavigationMesh_6127e"]
vertices = PackedVector3Array(2, 0.480707, -10.75, 3, 0.480707, -11, 3, 0.480707, -49.5, -49.5, 0.480707, -49.5, -49.5, 0.480707, -10, 2, 0.480707, -10, 3.75, 0.480707, -11, 4, 0.480707, -10, 49.5, 0.480707, -10, 49.5, 0.480707, -49.5, 0.5, 0.480707, -1, 0.75, 0.480707, -0.5, 2.5, 0.480707, -9, 2, 0.480707, -9.25, -0.5, 0.480707, -1, -49.5, 0.480707, 0.25, -0.75, 0.480707, 0.25, 3.75, 0.480707, -9, 0.75, 0.480707, 1, 49.5, 0.480707, 1.5, 0.25, 0.480707, 1.25, 0, 0.480707, 49.5, 0, 0.480707, 1.25, -0.75, 0.480707, 1, -49.5, 0.480707, 49.5, 49.5, 0.480707, 49.5)
polygons = [PackedInt32Array(1, 0, 2), PackedInt32Array(2, 0, 3), PackedInt32Array(3, 0, 4), PackedInt32Array(0, 5, 4), PackedInt32Array(6, 1, 2), PackedInt32Array(6, 2, 7), PackedInt32Array(7, 2, 8), PackedInt32Array(8, 2, 9), PackedInt32Array(12, 11, 10), PackedInt32Array(12, 10, 13), PackedInt32Array(13, 10, 14), PackedInt32Array(14, 16, 15), PackedInt32Array(13, 14, 5), PackedInt32Array(5, 14, 4), PackedInt32Array(4, 14, 15), PackedInt32Array(11, 12, 17), PackedInt32Array(11, 17, 18), PackedInt32Array(18, 17, 19), PackedInt32Array(19, 17, 8), PackedInt32Array(17, 7, 8), PackedInt32Array(19, 20, 18), PackedInt32Array(22, 21, 23), PackedInt32Array(23, 21, 24), PackedInt32Array(23, 24, 15), PackedInt32Array(15, 16, 23), PackedInt32Array(22, 20, 21), PackedInt32Array(21, 20, 19), PackedInt32Array(21, 19, 25)]
geometry_parsed_geometry_type = 1
geometry_source_geometry_mode = 1
geometry_source_group_name = &"NavmeshTargets"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
offset_right = 40.0
offset_bottom = 40.0
script = SubResource("GDScript_87ai3")
[node name="Food" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Wood" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Stone" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="HBoxContainer2" type="VBoxContainer" parent="."]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 40.0
grow_horizontal = 0
[node name="Button" type="Button" parent="HBoxContainer2"]
layout_mode = 2
text = "Add line"
[node name="Player" type="Node" parent="."]
script = ExtResource("2_kyivt")
[node name="PlayerCamera" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 2.38419e-07, 1.98981, 3.94427)
current = true
script = ExtResource("3_6ujgl")
[node name="Sprite3D" type="Sprite3D" parent="Player/PlayerCamera"]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 1, 0)
cast_shadow = 0
axis = 1
billboard = 2
texture = SubResource("NoiseTexture2D_e001c")
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="Player/PlayerCamera"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
remote_path = NodePath("../../SubViewportContainer/SubViewport/Camera3D")
update_rotation = false
update_scale = false
[node name="RayCast3D" type="RayCast3D" parent="Player"]
target_position = Vector3(0, 0, 0)
debug_shape_custom_color = Color(0, 0.633333, 1, 1)
[node name="SubViewportContainer" type="SubViewportContainer" parent="Player"]
visible = false
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -255.0
offset_top = -255.0
grow_horizontal = 0
grow_vertical = 0
size_flags_vertical = 3
mouse_filter = 0
[node name="SubViewport" type="SubViewport" parent="Player/SubViewportContainer"]
handle_input_locally = false
size = Vector2i(255, 255)
render_target_update_mode = 0
[node name="Camera3D" type="Camera3D" parent="Player/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 2.38419e-07, 11.6491, 1.35608)
projection = 1
current = true
size = 20.0
[node name="PlayerAnts" type="Node" parent="."]
script = ExtResource("4_nc8uk")
[node name="EnemyAnts" type="Node" parent="."]
script = ExtResource("5_1xiir")
[node name="Buildings" type="Node" parent="."]
script = ExtResource("6_sp1yx")
[node name="PlayerCamp" type="StaticBody3D" parent="Buildings" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.480707, 0)
script = ExtResource("6_bdu2w")
[node name="PlayerCamp" type="MeshInstance3D" parent="Buildings/PlayerCamp"]
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_nljwt")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Buildings/PlayerCamp"]
shape = SubResource("ConcavePolygonShape3D_kxcis")
[node name="Resources" type="Node" parent="."]
script = ExtResource("8_iuc0h")
[node name="FoodResource" parent="Resources" groups=["NavmeshTargets"] instance=ExtResource("9_ugogf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, -10)
[node name="WoodResource" type="StaticBody3D" parent="Resources" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.587, 0.388953, -1.42182)
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Resources/WoodResource"]
mesh = SubResource("SphereMesh_7o2sd")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Resources/WoodResource"]
shape = SubResource("SphereShape3D_mhi37")
[node name="Timer" type="Timer" parent="Resources/WoodResource"]
autostart = true
[node name="StoneResource" type="StaticBody3D" parent="Resources" groups=["NavmeshTargets"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0.404562, -1)
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Resources/StoneResource"]
mesh = SubResource("SphereMesh_jj3r8")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Resources/StoneResource"]
shape = SubResource("SphereShape3D_mhi37")
[node name="Timer" type="Timer" parent="Resources/StoneResource"]
autostart = true
[node name="Terrain" type="StaticBody3D" parent="." groups=["NavmeshTargets"]]
script = ExtResource("7_js5w2")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Terrain"]
shape = SubResource("BoxShape3D_y1i3q")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Terrain"]
mesh = SubResource("PlaneMesh_alxwk")
skeleton = NodePath("../..")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Terrain"]
navigation_mesh = SubResource("NavigationMesh_6127e")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")
[connection signal="timeout" from="Resources/WoodResource/Timer" to="Resources/WoodResource" method="_on_tick"]
[connection signal="timeout" from="Resources/StoneResource/Timer" to="Resources/StoneResource" method="_on_tick"]

88
scenes/gam6E0A.tmp Normal file
View File

@@ -0,0 +1,88 @@
[gd_scene load_steps=13 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="PackedScene" uid="uid://chjbet2mt6llt" path="res://player/player.tscn" id="2_2fdmj"]
[ext_resource type="Script" path="res://scenes/player_ants.gd" id="4_nc8uk"]
[ext_resource type="Script" path="res://scenes/enemy_ants.gd" id="5_1xiir"]
[ext_resource type="PackedScene" uid="uid://b1b7efqg14tt3" path="res://entities/buildings/player_camp.tscn" id="5_3nas7"]
[ext_resource type="Script" path="res://scenes/buildings.gd" id="6_sp1yx"]
[ext_resource type="Script" path="res://scenes/resources.gd" id="8_iuc0h"]
[ext_resource type="PackedScene" uid="uid://befndbtsiwm0y" path="res://entities/terrain/terrain.tscn" id="10_qb084"]
[sub_resource type="GDScript" id="GDScript_87ai3"]
script/source = "extends HBoxContainer
func _process(delta: float) -> void:
$Food.text = \"Food: %5d\" % PlayerCamp.instance.food_capacity
$Wood.text = \"Wood: %5d\" % PlayerCamp.instance.wood_capacity
$Stone.text = \"Stone: %5d\" % PlayerCamp.instance.stone_capacity
"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
offset_right = 40.0
offset_bottom = 40.0
script = SubResource("GDScript_87ai3")
[node name="Food" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Wood" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="Stone" type="Label" parent="HBoxContainer"]
layout_mode = 2
[node name="HBoxContainer2" type="VBoxContainer" parent="."]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 40.0
grow_horizontal = 0
[node name="Button" type="Button" parent="HBoxContainer2"]
layout_mode = 2
text = "Add line"
[node name="Player" parent="." instance=ExtResource("2_2fdmj")]
[node name="PlayerAnts" type="Node" parent="."]
script = ExtResource("4_nc8uk")
[node name="EnemyAnts" type="Node" parent="."]
script = ExtResource("5_1xiir")
[node name="StaticBody3D" parent="." instance=ExtResource("5_3nas7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.853403, -0.0590961)
[node name="Buildings" type="Node" parent="."]
script = ExtResource("6_sp1yx")
[node name="Resources" type="Node" parent="."]
script = ExtResource("8_iuc0h")
[node name="Terrain" parent="." instance=ExtResource("10_qb084")]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")

56
scenes/gam83F5.tmp Normal file
View File

@@ -0,0 +1,56 @@
[gd_scene load_steps=11 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="PackedScene" uid="uid://chjbet2mt6llt" path="res://player/player.tscn" id="2_2fdmj"]
[ext_resource type="Script" path="res://scenes/enemy_ants.gd" id="5_1xiir"]
[ext_resource type="PackedScene" uid="uid://b1b7efqg14tt3" path="res://entities/buildings/player_camp.tscn" id="5_3nas7"]
[ext_resource type="Script" path="res://scenes/buildings.gd" id="6_sp1yx"]
[ext_resource type="Script" path="res://scenes/resources.gd" id="8_iuc0h"]
[ext_resource type="PackedScene" uid="uid://befndbtsiwm0y" path="res://entities/terrain/terrain.tscn" id="10_qb084"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="EnemyAnts" type="Node" parent="."]
script = ExtResource("5_1xiir")
[node name="Buildings" type="Node" parent="."]
script = ExtResource("6_sp1yx")
[node name="PlayerCamp" parent="Buildings" instance=ExtResource("5_3nas7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.093426, -0.0590961)
[node name="Resources" type="Node" parent="."]
script = ExtResource("8_iuc0h")
[node name="Player" parent="." instance=ExtResource("2_2fdmj")]
[node name="PlayerCamera" parent="Player" index="0"]
transform = Transform3D(-0.971344, 0.136328, -0.194696, 0, 0.819152, 0.573576, 0.23768, 0.55714, -0.795678, -4.77009, 10.2295, -15.5818)
[node name="Camera3D" parent="Player/TextureRect/SubViewportContainer/SubViewport" index="0"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -3.40681, 18.421, -10.0104)
[node name="Terrain" parent="." instance=ExtResource("10_qb084")]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")
[editable path="Player"]

148
scenes/gam89CA.tmp Normal file
View File

@@ -0,0 +1,148 @@
[gd_scene load_steps=18 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="Script" path="res://entities/faction/player/player.gd" id="2_kyivt"]
[ext_resource type="Script" path="res://entities/faction/player/player_camera.gd" id="3_6ujgl"]
[ext_resource type="Script" path="res://scenes/player_camp.gd" id="6_bdu2w"]
[ext_resource type="Script" path="res://entities/terrain.gd" id="7_js5w2"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_e001c"]
width = 16
height = 16
[sub_resource type="PrismMesh" id="PrismMesh_dw2jx"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nljwt"]
albedo_color = Color(1, 0, 0, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_kxcis"]
data = PackedVector3Array(0, 0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, 0, 0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5, -0.5, 0, 0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, -0.5, 0, 0.5, 0.5, -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5)
[sub_resource type="SphereMesh" id="SphereMesh_3yo4a"]
[sub_resource type="BoxShape3D" id="BoxShape3D_y1i3q"]
size = Vector3(100, 0.01, 100)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ob58c"]
albedo_color = Color(0, 0.46, 0.145667, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_alxwk"]
material = SubResource("StandardMaterial3D_ob58c")
size = Vector2(100, 100)
[sub_resource type="NavigationMesh" id="NavigationMesh_6127e"]
vertices = PackedVector3Array(-49.5, 0.480707, 0, -0.75, 0.480707, 0, -0.75, 0.480707, -0.75, 0, 0.480707, -1, 0, 0.480707, -49.5, -49.5, 0.480707, -49.5, 0.75, 0.480707, -0.75, 0.75, 0.480707, 0, 49.5, 0.480707, 0, 49.5, 0.480707, -49.5, 0, 0.480707, 49.5, 0, 0.480707, 1.25, -0.75, 0.480707, 1, -49.5, 0.480707, 49.5, 0.75, 0.480707, 1, 49.5, 0.480707, 49.5)
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(3, 2, 4), PackedInt32Array(4, 2, 5), PackedInt32Array(5, 2, 0), PackedInt32Array(8, 7, 6), PackedInt32Array(3, 4, 6), PackedInt32Array(6, 4, 9), PackedInt32Array(6, 9, 8), PackedInt32Array(11, 10, 12), PackedInt32Array(12, 10, 13), PackedInt32Array(12, 13, 0), PackedInt32Array(0, 1, 12), PackedInt32Array(11, 14, 10), PackedInt32Array(10, 14, 15), PackedInt32Array(15, 14, 8), PackedInt32Array(14, 7, 8)]
geometry_parsed_geometry_type = 1
geometry_source_geometry_mode = 1
geometry_source_group_name = &"TerrainEntities"
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_mmhs2"]
sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="Player" type="Node" parent="."]
script = ExtResource("2_kyivt")
[node name="PlayerCamera" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 2.38419e-07, 1.98981, 3.94427)
current = true
script = ExtResource("3_6ujgl")
[node name="Sprite3D" type="Sprite3D" parent="Player/PlayerCamera"]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 1, 0)
cast_shadow = 0
axis = 1
billboard = 2
texture = SubResource("NoiseTexture2D_e001c")
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="Player/PlayerCamera"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 0)
remote_path = NodePath("../../SubViewportContainer/SubViewport/Camera3D")
update_rotation = false
update_scale = false
[node name="RayCast3D" type="RayCast3D" parent="Player"]
target_position = Vector3(0, 0, 0)
debug_shape_custom_color = Color(0, 0.633333, 1, 1)
[node name="SubViewportContainer" type="SubViewportContainer" parent="Player"]
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -255.0
offset_top = -255.0
grow_horizontal = 0
grow_vertical = 0
size_flags_vertical = 3
mouse_filter = 0
[node name="SubViewport" type="SubViewport" parent="Player/SubViewportContainer"]
handle_input_locally = false
size = Vector2i(255, 255)
render_target_update_mode = 4
[node name="Camera3D" type="Camera3D" parent="Player/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 2.38419e-07, 11.6491, 1.35608)
projection = 1
current = true
size = 20.0
[node name="Player Ants" type="Node" parent="."]
[node name="Enemy Ants" type="Node" parent="."]
[node name="Buildings" type="Node" parent="."]
[node name="PlayerCamp" type="StaticBody3D" parent="Buildings" groups=["TerrainEntities"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.480707, 0)
script = ExtResource("6_bdu2w")
[node name="PlayerCamp" type="MeshInstance3D" parent="Buildings/PlayerCamp"]
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../Terrain/MeshInstance3D")
surface_material_override/0 = SubResource("StandardMaterial3D_nljwt")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Buildings/PlayerCamp"]
shape = SubResource("ConcavePolygonShape3D_kxcis")
[node name="Resources" type="Node" parent="."]
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Resources"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.93551, 0.40872, 1.77864)
mesh = SubResource("SphereMesh_3yo4a")
skeleton = NodePath("../../Terrain/MeshInstance3D")
[node name="Terrain" type="StaticBody3D" parent="." groups=["TerrainEntities"]]
script = ExtResource("7_js5w2")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Terrain"]
shape = SubResource("BoxShape3D_y1i3q")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Terrain"]
mesh = SubResource("PlaneMesh_alxwk")
skeleton = NodePath("../..")
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Terrain"]
navigation_mesh = SubResource("NavigationMesh_6127e")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")

View File

@@ -1,9 +1,18 @@
class_name Game extends Node3D
class_name Game extends Node
static var instance:Game
var score := 0
var enemies_per_spawn := 1
func _init() -> void:
instance = self
func _ready() -> void:
pass # Replace with function body.
func _on_timer_timeout() -> void:
enemies_per_spawn += 1
func _process(delta: float) -> void:
pass
func game_over()->void:
process_mode = PROCESS_MODE_DISABLED
$GameOver.show()
$GameOver/Label2.text = "Score: %d" % score

View File

@@ -1,10 +1,14 @@
[gd_scene load_steps=21 format=3 uid="uid://rnmcx0o0hdgb"]
[gd_scene load_steps=16 format=3 uid="uid://rnmcx0o0hdgb"]
[ext_resource type="Script" path="res://scenes/game.gd" id="1_3n5gp"]
[ext_resource type="Script" path="res://entities/faction/player/player_camera.gd" id="2_1etxd"]
[ext_resource type="Script" path="res://entities/faction/player/player.gd" id="2_ba5k2"]
[ext_resource type="PackedScene" uid="uid://ch7ug2prgwyyn" path="res://entities/faction/fog_of_war.tscn" id="5_8a5ny"]
[ext_resource type="Script" path="res://entities/faction/enemy/enemy.gd" id="6_y7ter"]
[ext_resource type="PackedScene" uid="uid://chjbet2mt6llt" path="res://player/player.tscn" id="2_2fdmj"]
[ext_resource type="PackedScene" uid="uid://c36qc7q4r0juf" path="res://entities/buildings/enemy_spawn.tscn" id="2_twbpc"]
[ext_resource type="PackedScene" uid="uid://dsx7wydm6py7h" path="res://entities/resources/food_resource.tscn" id="6_xr7w4"]
[ext_resource type="PackedScene" uid="uid://kslywe6neejo" path="res://entities/resources/stone_resource.tscn" id="7_bkapj"]
[ext_resource type="Script" path="res://scenes/resources.gd" id="8_iuc0h"]
[ext_resource type="PackedScene" uid="uid://kh5xmgawk26n" path="res://entities/resources/wood_resource.tscn" id="8_jhxv1"]
[ext_resource type="Texture2D" uid="uid://dl3j7ai85use8" path="res://assets/textures/minimap_surrounding.png" id="9_330a5"]
[ext_resource type="PackedScene" uid="uid://befndbtsiwm0y" path="res://entities/terrain/terrain.tscn" id="10_qb084"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tx3qi"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
@@ -16,219 +20,174 @@ sky_material = SubResource("ProceduralSkyMaterial_tx3qi")
[sub_resource type="Environment" id="Environment_r8f2r"]
background_mode = 2
sky = SubResource("Sky_mmhs2")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_e001c"]
width = 16
height = 16
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uywdj"]
bg_color = Color(0.873298, 0.873298, 0.873298, 1)
[sub_resource type="PrismMesh" id="PrismMesh_dw2jx"]
[sub_resource type="LabelSettings" id="LabelSettings_xc35i"]
font_size = 30
font_color = Color(1, 0, 0, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nljwt"]
albedo_color = Color(1, 0, 0, 1)
[sub_resource type="GDScript" id="GDScript_e4ma0"]
script/source = "extends Label
"
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_api38"]
albedo_color = Color(0.53, 0, 0, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_cpeim"]
lightmap_size_hint = Vector2i(17, 14)
material = SubResource("StandardMaterial3D_api38")
radius = 0.25
height = 1.0
[sub_resource type="Animation" id="Animation_qp8oi"]
resource_name = "db_anim"
length = 12.0
step = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 2, 2.5, 4, 4.5, 6, 7, 9, 9.5, 12),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [Vector3(-5.16842, 0.25, 6.861), Vector3(-5.16842, 0.25, -0.139), Vector3(-4.16842, 0.25, -0.139), Vector3(4.83158, 0.249999, -0.139), Vector3(5.83158, 0.249999, -1.139), Vector3(5.83158, 0.249999, -7.139), Vector3(4.83158, 0.249999, -7.139), Vector3(-5.16842, 0.249999, -7.139), Vector3(-6.16842, 0.249999, -6.139), Vector3(-6.16841, 0.249998, 4.861)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 2, 2.5, 4, 4.5, 6, 7, 9, 9.5, 12),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [Vector3(-1.5708, 0, 0), Vector3(-1.5708, 0, 0), Vector3(-1.5708, -1.5708, 0), Vector3(-1.5708, -1.5708, 0), Vector3(-1.5708, -7.17753e-23, 0), Vector3(-1.5708, -7.17753e-23, 0), Vector3(-1.5708, 1.5708, 0), Vector3(-1.5708, 1.5708, 0), Vector3(-1.5708, -3.14159, 0), Vector3(-1.5708, -3.14159, 0)]
}
[sub_resource type="Animation" id="Animation_27gua"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(-5.16842, 0.25, 6.861)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(-1.5708, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ae667"]
_data = {
"RESET": SubResource("Animation_27gua"),
"db_anim": SubResource("Animation_qp8oi")
}
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xv1v4"]
albedo_color = Color(0, 0.766667, 1, 1)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ob58c"]
albedo_color = Color(0, 0.46, 0.145667, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_alxwk"]
material = SubResource("StandardMaterial3D_ob58c")
size = Vector2(20, 20)
[sub_resource type="SphereMesh" id="SphereMesh_3yo4a"]
[node name="Game" type="Node3D"]
[node name="Game" type="Node"]
script = ExtResource("1_3n5gp")
[node name="Timer" type="Timer" parent="."]
wait_time = 30.0
autostart = true
[node name="Enemy" type="Node" parent="."]
[node name="EnemySpawn" parent="Enemy" instance=ExtResource("2_twbpc")]
[node name="EnemySpawn2" parent="Enemy" instance=ExtResource("2_twbpc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 75.5555, 8.31779, -42.0229)
[node name="EnemySpawn3" parent="Enemy" instance=ExtResource("2_twbpc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -68.2131, 1.3008, 38.946)
[node name="EnemySpawn4" parent="Enemy" instance=ExtResource("2_twbpc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 66.7359, 1.3008, 77.7888)
[node name="Resources" type="Node" parent="."]
script = ExtResource("8_iuc0h")
[node name="FoodResource" parent="Resources" instance=ExtResource("6_xr7w4")]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, 19.2151, 2.39926, -22.1209)
[node name="StoneResource" parent="Resources" instance=ExtResource("7_bkapj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29.4151, 0.126608, -21.4505)
[node name="WoodResource" parent="Resources" instance=ExtResource("8_jhxv1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5346, 0.464527, -44.447)
[node name="FoodResource2" parent="Resources" instance=ExtResource("6_xr7w4")]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, 17.2151, 0.426967, 59.8791)
[node name="StoneResource2" parent="Resources" instance=ExtResource("7_bkapj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -54.4151, 0.126608, 61.5495)
[node name="StoneResource4" parent="Resources" instance=ExtResource("7_bkapj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 66.5849, 7.58353, -31.4505)
[node name="WoodResource2" parent="Resources" instance=ExtResource("8_jhxv1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 65.5346, 6.9622, -60.447)
[node name="WoodResource4" parent="Resources" instance=ExtResource("8_jhxv1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 77.5346, -0.600881, 79.553)
[node name="FoodResource3" parent="Resources" instance=ExtResource("6_xr7w4")]
transform = Transform3D(0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, 81.2151, -0.292938, -13.1209)
[node name="StoneResource3" parent="Resources" instance=ExtResource("7_bkapj")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -55.1899, -0.670905, -75.5972)
[node name="WoodResource3" parent="Resources" instance=ExtResource("8_jhxv1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 24.5282, 1.76844, 32.0897)
[node name="Player" parent="." instance=ExtResource("2_2fdmj")]
[node name="PlayerCamera" parent="Player" index="0"]
transform = Transform3D(-0.971344, 0.136328, -0.194696, 0, 0.819152, 0.573576, 0.23768, 0.55714, -0.795678, -4.77009, 10.2295, -15.5818)
[node name="Camera3D" parent="Player/TextureRect/SubViewportContainer/SubViewport" index="0"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -3.40681, 18.421, -10.0104)
[node name="Terrain" parent="." instance=ExtResource("10_qb084")]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0)
light_color = Color(1, 0.913725, 0.917647, 1)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_r8f2r")
[node name="Player" type="Node" parent="."]
script = ExtResource("2_ba5k2")
[node name="GameOver" type="Panel" parent="."]
process_mode = 2
visible = false
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -111.0
offset_top = -66.0
offset_right = 111.0
offset_bottom = 120.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_uywdj")
[node name="PlayerCamera" type="Camera3D" parent="Player"]
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 2.38419e-07, 1.98981, 3.94427)
script = ExtResource("2_1etxd")
[node name="Sprite3D" type="Sprite3D" parent="Player/PlayerCamera"]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 1, 0)
cast_shadow = 0
axis = 1
billboard = 2
texture = SubResource("NoiseTexture2D_e001c")
[node name="PlayerUI" type="Control" parent="Player"]
layout_mode = 3
[node name="TextureRect" type="TextureRect" parent="GameOver"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -37.0
offset_top = -61.0
offset_right = 43.0
offset_bottom = 6.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("9_330a5")
expand_mode = 1
[node name="SubViewportContainer" type="SubViewportContainer" parent="Player/PlayerUI"]
[node name="Label" type="Label" parent="GameOver"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -206.0
offset_top = -206.0
grow_horizontal = 0
grow_vertical = 0
stretch = true
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -95.5
offset_top = -79.0
offset_right = 95.5
offset_bottom = -29.0
grow_horizontal = 2
grow_vertical = 2
text = "Game over!"
label_settings = SubResource("LabelSettings_xc35i")
script = SubResource("GDScript_e4ma0")
[node name="SubViewport" type="SubViewport" parent="Player/PlayerUI/SubViewportContainer"]
handle_input_locally = false
size = Vector2i(206, 206)
render_target_update_mode = 4
[node name="Label2" type="Label" parent="GameOver"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -79.5
offset_top = -31.0
offset_right = 79.5
offset_bottom = 11.0
grow_horizontal = 2
grow_vertical = 2
text = "Score: 500"
horizontal_alignment = 1
script = SubResource("GDScript_e4ma0")
[node name="Camera3D" type="Camera3D" parent="Player/PlayerUI/SubViewportContainer/SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0)
projection = 1
size = 20.0
[node name="Label3" type="Label" parent="GameOver"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -79.0
offset_top = 17.0
offset_right = 80.0
offset_bottom = 59.0
grow_horizontal = 2
grow_vertical = 2
text = "Well done!"
horizontal_alignment = 1
script = SubResource("GDScript_e4ma0")
[node name="FogOfWar" parent="Player" instance=ExtResource("5_8a5ny")]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
[node name="Buildings" type="Node" parent="Player"]
[node name="PlayerCamp" type="MeshInstance3D" parent="Player/Buildings"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0.40872, 7)
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../Environment/Terrain")
surface_material_override/0 = SubResource("StandardMaterial3D_nljwt")
[node name="Units" type="Node" parent="Player"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="Player/Units"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -5.16842, 0.25, 6.861)
mesh = SubResource("CapsuleMesh_cpeim")
[node name="AnimationPlayer" type="AnimationPlayer" parent="Player"]
root_node = NodePath("../Units")
libraries = {
"": SubResource("AnimationLibrary_ae667")
}
autoplay = "db_anim"
[node name="Enemy" type="Node" parent="."]
script = ExtResource("6_y7ter")
[node name="FogOfWar" parent="Enemy" instance=ExtResource("5_8a5ny")]
visual = false
[node name="Buildings" type="Node" parent="Enemy"]
[node name="MeshInstance3D3" type="MeshInstance3D" parent="Enemy/Buildings"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8, 0.40872, -7)
mesh = SubResource("PrismMesh_dw2jx")
skeleton = NodePath("../../../Environment/Terrain")
surface_material_override/0 = SubResource("StandardMaterial3D_xv1v4")
[node name="Units" type="Node" parent="Enemy"]
[node name="Environment" type="Node" parent="."]
[node name="Terrain" type="MeshInstance3D" parent="Environment"]
mesh = SubResource("PlaneMesh_alxwk")
skeleton = NodePath("../..")
[node name="Food" type="Node" parent="Environment"]
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Environment/Food"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.41598, 0.40872, -3.16507)
mesh = SubResource("SphereMesh_3yo4a")
skeleton = NodePath("../../Terrain")
[node name="MeshInstance3D4" type="MeshInstance3D" parent="Environment/Food"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.57951, 0.40872, 2.67711)
mesh = SubResource("SphereMesh_3yo4a")
skeleton = NodePath("../../Terrain")
[node name="MeshInstance3D5" type="MeshInstance3D" parent="Environment/Food"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.39705, 0.408719, -3.50521)
mesh = SubResource("SphereMesh_3yo4a")
skeleton = NodePath("../../Terrain")
[node name="MeshInstance3D6" type="MeshInstance3D" parent="Environment/Food"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0892634, 0.408719, 5.57122)
mesh = SubResource("SphereMesh_3yo4a")
skeleton = NodePath("../../Terrain")
[editable path="Player"]

6
scenes/resources.gd Normal file
View File

@@ -0,0 +1,6 @@
class_name Resources extends Node
static var instance:Resources
func _init() -> void:
instance = self