Finished first EA Version #1
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 750 B |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bmcpkt6mae2qi"
|
||||
path="res://.godot/imported/AlarmSign.png-bfa4225e0b767235443e8fcecfa3eec3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/AlarmSign.png"
|
||||
dest_files=["res://.godot/imported/AlarmSign.png-bfa4225e0b767235443e8fcecfa3eec3.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
+56
-15
@@ -1,9 +1,10 @@
|
||||
[gd_scene format=3 uid="uid://cgsmfi2s51cbd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://br2udyi6t8yvf" path="res://Scripts/World.cs" id="1_xkndl"]
|
||||
[ext_resource type="Script" uid="uid://dqrdb3bvws6b6" path="res://Scripts/SteamworksHandler.cs" id="2_xkndl"]
|
||||
[ext_resource type="Script" uid="uid://c7khr6oist3ku" path="res://Scripts/Camera3d.cs" id="3_u44n3"]
|
||||
[ext_resource type="Script" uid="uid://bm7knir4552j5" path="res://Scripts/Helpers/UIHandler.cs" id="4_sb48q"]
|
||||
[ext_resource type="Script" uid="uid://br2udyi6t8yvf" path="res://Scripts/World.cs" id="1_kldst"]
|
||||
[ext_resource type="Script" uid="uid://dqrdb3bvws6b6" path="res://Scripts/SteamworksHandler.cs" id="2_b2bpf"]
|
||||
[ext_resource type="Script" uid="uid://c7khr6oist3ku" path="res://Scripts/Camera3d.cs" id="3_7lihs"]
|
||||
[ext_resource type="Script" uid="uid://bm7knir4552j5" path="res://Scripts/Helpers/UIHandler.cs" id="4_fgofq"]
|
||||
[ext_resource type="Texture2D" uid="uid://bmcpkt6mae2qi" path="res://Assets/AlarmSign.png" id="5_b2bpf"]
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_u44n3"]
|
||||
|
||||
@@ -19,18 +20,21 @@ background_color = Color(0.27141052, 0.1874483, 0.13788113, 1)
|
||||
sky = SubResource("Sky_u44n3")
|
||||
glow_enabled = true
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_b2bpf"]
|
||||
bg_color = Color(0.053073194, 0.053073194, 0.053073194, 1)
|
||||
|
||||
[node name="Main" type="Node3D" unique_id=234207355]
|
||||
|
||||
[node name="World" type="Node3D" parent="." unique_id=770208789]
|
||||
script = ExtResource("1_xkndl")
|
||||
script = ExtResource("1_kldst")
|
||||
|
||||
[node name="SteamworksHandler" type="Node" parent="." unique_id=1183440473]
|
||||
script = ExtResource("2_xkndl")
|
||||
script = ExtResource("2_b2bpf")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." unique_id=161504606]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.25881907, 0.9659258, 0, -0.9659258, 0.25881907, 30, 20, 30)
|
||||
current = true
|
||||
script = ExtResource("3_u44n3")
|
||||
script = ExtResource("3_7lihs")
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=377970686]
|
||||
environment = SubResource("Environment_sb48q")
|
||||
@@ -46,19 +50,56 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("4_sb48q")
|
||||
script = ExtResource("4_fgofq")
|
||||
|
||||
[node name="CodingWindow" type="Panel" parent="Control" unique_id=1765248892]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Control" unique_id=1437975209]
|
||||
layout_mode = 1
|
||||
anchors_preset = 11
|
||||
anchor_left = 1.0
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -500.0
|
||||
grow_horizontal = 0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Button" type="Button" parent="Control/CodingWindow" unique_id=2015284121]
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Control/VBoxContainer" unique_id=1744492333]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_b2bpf")
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="Control/VBoxContainer/PanelContainer" unique_id=1048237062]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 200
|
||||
alignment = 1
|
||||
|
||||
[node name="Robotcount" type="RichTextLabel" parent="Control/VBoxContainer/PanelContainer/Header" unique_id=1955918671]
|
||||
layout_mode = 2
|
||||
text = "Roboter: 0/0"
|
||||
fit_content = true
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="RobotWarning" type="TextureRect" parent="Control/VBoxContainer/PanelContainer/Header" unique_id=759915558]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("5_b2bpf")
|
||||
expand_mode = 2
|
||||
|
||||
[node name="DayCount" type="RichTextLabel" parent="Control/VBoxContainer/PanelContainer/Header" unique_id=1228850272]
|
||||
layout_mode = 2
|
||||
text = "Tag 1"
|
||||
fit_content = true
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="Time" type="RichTextLabel" parent="Control/VBoxContainer/PanelContainer/Header" unique_id=1457538761]
|
||||
layout_mode = 2
|
||||
text = "19:20"
|
||||
fit_content = true
|
||||
autowrap_mode = 0
|
||||
|
||||
[node name="Content" type="CenterContainer" parent="Control/VBoxContainer" unique_id=1233102684]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="CodingWindow" type="Panel" parent="Control/VBoxContainer/Content" unique_id=1765248892]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button" type="Button" parent="Control/VBoxContainer/Content/CodingWindow" unique_id=2015284121]
|
||||
layout_mode = 0
|
||||
offset_left = 100.0
|
||||
offset_top = 600.0
|
||||
@@ -66,7 +107,7 @@ offset_right = 400.0
|
||||
offset_bottom = 635.0
|
||||
text = "Move"
|
||||
|
||||
[node name="PositionInput" type="LineEdit" parent="Control/CodingWindow" unique_id=1834676849]
|
||||
[node name="PositionInput" type="LineEdit" parent="Control/VBoxContainer/Content/CodingWindow" unique_id=1834676849]
|
||||
layout_mode = 0
|
||||
offset_left = 125.0
|
||||
offset_top = 50.0
|
||||
|
||||
@@ -47,15 +47,7 @@ public partial class Layer : Node3D
|
||||
int safetyCounter = 0;
|
||||
while (true)
|
||||
{
|
||||
if (GenerateLayer())
|
||||
{
|
||||
GD.Print("Layer generated");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
GD.PrintErr("Layer failed... trying again");
|
||||
}
|
||||
if (GenerateLayer()) break;
|
||||
ResetLayer(tileMeshes);
|
||||
safetyCounter++;
|
||||
if (safetyCounter > 1000) break;
|
||||
@@ -143,8 +135,8 @@ public partial class Layer : Node3D
|
||||
Vector2I position = GetSmallestPossibilities();
|
||||
while (true)
|
||||
{
|
||||
string keyword = "";
|
||||
if (position.X == 0 || position.X == layerSize - 1 || position.Y == 0 || position.Y == layerSize - 1)
|
||||
string keyword;
|
||||
if (position.X == 0 || position.X == layerSize - 1 || position.Y == 0 || position.Y == layerSize - 1)
|
||||
{
|
||||
keyword = tiles[position.X, position.Y].Collapse("border");
|
||||
}
|
||||
@@ -152,11 +144,7 @@ public partial class Layer : Node3D
|
||||
{
|
||||
keyword = tiles[position.X, position.Y].Collapse("");
|
||||
}
|
||||
if (keyword == "ERR")
|
||||
{
|
||||
GD.Print("Error in WFC during collapse!");
|
||||
return false;
|
||||
}
|
||||
if (keyword == "ERR") return false;
|
||||
if (keyword != "")
|
||||
{
|
||||
NewPropagate(position);
|
||||
@@ -169,11 +157,7 @@ public partial class Layer : Node3D
|
||||
continue;
|
||||
}
|
||||
safetyCounter++;
|
||||
if (safetyCounter == layerSize * layerSize)
|
||||
{
|
||||
GD.Print("Error in WFC, overflow!");
|
||||
return false;
|
||||
}
|
||||
if (safetyCounter == layerSize * layerSize) return false;
|
||||
}
|
||||
if (updateFailed) return false;
|
||||
//Spawn is a tile border, redo world generation
|
||||
@@ -224,7 +208,6 @@ public partial class Layer : Node3D
|
||||
|
||||
if (updateCount == int.MaxValue)
|
||||
{
|
||||
GD.Print("WFC Error! No meshes left");
|
||||
updateFailed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,5 @@ public class Placeholder
|
||||
public Placeholder(string name, Vector3 pos){
|
||||
this.name = name.Split("_")[0];
|
||||
this.pos = pos;
|
||||
GD.Print($"Generated placeholder {this.name}");
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,6 @@ public class WFC
|
||||
}
|
||||
|
||||
}
|
||||
if (safetyCounter > layer.Length * 2) GD.PrintErr("Loop too long");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,6 @@ public partial class World : Node3D
|
||||
map = new Layer[ruinSize];
|
||||
GenerateWorld();
|
||||
|
||||
GD.Print("World generated");
|
||||
|
||||
HandleRenderData(BuildRenderData(0));
|
||||
}
|
||||
|
||||
@@ -96,7 +94,6 @@ public partial class World : Node3D
|
||||
|
||||
private void GenerateWorld()
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
for (int layer = 0; layer < ruinSize; layer++)
|
||||
{
|
||||
layerNode = layerPrefab.Instantiate<Layer>();
|
||||
@@ -104,7 +101,6 @@ public partial class World : Node3D
|
||||
layerNode.SetupLayer(layerSize, layer, tileMeshes);
|
||||
map[layer] = layerNode;
|
||||
}
|
||||
GD.Print("Time for map generation: " + (DateTime.Now - now).Seconds);
|
||||
}
|
||||
|
||||
private List<TileRenderData> BuildRenderData(int layerIndex)
|
||||
|
||||
Reference in New Issue
Block a user