diff --git a/.godot/editor/create_recent.Node b/.godot/editor/create_recent.Node index 9a061be..5a17d98 100644 --- a/.godot/editor/create_recent.Node +++ b/.godot/editor/create_recent.Node @@ -1,8 +1,8 @@ +Sprite2D CollisionShape2D Area2D Timer RigidBody2D -Sprite2D Marker2D Camera2D CharacterBody2D diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 0bd16a3..ad16558 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -14,15 +14,15 @@ dock_split_1=0 dock_split_4=0 dock_2="FileSystem" dock_3="Scene,Import" -dock_5="Inspector,Node,History,Commit (17)" +dock_5="Inspector,Node,History,Commit (14)" [EditorNode] -open_scenes=["res://Scenes/game_world.tscn", "res://Scenes/horse.tscn", "res://Scenes/Cupcakes/cupcake.tscn"] +open_scenes=["res://Scenes/game_world.tscn", "res://Scenes/horse.tscn", "res://Scenes/Cupcakes/cupcake.tscn", "res://Scenes/Locations/yard.tscn"] [ScriptEditor] -open_scripts=["res://Scripts/Cupcake Spawn Timer.gd", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"] +open_scripts=["res://Scripts/Cupcake Spawn Timer.gd", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/game_world.gd", "res://Scripts/horse.gd", "res://README.md"] open_help=["Node"] script_split_offset=70 list_split_offset=0 diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index 395db6e..de26c84 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -5,3 +5,5 @@ res://Scenes/horse.tscn res://Scenes/Cupcakes/cupcake.tscn res://Scripts/horse.gd res://Scripts/Cupcakes/cupcake.gd +res://Scenes/Locations/yard.tscn +res://README.md diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index e3d74ea..2ca7182 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -1,7 +1,7 @@ [editor_metadata] executable_path="/usr/bin/godot" -use_advanced_connections=false +use_advanced_connections=true [debug_options] @@ -11,7 +11,7 @@ run_reload_scripts=true [dialog_bounds] project_settings=Rect2(814, 476, 1120, 920) -editor_settings=Rect2(830, 430, 900, 700) +editor_settings=Rect2(830, 460, 900, 700) search_help=Rect2(640, 390, 1280, 720) [color_picker] @@ -20,8 +20,8 @@ recent_presets=PackedColorArray(0, 0, 0, 1, 0.2, 0.0156863, 0.286275, 0.431373, [recent_files] -scenes=["res://Scenes/Cupcakes/cupcake.tscn", "res://Scenes/horse.tscn", "res://Scenes/game_world.tscn", "res://Scenes/cupcake.tscn"] -scripts=["res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/Cupcake Spawn Timer.gd", "Node", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"] +scenes=["res://Scenes/Locations/yard.tscn", "res://Scenes/Locations/y.tscn", "res://Scenes/Locations/Yard.tscn", "res://Scenes/Cupcakes/cupcake.tscn", "res://Scenes/horse.tscn", "res://Scenes/game_world.tscn", "res://Scenes/cupcake.tscn"] +scripts=["res://README.md", "res://Scripts/Cupcakes/cupcake.gd", "res://Scripts/Cupcake Spawn Timer.gd", "Node", "res://Scripts/game_world.gd", "res://Scripts/horse.gd"] [script_setup] diff --git a/.godot/editor/recent_dirs b/.godot/editor/recent_dirs index d77ed3c..5470b8f 100644 --- a/.godot/editor/recent_dirs +++ b/.godot/editor/recent_dirs @@ -1,3 +1,5 @@ +res://Scenes/Locations +res://Art/Locations res://Scripts/Cupcakes res://Art res://Scenes diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index e7ec9eb..87ec740 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -20,9 +20,13 @@ state={ "column": 1, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 29, -"scroll_position": 0.0, -"selection": false, +"row": 34, +"scroll_position": 5.0, +"selection": true, +"selection_from_column": 1, +"selection_from_line": 34, +"selection_to_column": 17, +"selection_to_line": 34, "syntax_highlighter": "GDScript" } @@ -31,10 +35,10 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 1, +"column": 4, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 11, +"row": 16, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" @@ -53,3 +57,17 @@ state={ "selection": false, "syntax_highlighter": "GDScript" } + +[res://README.md] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 37, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 2, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "Plain Text" +} diff --git a/.godot/uid_cache.bin b/.godot/uid_cache.bin index 3992606..b71c2e8 100644 Binary files a/.godot/uid_cache.bin and b/.godot/uid_cache.bin differ diff --git a/README.md b/README.md index af33e9e..3f21333 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # CupcakeRevolution -Idle game. \ No newline at end of file +Mare themed idle game made in Godot 4. diff --git a/Scenes/Cupcakes/cupcake.tscn b/Scenes/Cupcakes/cupcake.tscn index 5d5b087..1989404 100644 --- a/Scenes/Cupcakes/cupcake.tscn +++ b/Scenes/Cupcakes/cupcake.tscn @@ -4,7 +4,7 @@ [ext_resource type="Texture2D" uid="uid://7fqro4fugv8k" path="res://Art/Cupcakes/Cupcake.png" id="1_632he"] [sub_resource type="CircleShape2D" id="CircleShape2D_svirt"] -radius = 27.0 +radius = 16.0 [node name="Cupcake" type="RigidBody2D"] gravity_scale = 0.0 @@ -14,8 +14,9 @@ script = ExtResource("1_2fcqt") [node name="Sprite2D" type="Sprite2D" parent="."] texture_filter = 1 position = Vector2(0, -4) -scale = Vector2(2.207, 2.207) +scale = Vector2(2, 2) texture = ExtResource("1_632he") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] +scale = Vector2(2, 2) shape = SubResource("CircleShape2D_svirt") diff --git a/Scenes/Locations/yard.tscn b/Scenes/Locations/yard.tscn new file mode 100644 index 0000000..1e25fa3 --- /dev/null +++ b/Scenes/Locations/yard.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=2 format=3 uid="uid://dklbml3twlqqh"] + +[ext_resource type="Texture2D" uid="uid://b3j662tj6h5vq" path="res://Art/Locations/yard1.png" id="1_657cc"] + +[node name="Sprite2D" type="Sprite2D"] +position = Vector2(-33.9999, -26) +scale = Vector2(0.330667, 0.3361) +texture = ExtResource("1_657cc") +centered = false diff --git a/Scenes/game_world.tscn b/Scenes/game_world.tscn index 712907b..a50dd1c 100644 --- a/Scenes/game_world.tscn +++ b/Scenes/game_world.tscn @@ -10,6 +10,8 @@ size = Vector2(1943, 1102) script = ExtResource("1_c2sx0") [node name="Cupcake Spawn Timer" type="Timer" parent="."] +wait_time = 2.0 +autostart = true script = ExtResource("2_bjylp") [node name="PlayArea" type="Area2D" parent="."] @@ -18,5 +20,5 @@ script = ExtResource("2_bjylp") position = Vector2(961.5, 541) shape = SubResource("RectangleShape2D_sh03e") -[connection signal="timeout" from="Cupcake Spawn Timer" to="Cupcake Spawn Timer" method="_on_timeout"] -[connection signal="body_exited" from="PlayArea" to="." method="_on_play_area_body_exited"] +[connection signal="timeout" from="Cupcake Spawn Timer" to="." method="_on_timeout"] +[connection signal="area_exited" from="PlayArea" to="." method="_on_play_area_area_exited"] diff --git a/Scenes/horse.tscn b/Scenes/horse.tscn index c43a109..b880b84 100644 --- a/Scenes/horse.tscn +++ b/Scenes/horse.tscn @@ -4,8 +4,8 @@ [ext_resource type="Texture2D" uid="uid://cbpvwmngdb4ke" path="res://Art/Characters/defaultMare.png" id="2_5r1ss"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_gg7is"] -radius = 26.0 -height = 116.944 +radius = 23.5 +height = 103.0 [node name="Horse" type="CharacterBody2D"] scale = Vector2(2, 2) @@ -13,11 +13,10 @@ script = ExtResource("1_pl2bc") [node name="Sprite2D" type="Sprite2D" parent="."] texture_filter = 1 -position = Vector2(29.5, 0) -scale = Vector2(1.13333, 1.13333) +position = Vector2(21.5, 0) texture = ExtResource("2_5r1ss") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(32, 0) +position = Vector2(24, 0) rotation = 1.5708 shape = SubResource("CapsuleShape2D_gg7is") diff --git a/Scripts/Cupcake Spawn Timer.gd b/Scripts/Cupcake Spawn Timer.gd index 2946091..3a9ddb8 100644 --- a/Scripts/Cupcake Spawn Timer.gd +++ b/Scripts/Cupcake Spawn Timer.gd @@ -10,8 +10,10 @@ var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn") func _ready(): pass + func _on_timeout(): + pass diff --git a/Scripts/game_world.gd b/Scripts/game_world.gd index 30fb360..8601c80 100644 --- a/Scripts/game_world.gd +++ b/Scripts/game_world.gd @@ -1,6 +1,7 @@ extends Node2D -var spawncount = 0 +var spawn +var location = preload("res://Scenes/Locations/yard.tscn") var horse_scene = preload("res://Scenes/horse.tscn") var horse_instance var mouse_position = Vector2.ZERO @@ -11,23 +12,41 @@ var ccchoc var randX var randY var ccSpawnRate = 10 +var ccCount = 0 +var ccMaxOnScreen = 250 func _ready(): horse_instance = horse_scene.instantiate() ccvan = ccVanilla.instantiate() + spawn = location.instantiate() + add_child(spawn) add_child(horse_instance) add_child(ccvan) - + func _process(delta): mouse_position = get_global_mouse_position() horse_instance.position = mouse_position func spawnCupcakes(): - pass + randomize() + randX = randi_range(10, 1910) + randY = randi_range(10, 1070) + add_child(ccvan) + ccvan.position = Vector2(randX, randY) + + + func collectCupcakes(): pass -func _on_play_area_body_exited(body): - pass + +func _on_timeout(): + var timer = get_node("Cupcake Spawn Timer") + spawnCupcakes() + timer.start + + +func _on_play_area_area_exited(area): + pass