initial commit

This commit is contained in:
Magnus Küderli
2025-08-08 23:28:44 +02:00
commit 6cbb52e119
25 changed files with 456 additions and 0 deletions
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwti0ccqyfsw2"
path="res://.godot/imported/backdrop.png-d62b96fea6b1fdbfb61c193e7f92bbc6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/backdrop.png"
dest_files=["res://.godot/imported/backdrop.png-d62b96fea6b1fdbfb61c193e7f92bbc6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bdjsnr5cseevt"
path="res://.godot/imported/big_tools.png-5cf26b8ccd694cf279864a6cf459c597.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/big_tools.png"
dest_files=["res://.godot/imported/big_tools.png-5cf26b8ccd694cf279864a6cf459c597.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dcs0ffpodcdv6"
path="res://.godot/imported/big_watercan.png-f877924be0ada657e5d66a3a1502fe1f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/big_watercan.png"
dest_files=["res://.godot/imported/big_watercan.png-f877924be0ada657e5d66a3a1502fe1f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cexv04i4cycuy"
path="res://.godot/imported/flower_01.png-f29e60db231acd53bd876f803db24886.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/flower_01.png"
dest_files=["res://.godot/imported/flower_01.png-f29e60db231acd53bd876f803db24886.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dsmaj5bwwnqrn"
path="res://.godot/imported/toolbelt.png-14d9615a961ea370540dcf8cd0d4b23a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/toolbelt.png"
dest_files=["res://.godot/imported/toolbelt.png-14d9615a961ea370540dcf8cd0d4b23a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cvq7l0ik05mc8"
path="res://.godot/imported/tools.png-c9e0484bc1f49341110d6fad791adfe0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/tools.png"
dest_files=["res://.godot/imported/tools.png-c9e0484bc1f49341110d6fad791adfe0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

After

Width:  |  Height:  |  Size: 994 B

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cqbas0ej7ans6"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
+52
View File
@@ -0,0 +1,52 @@
[gd_scene load_steps=4 format=3 uid="uid://d1cswdluomvjc"]
[ext_resource type="Texture2D" uid="uid://dwti0ccqyfsw2" path="res://assets/backdrop.png" id="1_0xm2m"]
[ext_resource type="PackedScene" uid="uid://ce520h6fkjjj4" path="res://prefabs/flower.tscn" id="1_ig7tw"]
[ext_resource type="PackedScene" uid="uid://gnguys31bbpv" path="res://prefabs/toolbelt.tscn" id="3_h2yge"]
[node name="main" type="Node2D"]
[node name="Level" type="Node" parent="."]
[node name="Backdrop" type="Sprite2D" parent="Level"]
position = Vector2(96, 56)
texture = ExtResource("1_0xm2m")
[node name="Plants" type="Node" parent="Level"]
[node name="Flowers" type="Node" parent="Level/Plants"]
[node name="flower" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(40, 43)
[node name="flower2" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(69, 66)
[node name="flower3" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(125, 10)
[node name="flower4" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(13, 17)
[node name="flower5" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(14, 71)
[node name="flower6" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(116, 38)
[node name="flower7" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(136, 66)
[node name="flower8" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(65, 17)
[node name="flower9" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(92, 50)
[node name="flower10" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(169, 54)
[node name="flower11" parent="Level/Plants/Flowers" instance=ExtResource("1_ig7tw")]
position = Vector2(156, 24)
[node name="toolbelt" parent="Level" instance=ExtResource("3_h2yge")]
+13
View File
@@ -0,0 +1,13 @@
[gd_scene load_steps=3 format=3 uid="uid://ce520h6fkjjj4"]
[ext_resource type="Script" uid="uid://dbtyjg3okavxm" path="res://scripts/flower.gd" id="1_7qjqy"]
[ext_resource type="Texture2D" uid="uid://cexv04i4cycuy" path="res://assets/flower_01.png" id="2_7qjqy"]
[node name="flower" type="Node2D"]
script = ExtResource("1_7qjqy")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_7qjqy")
offset = Vector2(8, 8)
hframes = 4
frame = 1
+43
View File
@@ -0,0 +1,43 @@
[gd_scene load_steps=4 format=3 uid="uid://gnguys31bbpv"]
[ext_resource type="Texture2D" uid="uid://dsmaj5bwwnqrn" path="res://assets/toolbelt.png" id="1_eicxf"]
[ext_resource type="Script" uid="uid://bqyv7fdvpnur" path="res://scripts/toolbelt.gd" id="1_kg6kr"]
[ext_resource type="Texture2D" uid="uid://cvq7l0ik05mc8" path="res://assets/tools.png" id="3_ekyt3"]
[node name="toolbelt" type="Node2D" node_paths=PackedStringArray("slot0", "slot1", "slot2", "slot3")]
script = ExtResource("1_kg6kr")
slot0 = NodePath("icon_watering_can")
slot1 = NodePath("icon_watering_can2")
slot2 = NodePath("icon_watering_can3")
slot3 = NodePath("icon_watering_can4")
[node name="ui" type="Sprite2D" parent="."]
texture = ExtResource("1_eicxf")
offset = Vector2(96, 104)
[node name="icon_watering_can" type="Sprite2D" parent="."]
position = Vector2(-8, 0)
texture = ExtResource("3_ekyt3")
offset = Vector2(80, 104)
hframes = 4
[node name="icon_watering_can2" type="Sprite2D" parent="."]
position = Vector2(8, 0)
texture = ExtResource("3_ekyt3")
offset = Vector2(80, 104)
hframes = 4
frame = 1
[node name="icon_watering_can3" type="Sprite2D" parent="."]
position = Vector2(24, 0)
texture = ExtResource("3_ekyt3")
offset = Vector2(80, 104)
hframes = 4
frame = 2
[node name="icon_watering_can4" type="Sprite2D" parent="."]
position = Vector2(40, 0)
texture = ExtResource("3_ekyt3")
offset = Vector2(80, 104)
hframes = 4
frame = 3
+34
View File
@@ -0,0 +1,34 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="garden_chaos"
run/main_scene="uid://d1cswdluomvjc"
config/features=PackedStringArray("4.4", "GL Compatibility")
config/icon="res://icon.svg"
[autoload]
ToolManager="*res://scripts/tool_manager.gd"
[display]
window/size/viewport_width=192
window/size/viewport_height=112
window/size/window_width_override=1920
window/size/window_height_override=1120
window/stretch/mode="canvas_items"
[rendering]
textures/canvas_textures/default_texture_filter=0
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
+29
View File
@@ -0,0 +1,29 @@
extends Node2D
const TILE_SIZE: Vector2 = Vector2(16,16);
const MAX_OFFSET = 2;
var rng = RandomNumberGenerator.new();
@export var alive: bool = true;
@export var dryness: int = rng.randi_range(600, 1000);
func _ready() -> void:
$Sprite2D.frame = 0;
self.position = self.position.snapped(TILE_SIZE) + Vector2(rng.randi_range(-MAX_OFFSET,MAX_OFFSET), rng.randi_range(-MAX_OFFSET,MAX_OFFSET));
func _physics_process(_delta: float) -> void:
if not alive:
return
if dryness < 400:
$Sprite2D.frame = 1;
if dryness > 0:
dryness -= 1;
else:
die();
func die() -> void:
$Sprite2D.frame = 2;
alive = false;
print("Im dead");
+1
View File
@@ -0,0 +1 @@
uid://dbtyjg3okavxm
+1
View File
@@ -0,0 +1 @@
extends Node
+1
View File
@@ -0,0 +1 @@
uid://b26ai7p8tsq1d
+39
View File
@@ -0,0 +1,39 @@
extends Node2D
@export var slot0: Sprite2D;
@export var slot1: Sprite2D;
@export var slot2: Sprite2D;
@export var slot3: Sprite2D;
var pointer = 0;
func _input(event):
var texture: Texture = load("res://assets/big_tools.png");
var atlas_tex = AtlasTexture.new()
atlas_tex.atlas = texture
var ts = 128; # tool size
var offset = Vector2(50, 50); # cursor image offset
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
if slot0.get_rect().has_point(slot0.to_local(event.position)):
print("clicked slot0")
atlas_tex.region = Rect2(slot0.frame * ts, 0, ts, ts)
Input.set_custom_mouse_cursor(atlas_tex, Input.CURSOR_ARROW, offset);
elif slot1.get_rect().has_point(slot1.to_local(event.position)):
print("clicked slot1")
atlas_tex.region = Rect2(slot1.frame * ts, 0, ts, ts)
Input.set_custom_mouse_cursor(atlas_tex, Input.CURSOR_ARROW, offset);
elif slot2.get_rect().has_point(slot2.to_local(event.position)):
print("clicked slot2")
atlas_tex.region = Rect2(slot2.frame * ts, 0, ts, ts)
Input.set_custom_mouse_cursor(atlas_tex, Input.CURSOR_ARROW, offset);
elif slot3.get_rect().has_point(slot3.to_local(event.position)):
print("clicked slot3")
atlas_tex.region = Rect2(slot3.frame * ts, 0, ts, ts)
Input.set_custom_mouse_cursor(atlas_tex, Input.CURSOR_ARROW, offset);
else: # didnt click on tool
return
+1
View File
@@ -0,0 +1 @@
uid://bqyv7fdvpnur