Browse Source

Changing directory structure and cleanup

master
Ryan Reed 1 year ago
parent
commit
d1cdb4c186
8 changed files with 14 additions and 36 deletions
  1. +2
    -1
      README.md
  2. +0
    -0
      assets/icon.svg
  3. +3
    -3
      assets/icon.svg.import
  4. +2
    -2
      project.godot
  5. +0
    -0
      scenes/conway.gd
  6. +7
    -12
      scenes/conway.tscn
  7. +0
    -10
      scenes/fps_counter/fps_counter.gd
  8. +0
    -8
      scenes/fps_counter/fps_counter.tscn

+ 2
- 1
README.md View File

@ -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?

icon.svg → assets/icon.svg View File


icon.svg.import → assets/icon.svg.import View File

@ -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]

+ 2
- 2
project.godot View File

@ -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]


world.gd → scenes/conway.gd View File


world.tscn → scenes/conway.tscn View File

@ -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)

+ 0
- 10
scenes/fps_counter/fps_counter.gd View File

@ -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())

+ 0
- 8
scenes/fps_counter/fps_counter.tscn View File

@ -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")

Loading…
Cancel
Save