diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 43e83c5..274ab30 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -43,6 +43,6 @@ jobs:
- name: Deploy to itch.io 🚀
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
- run: butler push ./build/web rosskarchner/jolt:html5
+ run: butler push ./build/web rosskarchner/quack-circuits:html5
diff --git a/assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3 b/assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3
new file mode 100644
index 0000000..d14be6d
Binary files /dev/null and b/assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3 differ
diff --git a/assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3.import b/assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3.import
new file mode 100644
index 0000000..abc537c
--- /dev/null
+++ b/assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3.import
@@ -0,0 +1,19 @@
+[remap]
+
+importer="mp3"
+type="AudioStreamMP3"
+uid="uid://bifjeull404e1"
+path="res://.godot/imported/348791__nebyoolae__toy-ducks-quacking.mp3-6cd7a33d108a1b10132e0ef676f7d408.mp3str"
+
+[deps]
+
+source_file="res://assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3"
+dest_files=["res://.godot/imported/348791__nebyoolae__toy-ducks-quacking.mp3-6cd7a33d108a1b10132e0ef676f7d408.mp3str"]
+
+[params]
+
+loop=false
+loop_offset=0
+bpm=0
+beat_count=0
+bar_beats=4
diff --git a/assets/audio/Childrens Adventure Anthem Main.wav b/assets/audio/Childrens Adventure Anthem Main.wav
new file mode 100755
index 0000000..c208793
Binary files /dev/null and b/assets/audio/Childrens Adventure Anthem Main.wav differ
diff --git a/assets/audio/Childrens Adventure Anthem Main.wav.import b/assets/audio/Childrens Adventure Anthem Main.wav.import
new file mode 100644
index 0000000..cb87ccc
--- /dev/null
+++ b/assets/audio/Childrens Adventure Anthem Main.wav.import
@@ -0,0 +1,24 @@
+[remap]
+
+importer="wav"
+type="AudioStreamWAV"
+uid="uid://bh5w8eqiai7mg"
+path="res://.godot/imported/Childrens Adventure Anthem Main.wav-e7d14eadbc749dce38e3c76d424dda65.sample"
+
+[deps]
+
+source_file="res://assets/audio/Childrens Adventure Anthem Main.wav"
+dest_files=["res://.godot/imported/Childrens Adventure Anthem Main.wav-e7d14eadbc749dce38e3c76d424dda65.sample"]
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=false
+edit/normalize=false
+edit/loop_mode=0
+edit/loop_begin=0
+edit/loop_end=-1
+compress/mode=0
diff --git a/assets/audio/Forest Water Loop.wav b/assets/audio/Forest Water Loop.wav
new file mode 100755
index 0000000..5e44856
Binary files /dev/null and b/assets/audio/Forest Water Loop.wav differ
diff --git a/assets/audio/Forest Water Loop.wav.import b/assets/audio/Forest Water Loop.wav.import
new file mode 100644
index 0000000..ed8d4f9
--- /dev/null
+++ b/assets/audio/Forest Water Loop.wav.import
@@ -0,0 +1,24 @@
+[remap]
+
+importer="wav"
+type="AudioStreamWAV"
+uid="uid://byg30wi4bvd86"
+path="res://.godot/imported/Forest Water Loop.wav-39f493c14b5fcc36c75c3bf800e4cf7e.sample"
+
+[deps]
+
+source_file="res://assets/audio/Forest Water Loop.wav"
+dest_files=["res://.godot/imported/Forest Water Loop.wav-39f493c14b5fcc36c75c3bf800e4cf7e.sample"]
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=false
+edit/normalize=false
+edit/loop_mode=0
+edit/loop_begin=0
+edit/loop_end=-1
+compress/mode=0
diff --git a/assets/audio/Tool Impact C.wav b/assets/audio/Tool Impact C.wav
new file mode 100755
index 0000000..3bf6aeb
Binary files /dev/null and b/assets/audio/Tool Impact C.wav differ
diff --git a/assets/audio/Tool Impact C.wav.import b/assets/audio/Tool Impact C.wav.import
new file mode 100644
index 0000000..84b497a
--- /dev/null
+++ b/assets/audio/Tool Impact C.wav.import
@@ -0,0 +1,24 @@
+[remap]
+
+importer="wav"
+type="AudioStreamWAV"
+uid="uid://bctyjsb0v6ave"
+path="res://.godot/imported/Tool Impact C.wav-bf9366e7eb5badfab2963c1253874c9c.sample"
+
+[deps]
+
+source_file="res://assets/audio/Tool Impact C.wav"
+dest_files=["res://.godot/imported/Tool Impact C.wav-bf9366e7eb5badfab2963c1253874c9c.sample"]
+
+[params]
+
+force/8_bit=false
+force/mono=false
+force/max_rate=false
+force/max_rate_hz=44100
+edit/trim=false
+edit/normalize=false
+edit/loop_mode=0
+edit/loop_begin=0
+edit/loop_end=-1
+compress/mode=0
diff --git a/assets/images/Menu Background.svg b/assets/images/Menu Background.svg
new file mode 100644
index 0000000..30e4d7a
--- /dev/null
+++ b/assets/images/Menu Background.svg
@@ -0,0 +1,103 @@
+
+
+
+
diff --git a/assets/images/Menu Background.svg.import b/assets/images/Menu Background.svg.import
new file mode 100644
index 0000000..ad51da5
--- /dev/null
+++ b/assets/images/Menu Background.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://ctpgd8bwbrbtj"
+path="res://.godot/imported/Menu Background.svg-48fba800734c103bf1e10d5f644ab9bc.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/Menu Background.svg"
+dest_files=["res://.godot/imported/Menu Background.svg-48fba800734c103bf1e10d5f644ab9bc.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
diff --git a/assets/images/Screenshot from 2024-08-18 13-44-39.png b/assets/images/Screenshot from 2024-08-18 13-44-39.png
new file mode 100644
index 0000000..1e21e54
Binary files /dev/null and b/assets/images/Screenshot from 2024-08-18 13-44-39.png differ
diff --git a/assets/images/Screenshot from 2024-08-18 13-44-39.png.import b/assets/images/Screenshot from 2024-08-18 13-44-39.png.import
new file mode 100644
index 0000000..2610075
--- /dev/null
+++ b/assets/images/Screenshot from 2024-08-18 13-44-39.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bvv2145ksiq72"
+path="res://.godot/imported/Screenshot from 2024-08-18 13-44-39.png-7f828d53e3afd775fc3b02726986fb4b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/Screenshot from 2024-08-18 13-44-39.png"
+dest_files=["res://.godot/imported/Screenshot from 2024-08-18 13-44-39.png-7f828d53e3afd775fc3b02726986fb4b.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
diff --git a/assets/images/Screenshot from 2024-08-18 13-50-48.png b/assets/images/Screenshot from 2024-08-18 13-50-48.png
new file mode 100644
index 0000000..d5dfb5b
Binary files /dev/null and b/assets/images/Screenshot from 2024-08-18 13-50-48.png differ
diff --git a/assets/images/Screenshot from 2024-08-18 13-50-48.png.import b/assets/images/Screenshot from 2024-08-18 13-50-48.png.import
new file mode 100644
index 0000000..68bbdd3
--- /dev/null
+++ b/assets/images/Screenshot from 2024-08-18 13-50-48.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://chykku4atas86"
+path="res://.godot/imported/Screenshot from 2024-08-18 13-50-48.png-94781112217d333639021d3884ef2d69.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/Screenshot from 2024-08-18 13-50-48.png"
+dest_files=["res://.godot/imported/Screenshot from 2024-08-18 13-50-48.png-94781112217d333639021d3884ef2d69.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
diff --git a/assets/images/black.aseprite b/assets/images/black.aseprite
new file mode 100644
index 0000000..93844b0
Binary files /dev/null and b/assets/images/black.aseprite differ
diff --git a/assets/images/black.png b/assets/images/black.png
new file mode 100644
index 0000000..c0204dc
Binary files /dev/null and b/assets/images/black.png differ
diff --git a/assets/images/black.png.import b/assets/images/black.png.import
new file mode 100644
index 0000000..e1e742e
--- /dev/null
+++ b/assets/images/black.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cnuojlovfapfu"
+path="res://.godot/imported/black.png-971e85c604e91f9497ecb66b2125731c.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/black.png"
+dest_files=["res://.godot/imported/black.png-971e85c604e91f9497ecb66b2125731c.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
diff --git a/assets/images/controlpanel.aseprite b/assets/images/controlpanel.aseprite
new file mode 100644
index 0000000..9d44304
Binary files /dev/null and b/assets/images/controlpanel.aseprite differ
diff --git a/assets/images/controlpanel.png b/assets/images/controlpanel.png
new file mode 100644
index 0000000..a088056
Binary files /dev/null and b/assets/images/controlpanel.png differ
diff --git a/assets/images/controlpanel.png.import b/assets/images/controlpanel.png.import
new file mode 100644
index 0000000..74ffe6c
--- /dev/null
+++ b/assets/images/controlpanel.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://caws18ex3y0hw"
+path="res://.godot/imported/controlpanel.png-6fa30e27f0dc1c64a05a75f34042d970.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/controlpanel.png"
+dest_files=["res://.godot/imported/controlpanel.png-6fa30e27f0dc1c64a05a75f34042d970.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
diff --git a/assets/images/duck2.png b/assets/images/duck2.png
new file mode 100644
index 0000000..2ad0991
Binary files /dev/null and b/assets/images/duck2.png differ
diff --git a/assets/images/duck2.png.import b/assets/images/duck2.png.import
new file mode 100644
index 0000000..7c91b9d
--- /dev/null
+++ b/assets/images/duck2.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cyxsww5uyxm5x"
+path="res://.godot/imported/duck2.png-be6a913e46705e93cb679841784bcfcc.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/duck2.png"
+dest_files=["res://.godot/imported/duck2.png-be6a913e46705e93cb679841784bcfcc.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
diff --git a/assets/images/duck2.pxo b/assets/images/duck2.pxo
new file mode 100644
index 0000000..be806b3
Binary files /dev/null and b/assets/images/duck2.pxo differ
diff --git a/assets/images/menu-background.png b/assets/images/menu-background.png
new file mode 100644
index 0000000..96707ca
Binary files /dev/null and b/assets/images/menu-background.png differ
diff --git a/assets/images/menu-background.png.import b/assets/images/menu-background.png.import
new file mode 100644
index 0000000..2a39adf
--- /dev/null
+++ b/assets/images/menu-background.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://rsegr6in3mwu"
+path="res://.godot/imported/menu-background.png-5391c1ca4a3fc9a8679ebf65c2fe0927.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/menu-background.png"
+dest_files=["res://.godot/imported/menu-background.png-5391c1ca4a3fc9a8679ebf65c2fe0927.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
diff --git a/assets/images/monochrome-transparent_packed.png b/assets/images/monochrome-transparent_packed.png
new file mode 100644
index 0000000..4a99afc
Binary files /dev/null and b/assets/images/monochrome-transparent_packed.png differ
diff --git a/assets/images/monochrome-transparent_packed.png.import b/assets/images/monochrome-transparent_packed.png.import
new file mode 100644
index 0000000..cd8be97
--- /dev/null
+++ b/assets/images/monochrome-transparent_packed.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://ikw1krtfh2qm"
+path="res://.godot/imported/monochrome-transparent_packed.png-cc2fa7205544abb7382918e1dd313a4f.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/monochrome-transparent_packed.png"
+dest_files=["res://.godot/imported/monochrome-transparent_packed.png-cc2fa7205544abb7382918e1dd313a4f.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
diff --git a/assets/images/monochrome_packed.png b/assets/images/monochrome_packed.png
new file mode 100644
index 0000000..1c33015
Binary files /dev/null and b/assets/images/monochrome_packed.png differ
diff --git a/assets/images/monochrome_packed.png.import b/assets/images/monochrome_packed.png.import
new file mode 100644
index 0000000..5de756a
--- /dev/null
+++ b/assets/images/monochrome_packed.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bxhpvuvn3axdc"
+path="res://.godot/imported/monochrome_packed.png-77ef69fb54ff8eadba7ad8a87c98a143.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/monochrome_packed.png"
+dest_files=["res://.godot/imported/monochrome_packed.png-77ef69fb54ff8eadba7ad8a87c98a143.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
diff --git a/assets/images/overworld.png b/assets/images/overworld.png
index ae43d38..a597bda 100644
Binary files a/assets/images/overworld.png and b/assets/images/overworld.png differ
diff --git a/assets/images/safezone.png b/assets/images/safezone.png
new file mode 100644
index 0000000..7673fae
Binary files /dev/null and b/assets/images/safezone.png differ
diff --git a/assets/images/safezone.png.import b/assets/images/safezone.png.import
new file mode 100644
index 0000000..0761dc1
--- /dev/null
+++ b/assets/images/safezone.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bnwlbkwe8cdt1"
+path="res://.godot/imported/safezone.png-ac151a1ec9642d1c0bc2aedd8ac8a1a5.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/safezone.png"
+dest_files=["res://.godot/imported/safezone.png-ac151a1ec9642d1c0bc2aedd8ac8a1a5.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
diff --git a/assets/images/safezone.svg b/assets/images/safezone.svg
new file mode 100644
index 0000000..f5ae0bf
--- /dev/null
+++ b/assets/images/safezone.svg
@@ -0,0 +1,334 @@
+
+
+
+
diff --git a/assets/images/safezone.svg.import b/assets/images/safezone.svg.import
new file mode 100644
index 0000000..13c2e78
--- /dev/null
+++ b/assets/images/safezone.svg.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dikr76s8s780x"
+path="res://.godot/imported/safezone.svg-f6850893812c63fcbf43f3e486742f66.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/images/safezone.svg"
+dest_files=["res://.godot/imported/safezone.svg-f6850893812c63fcbf43f3e486742f66.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
diff --git a/project.godot b/project.godot
index 4903a83..7304e1f 100644
--- a/project.godot
+++ b/project.godot
@@ -10,8 +10,8 @@ config_version=5
[application]
-config/name="Jolt"
-run/main_scene="res://scenes/Opening/OpeningWithLogo.tscn"
+config/name="Quack Circuits"
+run/main_scene="res://scenes/Menus/MainMenu/MainMenuWithAnimations.tscn"
config/features=PackedStringArray("4.3")
[aseprite_importers]
@@ -99,6 +99,9 @@ locale/translations=PackedStringArray("res://addons/maaacks_game_template/base/t
2d_physics/layer_2="CLICKTODRAG"
2d_physics/layer_3="DROPPABLE"
2d_physics/layer_4="DROPTARGET"
+2d_physics/layer_5="PLAYER"
+2d_physics/layer_6="WALLS"
+2d_physics/layer_7="CONTROLPANELS"
[maaacks_game_template]
diff --git a/scenes/GameScene/game.gd b/scenes/GameScene/game.gd
index 948c91b..81401dc 100644
--- a/scenes/GameScene/game.gd
+++ b/scenes/GameScene/game.gd
@@ -1,7 +1,10 @@
extends Node2D
+signal puzzle_completed(level)
+
@export var levels:Array[PackedScene]
+var overworld_mode = false
var current_level = 0
var current_level_instance = null
@@ -16,16 +19,23 @@ func _ready() -> void:
load_current_level()
func level_complete():
- var level_complete_dialog = level_complete_scene.instantiate()
var remaining_levels = 2 - current_level
- level_complete_dialog.remaining_levels = remaining_levels
- if remaining_levels > 0:
- level_complete_dialog.clicked_next_level.connect(advance_level)
- else:
- level_complete_dialog.clicked_next_level.connect(func():
- get_tree().change_scene_to_file("res://scenes/Credits/Credits.tscn")
+ if not overworld_mode:
+ var level_complete_dialog = level_complete_scene.instantiate()
+ level_complete_dialog.remaining_levels = remaining_levels
+ if remaining_levels > 0:
+ level_complete_dialog.clicked_next_level.connect(advance_level)
+ else:
+ level_complete_dialog.clicked_next_level.connect(func():
+ get_tree().change_scene_to_file("res://scenes/Credits/Credits.tscn")
)
- $HUD.add_child(level_complete_dialog)
+ $HUD.add_child(level_complete_dialog)
+
+ else:
+ await get_tree().create_timer(3.0).timeout
+ puzzle_completed.emit(current_level)
+
+
func advance_level():
current_level_instance.queue_free()
@@ -33,6 +43,8 @@ func advance_level():
load_current_level()
func load_current_level():
+ if current_level == levels.size():
+ return
current_level_instance = levels[current_level].instantiate()
piece_spawner.prepare()
level_container.add_child(current_level_instance)
diff --git a/scenes/GameScene/game.tscn b/scenes/GameScene/game.tscn
index e855699..9999b30 100644
--- a/scenes/GameScene/game.tscn
+++ b/scenes/GameScene/game.tscn
@@ -26,6 +26,7 @@ show_behind_parent = true
position = Vector2(18, 123)
[node name="HUD" type="CanvasLayer" parent="."]
+visible = false
[node name="UndoButton" type="Button" parent="HUD"]
unique_name_in_owner = true
diff --git a/scenes/Levels/level_1.tscn b/scenes/Levels/level_1.tscn
index 74b7b7a..ccac9dc 100644
--- a/scenes/Levels/level_1.tscn
+++ b/scenes/Levels/level_1.tscn
@@ -20,7 +20,7 @@ sources/0 = SubResource("TileSetScenesCollectionSource_ie45y")
[node name="Tiles" type="TileMapLayer" parent="."]
position = Vector2(619, 3)
-tile_map_data = PackedByteArray("AAD//wMAAAAAAAAAAQAAAAMAAAAAAAAAAQAAAAIAAAAAAAAAAQD//wEAAAAAAAAAAQD+/wEAAAAAAAAAAQD+/wIAAAAAAAAAAgABAAIAAAAAAAAAAwD+/wMAAAAAAAAAAQAAAAEAAAAAAAAAAQD//wIAAAAAAAAAAQA=")
+tile_map_data = PackedByteArray("AAD//wMAAAAAAAAAAQAAAAMAAAAAAAAAAQAAAAIAAAAAAAAAAQD//wEAAAAAAAAAAQD+/wEAAAAAAAAAAQD+/wIAAAAAAAAAAgABAAIAAAAAAAAAAwD+/wMAAAAAAAAAAQAAAAEAAAAAAAAAAQD//wIAAAAAAAAAAQD9/wAAAAAAAAAAAQA=")
tile_set = SubResource("TileSet_f5i1a")
[node name="PossibleSolution" type="Node2D" parent="."]
diff --git a/scenes/Levels/level_2.tscn b/scenes/Levels/level_2.tscn
index b746aae..04b73c3 100644
--- a/scenes/Levels/level_2.tscn
+++ b/scenes/Levels/level_2.tscn
@@ -20,7 +20,7 @@ sources/0 = SubResource("TileSetScenesCollectionSource_ie45y")
[node name="Tiles" type="TileMapLayer" parent="."]
position = Vector2(734, -159)
-tile_map_data = PackedByteArray("AAD//wQAAAAAAAAAAQD9/wQAAAAAAAAAAQD9/wUAAAAAAAAAAQD+/wUAAAAAAAAAAQD8/wUAAAAAAAAAAgD9/wYAAAAAAAAAAQD+/wYAAAAAAAAAAQABAAQAAAAAAAAAAwAAAAQAAAAAAAAAAQAAAAUAAAAAAAAAAQAAAAMAAAAAAAAAAQD//wUAAAAAAAAAAQA=")
+tile_map_data = PackedByteArray("AAD//wQAAAAAAAAAAQD9/wQAAAAAAAAAAQD9/wUAAAAAAAAAAQD+/wUAAAAAAAAAAQD8/wUAAAAAAAAAAgD9/wYAAAAAAAAAAQD+/wYAAAAAAAAAAQABAAQAAAAAAAAAAwAAAAQAAAAAAAAAAQAAAAUAAAAAAAAAAQAAAAMAAAAAAAAAAQD//wUAAAAAAAAAAQD7/wMAAAAAAAAAAQA=")
tile_set = SubResource("TileSet_f5i1a")
[node name="PossibleSolution" type="Node2D" parent="."]
diff --git a/scenes/Levels/level_3.tscn b/scenes/Levels/level_3.tscn
index 502a86d..5c3b7f3 100644
--- a/scenes/Levels/level_3.tscn
+++ b/scenes/Levels/level_3.tscn
@@ -20,7 +20,7 @@ sources/0 = SubResource("TileSetScenesCollectionSource_ie45y")
[node name="Tiles" type="TileMapLayer" parent="."]
position = Vector2(619, 3)
-tile_map_data = PackedByteArray("AAD6/wMAAAAAAAAAAgD7/wIAAAAAAAAAAQD8/wIAAAAAAAAAAQD8/wMAAAAAAAAAAQD8/wQAAAAAAAAAAQD7/wQAAAAAAAAAAQD+/wIAAAAAAAAAAQD9/wMAAAAAAAAAAQD+/wQAAAAAAAAAAQD//wQAAAAAAAAAAQD//wMAAAAAAAAAAQD//wIAAAAAAAAAAQAAAAMAAAAAAAAAAQABAAIAAAAAAAAAAQAAAAEAAAAAAAAAAQACAAMAAAAAAAAAAQACAAEAAAAAAAAAAQD//wEAAAAAAAAAAQADAAIAAAAAAAAAAwD9/wQAAAAAAAAAAQABAAEAAAAAAAAAAQACAAIAAAAAAAAAAQA=")
+tile_map_data = PackedByteArray("AAD6/wMAAAAAAAAAAgD7/wIAAAAAAAAAAQD8/wIAAAAAAAAAAQD8/wMAAAAAAAAAAQD8/wQAAAAAAAAAAQD7/wQAAAAAAAAAAQD+/wIAAAAAAAAAAQD9/wMAAAAAAAAAAQD+/wQAAAAAAAAAAQD//wQAAAAAAAAAAQD//wMAAAAAAAAAAQD//wIAAAAAAAAAAQAAAAMAAAAAAAAAAQABAAIAAAAAAAAAAQAAAAEAAAAAAAAAAQACAAMAAAAAAAAAAQACAAEAAAAAAAAAAQD//wEAAAAAAAAAAQADAAIAAAAAAAAAAwD9/wQAAAAAAAAAAQABAAEAAAAAAAAAAQACAAIAAAAAAAAAAQD5/wEAAAAAAAAAAQA=")
tile_set = SubResource("TileSet_f5i1a")
[node name="PossibleSolution" type="Node2D" parent="."]
diff --git a/scenes/Levels/level_demo.tscn b/scenes/Levels/level_demo.tscn
new file mode 100644
index 0000000..edc7efe
--- /dev/null
+++ b/scenes/Levels/level_demo.tscn
@@ -0,0 +1,64 @@
+[gd_scene load_steps=7 format=4 uid="uid://bnndgpuvoyihj"]
+
+[ext_resource type="PackedScene" uid="uid://cp11itxbkl8u2" path="res://scenes/drop_area.tscn" id="1_4j3y8"]
+[ext_resource type="PackedScene" uid="uid://73fcyu51g72" path="res://scenes/power_source.tscn" id="2_ayj4k"]
+[ext_resource type="PackedScene" uid="uid://cy1uuyuh3e44f" path="res://scenes/GameScene/load.tscn" id="3_1m0qf"]
+[ext_resource type="PackedScene" uid="uid://cfrdeamt1c5dy" path="res://scenes/GameScene/segment.tscn" id="4_s4vjv"]
+
+[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_ie45y"]
+resource_name = "Map"
+scenes/1/scene = ExtResource("1_4j3y8")
+scenes/2/scene = ExtResource("2_ayj4k")
+scenes/3/scene = ExtResource("3_1m0qf")
+
+[sub_resource type="TileSet" id="TileSet_f5i1a"]
+tile_shape = 3
+tile_size = Vector2i(94, 94)
+sources/0 = SubResource("TileSetScenesCollectionSource_ie45y")
+
+[node name="Level1" type="Node2D"]
+
+[node name="Tiles" type="TileMapLayer" parent="."]
+position = Vector2(619, 3)
+tile_map_data = PackedByteArray("AAD//wMAAAAAAAAAAQAAAAMAAAAAAAAAAQD//wEAAAAAAAAAAQD+/wEAAAAAAAAAAQD+/wIAAAAAAAAAAgD+/wMAAAAAAAAAAQAAAAEAAAAAAAAAAQD9/wAAAAAAAAAAAQAAAAIAAAAAAAAAAQABAAEAAAAAAAAAAQABAAMAAAAAAAAAAQACAAIAAAAAAAAAAwA=")
+tile_set = SubResource("TileSet_f5i1a")
+
+[node name="PossibleSolution" type="Node2D" parent="."]
+visible = false
+position = Vector2(581, 178)
+
+[node name="Segment2" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(126, 88)
+connection_pairs = Array[Vector2i]([Vector2i(2, 0)])
+
+[node name="Segment4" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(-55, 84)
+connection_pairs = Array[Vector2i]([Vector2i(0, 2)])
+
+[node name="Segment10" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(42, 82)
+connection_pairs = Array[Vector2i]([Vector2i(5, 1)])
+
+[node name="Segment5" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(-59, -64)
+connection_pairs = Array[Vector2i]([Vector2i(4, 2)])
+
+[node name="Segment8" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(135, -58)
+connection_pairs = Array[Vector2i]([Vector2i(4, 2)])
+
+[node name="Segment9" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(226, -62)
+connection_pairs = Array[Vector2i]([Vector2i(-1, 3)])
+
+[node name="Segment11" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(223, 82)
+connection_pairs = Array[Vector2i]([Vector2i(5, 1)])
+
+[node name="Segment6" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(39, -56)
+connection_pairs = Array[Vector2i]([Vector2i(5, 3)])
+
+[node name="Segment7" parent="PossibleSolution" instance=ExtResource("4_s4vjv")]
+position = Vector2(88, 9)
+connection_pairs = Array[Vector2i]([Vector2i(3, 0), Vector2i(4, 1)])
diff --git a/scenes/Menus/MainMenu/MainMenuWithAnimations.tscn b/scenes/Menus/MainMenu/MainMenuWithAnimations.tscn
index 6ae37c7..48b2b40 100644
--- a/scenes/Menus/MainMenu/MainMenuWithAnimations.tscn
+++ b/scenes/Menus/MainMenu/MainMenuWithAnimations.tscn
@@ -1,7 +1,15 @@
-[gd_scene load_steps=16 format=3 uid="uid://dpel22uvxis52"]
+[gd_scene load_steps=26 format=3 uid="uid://dpel22uvxis52"]
[ext_resource type="PackedScene" uid="uid://2pm27icc6qj5" path="res://scenes/Menus/MainMenu/MainMenu.tscn" id="1_dufvr"]
[ext_resource type="Script" path="res://scenes/Menus/MainMenu/MainMenuWithAnimations.gd" id="2_2xj2y"]
+[ext_resource type="Texture2D" uid="uid://rsegr6in3mwu" path="res://assets/images/menu-background.png" id="3_10c0l"]
+[ext_resource type="FontFile" uid="uid://bgo6tp8of0gef" path="res://assets/fonts/Quit 13.ttf" id="3_j17i2"]
+[ext_resource type="AudioStream" uid="uid://bifjeull404e1" path="res://assets/audio/348791__nebyoolae__toy-ducks-quacking.mp3" id="3_os2ap"]
+[ext_resource type="Texture2D" uid="uid://txgxgb3l33ws" path="res://assets/images/duck.png" id="6_3dwwe"]
+[ext_resource type="Texture2D" uid="uid://caws18ex3y0hw" path="res://assets/images/controlpanel.png" id="6_f0o5m"]
+[ext_resource type="Texture2D" uid="uid://cyxsww5uyxm5x" path="res://assets/images/duck2.png" id="7_egbw2"]
+[ext_resource type="Texture2D" uid="uid://bvv2145ksiq72" path="res://assets/images/Screenshot from 2024-08-18 13-44-39.png" id="7_i1n3u"]
+[ext_resource type="Texture2D" uid="uid://chykku4atas86" path="res://assets/images/Screenshot from 2024-08-18 13-50-48.png" id="8_l8w8s"]
[sub_resource type="Animation" id="1"]
resource_name = "Intro"
@@ -347,28 +355,82 @@ states/Start/position = Vector2(82, 123)
transitions = ["Intro", "OpenMainMenu", SubResource("11"), "OpenMainMenu", "OpenSubMenu", SubResource("14"), "Start", "Intro", SubResource("AnimationNodeStateMachineTransition_j0orr"), "OpenSubMenu", "OpenMainMenu", SubResource("AnimationNodeStateMachineTransition_63dxc")]
graph_offset = Vector2(-180.277, 49)
+[sub_resource type="LabelSettings" id="LabelSettings_p7xvr"]
+font = ExtResource("3_j17i2")
+font_size = 38
+font_color = Color(1, 0.933271, 0, 1)
+
+[sub_resource type="SpriteFrames" id="SpriteFrames_iliq8"]
+animations = [{
+"frames": [{
+"duration": 1.0,
+"texture": ExtResource("6_3dwwe")
+}, {
+"duration": 1.0,
+"texture": ExtResource("7_egbw2")
+}],
+"loop": true,
+"name": &"walking",
+"speed": 2.0
+}]
+
[node name="MainMenu" instance=ExtResource("1_dufvr")]
script = ExtResource("2_2xj2y")
+game_scene_path = "res://scenes/overworld.tscn"
+
+[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
+texture = ExtResource("3_10c0l")
+centered = false
+
+[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." index="1"]
+stream = ExtResource("3_os2ap")
+autoplay = true
-[node name="MenuAnimationPlayer" type="AnimationPlayer" parent="." index="1"]
+[node name="MenuAnimationPlayer" type="AnimationPlayer" parent="." index="3"]
libraries = {
"": SubResource("AnimationLibrary_2kqig")
}
-[node name="MenuAnimationTree" type="AnimationTree" parent="." index="2"]
+[node name="MenuAnimationTree" type="AnimationTree" parent="." index="4"]
tree_root = SubResource("AnimationNodeStateMachine_vikuh")
anim_player = NodePath("../MenuAnimationPlayer")
parameters/conditions/intro_done = false
-[node name="VersionNameLabel" parent="." index="5"]
+[node name="VersionNameLabel" parent="." index="7"]
modulate = Color(1, 1, 1, 0)
[node name="Title" parent="MenuContainer/VBoxContainer/TitlesMargin/TitlesContainer" index="0"]
modulate = Color(1, 1, 1, 0)
+text = "Quack Circuits"
+label_settings = SubResource("LabelSettings_p7xvr")
[node name="SubTitle" parent="MenuContainer/VBoxContainer/TitlesMargin/TitlesContainer" index="1"]
modulate = Color(1, 1, 1, 0)
+text = ""
[node name="MenuButtons" parent="MenuContainer/VBoxContainer/MenuMargin" index="0"]
modulate = Color(1, 1, 1, 0)
lock = true
+
+[node name="OptionsButton" parent="MenuContainer/VBoxContainer/MenuMargin/MenuButtons" index="1"]
+visible = false
+
+[node name="Controlpanel" type="Sprite2D" parent="FlowControlContainer" index="1"]
+position = Vector2(280, 516)
+texture = ExtResource("6_f0o5m")
+
+[node name="ScreenshotFrom2024-08-1813-44-39" type="Sprite2D" parent="FlowControlContainer" index="2"]
+position = Vector2(956, 166)
+scale = Vector2(0.491304, 0.491304)
+texture = ExtResource("7_i1n3u")
+
+[node name="ScreenshotFrom2024-08-1813-50-48" type="Sprite2D" parent="FlowControlContainer" index="3"]
+position = Vector2(952, 449)
+scale = Vector2(0.412791, 0.412791)
+texture = ExtResource("8_l8w8s")
+
+[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." index="12"]
+position = Vector2(260, 154)
+sprite_frames = SubResource("SpriteFrames_iliq8")
+animation = &"walking"
+autoplay = "walking"
diff --git a/scenes/control_panel.gd b/scenes/control_panel.gd
new file mode 100644
index 0000000..61eccfe
--- /dev/null
+++ b/scenes/control_panel.gd
@@ -0,0 +1,27 @@
+extends Node2D
+
+signal activated
+
+@export var light: PointLight2D
+@export var barrier: StaticBody2D
+
+var enabled = true
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ if light:
+ light.enabled = false
+
+func turn_on():
+ enabled = false
+ light.enabled = true
+ barrier.queue_free()
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(delta: float) -> void:
+ pass
+
+
+func _on_area_2d_body_entered(body: Node2D) -> void:
+ if enabled:
+ activated.emit()
diff --git a/scenes/control_panel.tscn b/scenes/control_panel.tscn
new file mode 100644
index 0000000..220f545
--- /dev/null
+++ b/scenes/control_panel.tscn
@@ -0,0 +1,23 @@
+[gd_scene load_steps=4 format=3 uid="uid://d00b6bhlyqjra"]
+
+[ext_resource type="Script" path="res://scenes/control_panel.gd" id="1_ecpq6"]
+[ext_resource type="Texture2D" uid="uid://caws18ex3y0hw" path="res://assets/images/controlpanel.png" id="1_i8w7p"]
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_5cndb"]
+size = Vector2(119, 31)
+
+[node name="ControlPanel" type="Node2D"]
+script = ExtResource("1_ecpq6")
+
+[node name="Sprite2D" type="Sprite2D" parent="."]
+texture = ExtResource("1_i8w7p")
+
+[node name="Area2D" type="Area2D" parent="."]
+collision_layer = 64
+collision_mask = 16
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
+position = Vector2(0.5, -0.5)
+shape = SubResource("RectangleShape2D_5cndb")
+
+[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
diff --git a/scenes/dialog/level_complete_dialog.gd b/scenes/dialog/level_complete_dialog.gd
index edf7a40..857e28d 100644
--- a/scenes/dialog/level_complete_dialog.gd
+++ b/scenes/dialog/level_complete_dialog.gd
@@ -3,16 +3,6 @@ signal clicked_next_level
var remaining_levels = 0
-# Called when the node enters the scene tree for the first time.
-func _ready() -> void:
- if remaining_levels == 0:
- %Message.text = "You've completed all of the levels"
- %Title.text = "[rainbow freq=1.0 sat=0.8 val=0.8][wave amp=50.0 freq=5.0 connected=1][center]Whoa![/center][/wave]"
- %Button.text = "Who made this crazy thing?"
-
-# Called every frame. 'delta' is the elapsed time since the previous frame.
-func _process(delta: float) -> void:
- pass
func _on_button_pressed() -> void:
clicked_next_level.emit()
diff --git a/scenes/dialog/level_complete_dialog.tscn b/scenes/dialog/level_complete_dialog.tscn
index 73552d1..563cd89 100644
--- a/scenes/dialog/level_complete_dialog.tscn
+++ b/scenes/dialog/level_complete_dialog.tscn
@@ -48,13 +48,15 @@ bbcode_enabled = true
text = "[rainbow freq=1.0 sat=0.8 val=0.8][wave amp=50.0 freq=5.0 connected=1][center]Well Done![/center][/wave]"
[node name="Placeholder" type="Label" parent="Panel/MarginContainer/HBoxContainer"]
+visible = false
layout_mode = 2
[node name="Message" type="Label" parent="Panel/MarginContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
-text = "You've completed this circuit!"
+text = "You've completed the circuits and gotten the duck to safety!"
horizontal_alignment = 1
+autowrap_mode = 2
[node name="Placeholder2" type="Label" parent="Panel/MarginContainer/HBoxContainer"]
layout_mode = 2
@@ -64,6 +66,6 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
-text = "On to the next challenge..."
+text = "Who made this crazy thing?"
[connection signal="pressed" from="Panel/MarginContainer/HBoxContainer/Button" to="." method="_on_button_pressed"]
diff --git a/scenes/overworld.gd b/scenes/overworld.gd
new file mode 100644
index 0000000..222b939
--- /dev/null
+++ b/scenes/overworld.gd
@@ -0,0 +1,36 @@
+extends Node2D
+
+
+
+@onready var puzzle_scene = preload("res://scenes/GameScene/game.tscn")
+@onready var puzzles = puzzle_scene.instantiate()
+@onready var level_complete_scene = preload("res://scenes/dialog/level_complete_dialog.tscn")
+
+
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ puzzles.hide()
+ puzzles.overworld_mode = true
+ puzzles.puzzle_completed.connect(puzzle_completed)
+ $PuzzleLayer.add_child(puzzles)
+
+func puzzle_completed(level):
+ puzzles.hide()
+ puzzles.advance_level()
+ var cp = get_node("ControlPanel" + str(level+1))
+ await get_tree().create_timer(1.0).timeout
+ cp.turn_on()
+
+func _on_control_panel_activated() -> void:
+ puzzles.show()
+
+
+
+func _on_finish_game_area_body_entered(_body: Node2D) -> void:
+ var level_complete_dialog = level_complete_scene.instantiate()
+ level_complete_dialog.clicked_next_level.connect(
+ func():
+ get_tree().change_scene_to_file("res://scenes/Credits/Credits.tscn")
+ )
+ $HUD.add_child(level_complete_dialog)
diff --git a/scenes/overworld.tscn b/scenes/overworld.tscn
index 0caf917..afbe529 100644
--- a/scenes/overworld.tscn
+++ b/scenes/overworld.tscn
@@ -1,10 +1,22 @@
-[gd_scene load_steps=7 format=3 uid="uid://t75kshd01vla"]
+[gd_scene load_steps=14 format=3 uid="uid://t75kshd01vla"]
+[ext_resource type="Script" path="res://scenes/overworld.gd" id="1_ouunn"]
[ext_resource type="Texture2D" uid="uid://cr2os0h8situq" path="res://assets/images/overworld.png" id="1_scw4s"]
[ext_resource type="PackedScene" uid="uid://b168w25wl21v8" path="res://scenes/player.tscn" id="2_bf3g1"]
+[ext_resource type="Texture2D" uid="uid://cnuojlovfapfu" path="res://assets/images/black.png" id="2_pgd1e"]
+[ext_resource type="PackedScene" uid="uid://d00b6bhlyqjra" path="res://scenes/control_panel.tscn" id="3_g2mgk"]
+[ext_resource type="Texture2D" uid="uid://bnwlbkwe8cdt1" path="res://assets/images/safezone.png" id="3_l84jr"]
+[ext_resource type="Texture2D" uid="uid://ikw1krtfh2qm" path="res://assets/images/monochrome-transparent_packed.png" id="7_xa8cg"]
[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_cudlo"]
-polygon = PackedVector2Array(-1217, -693, -1217, -692, -1246.9, -692, -1252.9, -685, -1254.9, -685, -1256.9, -640, -1258, -640, -1258, 647, -1257, 647, -1257, 676.7, -1251, 683.7, -1251, 685.3, -1244, 688.2, -1244, 690, -637, 693, -629.4, 693, -619.5, 686, -617, 686, -616, -427, -616, -432, -492, -431, -408, -431, -409, 386, -409, 475.5, -406, 481.5, -406, 484.1, -401, 487.1, -401, 488.9, -357, 490.9, -357, 492, 1244.7, 492, 1252.7, 486, 1254.6, 486, 1255.7, 481, 1257, 481, 1257, 442, 1258, 442, 1258, 172.4, 1256, 169.3, 1256, 166.9, 1248, 161.8, 1248, 160, -61, 160, -60, -652, -60, -658.2, -63, -674.4, -63, -676.9, -69, -682, -69, -683.7, -76, -684.8, -76, -686, -312, -684, -315, -684, -895, -688, -919.6, -688, -929.5, -682, -932, -682, -933, 416, -939, 416, -940, -676, -940, -682.8, -946, -688.8, -946, -690.7, -952, -691.8, -952, -693)
+polygon = PackedVector2Array(-1217, -693, -1217, -692, -1246.9, -692, -1252.9, -685, -1254.9, -685, -1256.9, -640, -1258, -640, -1258, 647, -1257, 647, -1257, 676.7, -1251, 683.7, -1251, 685.3, -1244, 688.2, -1244, 690, -637, 693, -629.4, 693, -619.5, 686, -617, 686, -616, -427, -616, -432, -492, -431, -408, -431, -409, 386, -409, 475.5, -406, 481.5, -406, 484.1, -401, 487.1, -401, 488.9, -357, 490.9, -357, 492, 1244.7, 492, 1252.7, 486, 1254.6, 486, 1255.7, 481, 1257, 481, 1257, 442, 1258, 442, 1247, 172, -61, 160, -60, -652, -60, -658.2, -63, -674.4, -63, -676.9, -69, -682, -69, -683.7, -76, -684.8, -76, -686, -312, -684, -315, -684, -895, -688, -919.6, -688, -929.5, -682, -932, -682, -933, 416, -939, 416, -940, -676, -940, -682.8, -946, -688.8, -946, -690.7, -952, -691.8, -952, -693)
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_5mgx7"]
+size = Vector2(170, 184)
+
+[sub_resource type="AtlasTexture" id="AtlasTexture_ogjfw"]
+atlas = ExtResource("7_xa8cg")
+region = Rect2(528.669, 240.781, 15.1414, 15.1413)
[sub_resource type="Gradient" id="Gradient_14n5d"]
offsets = PackedFloat32Array(0, 0.675841)
@@ -18,10 +30,17 @@ fill = 1
fill_from = Vector2(0.488889, 0.507692)
[sub_resource type="SegmentShape2D" id="SegmentShape2D_esa4y"]
-a = Vector2(-10, 25)
-b = Vector2(138, 262)
+a = Vector2(3, 8)
+b = Vector2(-24, 221)
[node name="Overworld" type="Node2D"]
+script = ExtResource("1_ouunn")
+
+[node name="background" type="Sprite2D" parent="."]
+position = Vector2(-394, -196)
+scale = Vector2(1.1798, 1.20363)
+texture = ExtResource("2_pgd1e")
+centered = false
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(1111, 586)
@@ -32,27 +51,137 @@ position = Vector2(1111, 586)
occluder = SubResource("OccluderPolygon2D_cudlo")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
+collision_layer = 32
+collision_mask = 16
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
position = Vector2(1111, 586)
build_mode = 1
-polygon = PackedVector2Array(-1217, -693, -1217, -692, -1246.9, -692, -1252.9, -685, -1254.9, -685, -1256.9, -640, -1258, -640, -1258, 647, -1257, 647, -1257, 676.7, -1251, 683.7, -1251, 685.3, -1244, 688.2, -1244, 690, -637, 693, -629.4, 693, -619.5, 686, -617, 686, -616, -427, -616, -432, -492, -431, -408, -431, -409, 386, -409, 475.5, -406, 481.5, -406, 484.1, -401, 487.1, -401, 488.9, -357, 490.9, -357, 492, 1244.7, 492, 1252.7, 486, 1254.6, 486, 1255.7, 481, 1257, 481, 1257, 442, 1258, 442, 1258, 172.4, 1256, 169.3, 1256, 166.9, 1248, 161.8, 1248, 160, -61, 160, -60, -652, -60, -658.2, -63, -674.4, -63, -676.9, -69, -682, -69, -683.7, -76, -684.8, -76, -686, -312, -684, -315, -684, -895, -688, -919.6, -688, -929.5, -682, -932, -682, -933, 416, -939, 416, -940, -676, -940, -682.8, -946, -688.8, -946, -690.7, -952, -691.8, -952, -693)
+polygon = PackedVector2Array(-1238, -673, -1239, -639, -1239, 672, -634, 672, -633, -448, -392, -448, -390, 470, 1239, 473, 1238, 400, 1254, 402, 1263, 958, 2514, 978, 2546, -442, 1236, -430, 1252, 235, 1237, 234, 1243, 175, -78, 178, -80, -661, -915, -669, -915, 432, -958, 433, -958, -673)
+
+[node name="Safezone" type="Sprite2D" parent="StaticBody2D"]
+position = Vector2(3175.62, 754)
+scale = Vector2(1.50348, 1.63511)
+texture = ExtResource("3_l84jr")
+
+[node name="FinishGameArea" type="Area2D" parent="."]
+position = Vector2(3225, 775)
+collision_layer = 64
+collision_mask = 16
+metadata/_edit_group_ = true
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="FinishGameArea"]
+shape = SubResource("RectangleShape2D_5mgx7")
+
+[node name="Scroll" type="Sprite2D" parent="FinishGameArea"]
+modulate = Color(0.869714, 0.90732, 0.0717717, 1)
+scale = Vector2(10, 10)
+texture = SubResource("AtlasTexture_ogjfw")
[node name="Player" parent="." instance=ExtResource("2_bf3g1")]
[node name="CanvasModulate" type="CanvasModulate" parent="."]
-color = Color(0, 0, 0, 1)
+color = Color(0.255608, 0.255561, 0.255561, 1)
[node name="PointLight2D" type="PointLight2D" parent="."]
position = Vector2(22, 761)
scale = Vector2(1, 1.69375)
color = Color(1, 0.947259, 0.294813, 1)
+blend_mode = 2
+shadow_enabled = true
+shadow_filter = 1
+texture = SubResource("GradientTexture2D_aftb7")
+
+[node name="PointLight2D2" type="PointLight2D" parent="."]
+position = Vector2(464, 418)
+scale = Vector2(1, 1.69375)
+color = Color(1, 0.947259, 0.294813, 1)
+blend_mode = 2
+shadow_enabled = true
+shadow_filter = 1
+texture = SubResource("GradientTexture2D_aftb7")
+
+[node name="PointLight2D3" type="PointLight2D" parent="."]
+position = Vector2(759, 159)
+scale = Vector2(1.036, 1.86572)
+enabled = false
+color = Color(1, 0.947259, 0.294813, 1)
+blend_mode = 2
+shadow_enabled = true
+shadow_filter = 1
+texture = SubResource("GradientTexture2D_aftb7")
+
+[node name="PointLight2D4" type="PointLight2D" parent="."]
+position = Vector2(1929, 759)
+rotation = 1.5708
+scale = Vector2(1.036, 1.86572)
+enabled = false
+color = Color(1, 0.947259, 0.294813, 1)
+blend_mode = 2
+shadow_enabled = true
+shadow_filter = 1
+texture = SubResource("GradientTexture2D_aftb7")
+
+[node name="PointLight2D5" type="PointLight2D" parent="."]
+position = Vector2(3136, 673)
+rotation = 1.5708
+scale = Vector2(1.83994, 1.55783)
+color = Color(0.977922, 0.977922, 0.977922, 1)
shadow_enabled = true
shadow_filter = 1
texture = SubResource("GradientTexture2D_aftb7")
[node name="ShadowBlock1" type="StaticBody2D" parent="."]
position = Vector2(194, 998)
+collision_layer = 32
+collision_mask = 16
[node name="CollisionShape2D" type="CollisionShape2D" parent="ShadowBlock1"]
shape = SubResource("SegmentShape2D_esa4y")
+
+[node name="ShadowBlock2" type="StaticBody2D" parent="."]
+position = Vector2(524, -89)
+collision_layer = 32
+collision_mask = 16
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="ShadowBlock2"]
+shape = SubResource("SegmentShape2D_esa4y")
+
+[node name="ShadowBlock3" type="StaticBody2D" parent="."]
+position = Vector2(1053, 759)
+collision_layer = 32
+collision_mask = 16
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="ShadowBlock3"]
+shape = SubResource("SegmentShape2D_esa4y")
+
+[node name="ControlPanel1" parent="." node_paths=PackedStringArray("light", "barrier") instance=ExtResource("3_g2mgk")]
+position = Vector2(189, 1243)
+light = NodePath("../PointLight2D2")
+barrier = NodePath("../ShadowBlock1")
+
+[node name="ControlPanel2" parent="." node_paths=PackedStringArray("light", "barrier") instance=ExtResource("3_g2mgk")]
+position = Vector2(343, -71)
+light = NodePath("../PointLight2D3")
+barrier = NodePath("../ShadowBlock2")
+
+[node name="ControlPanel3" parent="." node_paths=PackedStringArray("light", "barrier") instance=ExtResource("3_g2mgk")]
+position = Vector2(1088, 1039)
+light = NodePath("../PointLight2D4")
+barrier = NodePath("../ShadowBlock3")
+
+[node name="PuzzleLayer" type="CanvasLayer" parent="."]
+
+[node name="DirectionalLight2D" type="DirectionalLight2D" parent="."]
+visible = false
+position = Vector2(-295, 676)
+blend_mode = 2
+shadow_enabled = true
+shadow_filter = 1
+
+[node name="HUD" type="CanvasLayer" parent="."]
+
+[connection signal="body_entered" from="FinishGameArea" to="." method="_on_finish_game_area_body_entered"]
+[connection signal="activated" from="ControlPanel1" to="." method="_on_control_panel_activated"]
+[connection signal="activated" from="ControlPanel2" to="." method="_on_control_panel_activated"]
+[connection signal="activated" from="ControlPanel3" to="." method="_on_control_panel_activated"]
diff --git a/scenes/player.gd b/scenes/player.gd
index 64ba0dc..bbc960e 100644
--- a/scenes/player.gd
+++ b/scenes/player.gd
@@ -4,6 +4,20 @@ extends CharacterBody2D
const SPEED = 300.0
const JUMP_VELOCITY = -400.0
+@onready var sprite = $AnimatedSprite2D
+
+func update_sprite():
+ if velocity.y < 0:
+ sprite.flip_v = true
+ rotation_degrees = 0
+ else:
+ sprite.flip_v = false
+ rotation_degrees = 0
+
+ if velocity.x < 0:
+ rotation_degrees = 90
+ if velocity.x > 0:
+ rotation_degrees = -90
func _physics_process(delta: float) -> void:
@@ -26,5 +40,8 @@ func _physics_process(delta: float) -> void:
velocity.y = 0
if not (lr_direction or ud_direction):
velocity.x = move_toward(velocity.x, 0, SPEED)
-
+ sprite.stop()
+ else:
+ sprite.play("walking")
+ update_sprite()
move_and_slide()
diff --git a/scenes/player.tscn b/scenes/player.tscn
index 63d398d..36fda83 100644
--- a/scenes/player.tscn
+++ b/scenes/player.tscn
@@ -1,22 +1,44 @@
-[gd_scene load_steps=4 format=3 uid="uid://b168w25wl21v8"]
+[gd_scene load_steps=6 format=3 uid="uid://b168w25wl21v8"]
[ext_resource type="Texture2D" uid="uid://txgxgb3l33ws" path="res://assets/images/duck.png" id="1_358hj"]
[ext_resource type="Script" path="res://scenes/player.gd" id="1_rmmqv"]
+[ext_resource type="Texture2D" uid="uid://cyxsww5uyxm5x" path="res://assets/images/duck2.png" id="3_com3b"]
-[sub_resource type="RectangleShape2D" id="RectangleShape2D_nw26m"]
-size = Vector2(79.5, 146)
+[sub_resource type="SpriteFrames" id="SpriteFrames_ekjyp"]
+animations = [{
+"frames": [{
+"duration": 1.0,
+"texture": ExtResource("1_358hj")
+}, {
+"duration": 1.0,
+"texture": ExtResource("3_com3b")
+}],
+"loop": true,
+"name": &"walking",
+"speed": 2.0
+}]
+
+[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_7i65n"]
+radius = 32.5
+height = 122.0
[node name="Player" type="CharacterBody2D"]
+collision_layer = 16
+collision_mask = 96
script = ExtResource("1_rmmqv")
-[node name="Sprite2D" type="Sprite2D" parent="."]
-position = Vector2(-7, 19)
-texture = ExtResource("1_358hj")
+[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
+sprite_frames = SubResource("SpriteFrames_ekjyp")
+animation = &"walking"
+frame_progress = 0.942066
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
-position = Vector2(-6.75, 15)
-shape = SubResource("RectangleShape2D_nw26m")
+position = Vector2(1.5, 1)
+shape = SubResource("CapsuleShape2D_7i65n")
[node name="Camera2D" type="Camera2D" parent="."]
limit_left = -200
limit_top = -100
+limit_right = 3500
+limit_bottom = 1300
+limit_smoothed = true