From d1cdb4c186a731ff41d31c10c24924e9bf493283 Mon Sep 17 00:00:00 2001 From: Ryan Reed Date: Thu, 17 Aug 2023 21:42:59 -0400 Subject: [PATCH] Changing directory structure and cleanup --- README.md | 3 ++- icon.svg => assets/icon.svg | 0 icon.svg.import => assets/icon.svg.import | 6 +++--- project.godot | 4 ++-- world.gd => scenes/conway.gd | 0 world.tscn => scenes/conway.tscn | 19 +++++++------------ scenes/fps_counter/fps_counter.gd | 10 ---------- scenes/fps_counter/fps_counter.tscn | 8 -------- 8 files changed, 14 insertions(+), 36 deletions(-) rename icon.svg => assets/icon.svg (100%) rename icon.svg.import => assets/icon.svg.import (76%) rename world.gd => scenes/conway.gd (100%) rename world.tscn => scenes/conway.tscn (92%) delete mode 100644 scenes/fps_counter/fps_counter.gd delete mode 100644 scenes/fps_counter/fps_counter.tscn diff --git a/README.md b/README.md index 834b71d..f2b070b 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,6 @@ My attempt at a [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway's_Game_of_Life) simulation using Godot 4 +The project is also utilizing a RenderingServer to generate the cells. -The project is also utilizing a RenderingServer to generate the cells. This might be overkill but though it would be fun to try. +The project is over engineered but what isn't? diff --git a/icon.svg b/assets/icon.svg similarity index 100% rename from icon.svg rename to assets/icon.svg diff --git a/icon.svg.import b/assets/icon.svg.import similarity index 76% rename from icon.svg.import rename to assets/icon.svg.import index 759bd0d..908a525 100644 --- a/icon.svg.import +++ b/assets/icon.svg.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://c2vm5pfsamed4" -path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +path="res://.godot/imported/icon.svg-56083ea2a1f1a4f1e49773bdc6d7826c.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://icon.svg" -dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] +source_file="res://assets/icon.svg" +dest_files=["res://.godot/imported/icon.svg-56083ea2a1f1a4f1e49773bdc6d7826c.ctex"] [params] diff --git a/project.godot b/project.godot index ed5ab70..53b5ebc 100644 --- a/project.godot +++ b/project.godot @@ -11,9 +11,9 @@ config_version=5 [application] config/name="Conway's Game of Life" -run/main_scene="res://world.tscn" +run/main_scene="res://scenes/conway.tscn" config/features=PackedStringArray("4.1", "Forward Plus") -config/icon="res://icon.svg" +config/icon="res://assets/icon.svg" [input] diff --git a/world.gd b/scenes/conway.gd similarity index 100% rename from world.gd rename to scenes/conway.gd diff --git a/world.tscn b/scenes/conway.tscn similarity index 92% rename from world.tscn rename to scenes/conway.tscn index 34bb05e..caaa62e 100644 --- a/world.tscn +++ b/scenes/conway.tscn @@ -1,14 +1,13 @@ -[gd_scene load_steps=5 format=3 uid="uid://d3twfk56sjf2m"] +[gd_scene load_steps=4 format=3 uid="uid://d3twfk56sjf2m"] -[ext_resource type="Script" path="res://world.gd" id="1_wavft"] -[ext_resource type="Texture2D" uid="uid://c2vm5pfsamed4" path="res://icon.svg" id="2_8r6bn"] -[ext_resource type="PackedScene" uid="uid://cy6vsgu8o0rad" path="res://scenes/fps_counter/fps_counter.tscn" id="3_ves6s"] -[ext_resource type="Texture2D" uid="uid://b8gggrriib8n" path="res://assets/refresh.png" id="4_fcljs"] +[ext_resource type="Script" path="res://scenes/conway.gd" id="1_1gvb0"] +[ext_resource type="Texture2D" uid="uid://c2vm5pfsamed4" path="res://assets/icon.svg" id="2_l6fa6"] +[ext_resource type="Texture2D" uid="uid://b8gggrriib8n" path="res://assets/refresh.png" id="4_hmfh6"] [node name="World" type="Node2D"] position = Vector2(-152, 0) -script = ExtResource("1_wavft") -cell_texture = ExtResource("2_8r6bn") +script = ExtResource("1_1gvb0") +cell_texture = ExtResource("2_l6fa6") [node name="Camera2D" type="Camera2D" parent="."] position = Vector2(464, 200) @@ -44,10 +43,6 @@ offset_bottom = 116.0 [node name="VBoxContainer" type="VBoxContainer" parent="UI/Debug"] layout_mode = 2 -[node name="FPSCounter" parent="UI/Debug/VBoxContainer" instance=ExtResource("3_ves6s")] -layout_mode = 2 -text = "FPS: 0" - [node name="WorldSeed" type="Label" parent="UI/Debug/VBoxContainer"] layout_mode = 2 text = "World Seed: 0" @@ -94,7 +89,7 @@ text = "Seed" [node name="Generate" type="Button" parent="UI/WorldGeneration/VBoxContainer/Seed"] self_modulate = Color(0.501961, 0.501961, 0.501961, 1) layout_mode = 2 -icon = ExtResource("4_fcljs") +icon = ExtResource("4_hmfh6") [node name="Input" type="LineEdit" parent="UI/WorldGeneration/VBoxContainer/Seed"] custom_minimum_size = Vector2(200, 0) diff --git a/scenes/fps_counter/fps_counter.gd b/scenes/fps_counter/fps_counter.gd deleted file mode 100644 index 9fb8833..0000000 --- a/scenes/fps_counter/fps_counter.gd +++ /dev/null @@ -1,10 +0,0 @@ -extends Label - - -@export var include_label: bool = true - -@onready var label_prepend: String = "FPS: " if include_label else "" - - -func _process(_delta: float) -> void: - text = label_prepend + str(Engine.get_frames_per_second()) diff --git a/scenes/fps_counter/fps_counter.tscn b/scenes/fps_counter/fps_counter.tscn deleted file mode 100644 index 7d7557e..0000000 --- a/scenes/fps_counter/fps_counter.tscn +++ /dev/null @@ -1,8 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://cy6vsgu8o0rad"] - -[ext_resource type="Script" path="res://scenes/fps_counter/fps_counter.gd" id="1_vn43a"] - -[node name="FPSCounter" type="Label"] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("1_vn43a")