From 092f5bad3ea046259a4db200a47a7a6cd7e966dc Mon Sep 17 00:00:00 2001 From: bigmstone Date: Fri, 2 Oct 2026 21:46:49 -0600 Subject: [PATCH] Adding PhonePhreak Puzzle - Import 10 new MP3 sound files for puzzle audio feedback - Implement PhonePhreak puzzle scene and game logic script --- assets/sounds/0.mp3 | 3 + assets/sounds/0.mp3.import | 19 +++++++ assets/sounds/1.mp3 | 3 + assets/sounds/1.mp3.import | 19 +++++++ assets/sounds/2.mp3 | 3 + assets/sounds/2.mp3.import | 19 +++++++ assets/sounds/3.mp3 | 3 + assets/sounds/3.mp3.import | 19 +++++++ assets/sounds/4.mp3 | 3 + assets/sounds/4.mp3.import | 19 +++++++ assets/sounds/5.mp3 | 3 + assets/sounds/5.mp3.import | 19 +++++++ assets/sounds/6.mp3 | 3 + assets/sounds/6.mp3.import | 19 +++++++ assets/sounds/7.mp3 | 3 + assets/sounds/7.mp3.import | 19 +++++++ assets/sounds/8.mp3 | 3 + assets/sounds/8.mp3.import | 19 +++++++ assets/sounds/9.mp3 | 3 + assets/sounds/9.mp3.import | 19 +++++++ assets/sprites/coin.png.import | 6 +- assets/sprites/fruit.png.import | 6 +- assets/sprites/knight.png.import | 6 +- assets/sprites/platforms.png.import | 6 +- assets/sprites/slime_green.png.import | 6 +- assets/sprites/slime_purple.png.import | 6 +- assets/sprites/world_tileset.png.import | 6 +- scenes/puzzles/phonephreak.tscn | 32 +++++++++++ scripts/Phonephreak.gd | 76 +++++++++++++++++++++++++ scripts/Phonephreak.gd.uid | 1 + 30 files changed, 364 insertions(+), 7 deletions(-) create mode 100644 assets/sounds/0.mp3 create mode 100644 assets/sounds/0.mp3.import create mode 100644 assets/sounds/1.mp3 create mode 100644 assets/sounds/1.mp3.import create mode 100644 assets/sounds/2.mp3 create mode 100644 assets/sounds/2.mp3.import create mode 100644 assets/sounds/3.mp3 create mode 100644 assets/sounds/3.mp3.import create mode 100644 assets/sounds/4.mp3 create mode 100644 assets/sounds/4.mp3.import create mode 100644 assets/sounds/5.mp3 create mode 100644 assets/sounds/5.mp3.import create mode 100644 assets/sounds/6.mp3 create mode 100644 assets/sounds/6.mp3.import create mode 100644 assets/sounds/7.mp3 create mode 100644 assets/sounds/7.mp3.import create mode 100644 assets/sounds/8.mp3 create mode 100644 assets/sounds/8.mp3.import create mode 100644 assets/sounds/9.mp3 create mode 100644 assets/sounds/9.mp3.import create mode 100644 scenes/puzzles/phonephreak.tscn create mode 100644 scripts/Phonephreak.gd create mode 100644 scripts/Phonephreak.gd.uid diff --git a/assets/sounds/0.mp3 b/assets/sounds/0.mp3 new file mode 100644 index 0000000..8b49cc1 --- /dev/null +++ b/assets/sounds/0.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:553e3e716c6fc53de5047134c60bb4dd2289bcb453acc58490eadfc1dc323102 +size 4971 diff --git a/assets/sounds/0.mp3.import b/assets/sounds/0.mp3.import new file mode 100644 index 0000000..2a3741e --- /dev/null +++ b/assets/sounds/0.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://6plxlmpgut38" +path="res://.godot/imported/0.mp3-424b0f7aeee18ccb8b3568142caab51d.mp3str" + +[deps] + +source_file="res://assets/sounds/0.mp3" +dest_files=["res://.godot/imported/0.mp3-424b0f7aeee18ccb8b3568142caab51d.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/1.mp3 b/assets/sounds/1.mp3 new file mode 100644 index 0000000..0e10f9d --- /dev/null +++ b/assets/sounds/1.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c045cfb4aca3479ee0784292b14f871c2096bcfd7fa19299e24312085e3b5ed +size 5075 diff --git a/assets/sounds/1.mp3.import b/assets/sounds/1.mp3.import new file mode 100644 index 0000000..0018012 --- /dev/null +++ b/assets/sounds/1.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://du02reo6oet7e" +path="res://.godot/imported/1.mp3-8249ffbd379df4568a56660e54b71b58.mp3str" + +[deps] + +source_file="res://assets/sounds/1.mp3" +dest_files=["res://.godot/imported/1.mp3-8249ffbd379df4568a56660e54b71b58.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/2.mp3 b/assets/sounds/2.mp3 new file mode 100644 index 0000000..e67ee2e --- /dev/null +++ b/assets/sounds/2.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bb5455970420b9901355e2082b313eda45a719b3abfe6698d84527a4bc1a44d +size 5102 diff --git a/assets/sounds/2.mp3.import b/assets/sounds/2.mp3.import new file mode 100644 index 0000000..ec86040 --- /dev/null +++ b/assets/sounds/2.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://cve6byu0v6rpo" +path="res://.godot/imported/2.mp3-c7cf5564039784282e2c058b85f31af4.mp3str" + +[deps] + +source_file="res://assets/sounds/2.mp3" +dest_files=["res://.godot/imported/2.mp3-c7cf5564039784282e2c058b85f31af4.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/3.mp3 b/assets/sounds/3.mp3 new file mode 100644 index 0000000..f0b714a --- /dev/null +++ b/assets/sounds/3.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b0947d43c02b37c502165afeadb4910e635b023450b73e6c9a621e75f51bced +size 5024 diff --git a/assets/sounds/3.mp3.import b/assets/sounds/3.mp3.import new file mode 100644 index 0000000..216b1f9 --- /dev/null +++ b/assets/sounds/3.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bq1q527xfecgm" +path="res://.godot/imported/3.mp3-2a033077c34e7db70ad702adef172a25.mp3str" + +[deps] + +source_file="res://assets/sounds/3.mp3" +dest_files=["res://.godot/imported/3.mp3-2a033077c34e7db70ad702adef172a25.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/4.mp3 b/assets/sounds/4.mp3 new file mode 100644 index 0000000..a2b20aa --- /dev/null +++ b/assets/sounds/4.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae8184fad9cf12c831db51c1a8ebc35fcd4a6765bf7c0bf40dcf08295fc768f0 +size 5075 diff --git a/assets/sounds/4.mp3.import b/assets/sounds/4.mp3.import new file mode 100644 index 0000000..2d81f3d --- /dev/null +++ b/assets/sounds/4.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bt1gt743xeode" +path="res://.godot/imported/4.mp3-581be5890aecc9069741cd559013e363.mp3str" + +[deps] + +source_file="res://assets/sounds/4.mp3" +dest_files=["res://.godot/imported/4.mp3-581be5890aecc9069741cd559013e363.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/5.mp3 b/assets/sounds/5.mp3 new file mode 100644 index 0000000..93d716b --- /dev/null +++ b/assets/sounds/5.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:461fc2c89d5b298c0e446b1d1b3188763145ff405d6b58253dd0109797d2f7e0 +size 5129 diff --git a/assets/sounds/5.mp3.import b/assets/sounds/5.mp3.import new file mode 100644 index 0000000..4e76f58 --- /dev/null +++ b/assets/sounds/5.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://c1spyvwruvk67" +path="res://.godot/imported/5.mp3-02a6c6a13ed93beee6fb61e49fddc60a.mp3str" + +[deps] + +source_file="res://assets/sounds/5.mp3" +dest_files=["res://.godot/imported/5.mp3-02a6c6a13ed93beee6fb61e49fddc60a.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/6.mp3 b/assets/sounds/6.mp3 new file mode 100644 index 0000000..31bd56a --- /dev/null +++ b/assets/sounds/6.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd376bf2773ddf30213780678b86770857627e66da8a61c74339bf2d43507411 +size 5076 diff --git a/assets/sounds/6.mp3.import b/assets/sounds/6.mp3.import new file mode 100644 index 0000000..bb4625c --- /dev/null +++ b/assets/sounds/6.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://37eyd54u7ygg" +path="res://.godot/imported/6.mp3-39861cd13677b3630721352de1304cde.mp3str" + +[deps] + +source_file="res://assets/sounds/6.mp3" +dest_files=["res://.godot/imported/6.mp3-39861cd13677b3630721352de1304cde.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/7.mp3 b/assets/sounds/7.mp3 new file mode 100644 index 0000000..3c9171e --- /dev/null +++ b/assets/sounds/7.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dac7c95864a7d02e172e1ddf16cc3c07e5605d703a5b6738ead5c73e3d0881da +size 5075 diff --git a/assets/sounds/7.mp3.import b/assets/sounds/7.mp3.import new file mode 100644 index 0000000..46ed8d2 --- /dev/null +++ b/assets/sounds/7.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://ckhrvslvgjttw" +path="res://.godot/imported/7.mp3-5bfdffca7ad3962d6463b89fca814bcc.mp3str" + +[deps] + +source_file="res://assets/sounds/7.mp3" +dest_files=["res://.godot/imported/7.mp3-5bfdffca7ad3962d6463b89fca814bcc.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/8.mp3 b/assets/sounds/8.mp3 new file mode 100644 index 0000000..eea7b72 --- /dev/null +++ b/assets/sounds/8.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d68c05bc76884ad34803c20ade91dd40e569bebd94ebf8ef0553d6becec9c07b +size 4997 diff --git a/assets/sounds/8.mp3.import b/assets/sounds/8.mp3.import new file mode 100644 index 0000000..7b7344e --- /dev/null +++ b/assets/sounds/8.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://bqvnmvhrtqxpk" +path="res://.godot/imported/8.mp3-2bbbb8fe15d3a34e84b59a93aaccc2ce.mp3str" + +[deps] + +source_file="res://assets/sounds/8.mp3" +dest_files=["res://.godot/imported/8.mp3-2bbbb8fe15d3a34e84b59a93aaccc2ce.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sounds/9.mp3 b/assets/sounds/9.mp3 new file mode 100644 index 0000000..2e8d821 --- /dev/null +++ b/assets/sounds/9.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8adb528ea95785aa9e642e93d08a5e3e9d6f698116366f16ab272229c235cc94 +size 4999 diff --git a/assets/sounds/9.mp3.import b/assets/sounds/9.mp3.import new file mode 100644 index 0000000..9a6f4e4 --- /dev/null +++ b/assets/sounds/9.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://dnpyhwaknblo5" +path="res://.godot/imported/9.mp3-c14e3c8e4465cc4bf59970048975e72f.mp3str" + +[deps] + +source_file="res://assets/sounds/9.mp3" +dest_files=["res://.godot/imported/9.mp3-c14e3c8e4465cc4bf59970048975e72f.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/sprites/coin.png.import b/assets/sprites/coin.png.import index 8e227de..ed7605a 100644 --- a/assets/sprites/coin.png.import +++ b/assets/sprites/coin.png.import @@ -3,11 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://xlg0kyp0jhet" -valid=false +path="res://.godot/imported/coin.png-c8309bf0f8fb5f3a7d1e96a4eb3f02ce.ctex" +metadata={ +"vram_texture": false +} [deps] source_file="res://assets/sprites/coin.png" +dest_files=["res://.godot/imported/coin.png-c8309bf0f8fb5f3a7d1e96a4eb3f02ce.ctex"] [params] diff --git a/assets/sprites/fruit.png.import b/assets/sprites/fruit.png.import index a75aaa9..7b1a161 100644 --- a/assets/sprites/fruit.png.import +++ b/assets/sprites/fruit.png.import @@ -3,11 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://coer7bk56ksye" -valid=false +path="res://.godot/imported/fruit.png-3735163b668af10c2b35b52cba81b68a.ctex" +metadata={ +"vram_texture": false +} [deps] source_file="res://assets/sprites/fruit.png" +dest_files=["res://.godot/imported/fruit.png-3735163b668af10c2b35b52cba81b68a.ctex"] [params] diff --git a/assets/sprites/knight.png.import b/assets/sprites/knight.png.import index 489a0a9..8cb9e23 100644 --- a/assets/sprites/knight.png.import +++ b/assets/sprites/knight.png.import @@ -3,11 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bt61g6xdrepd" -valid=false +path="res://.godot/imported/knight.png-7c67c83d34932624952797d9e971a644.ctex" +metadata={ +"vram_texture": false +} [deps] source_file="res://assets/sprites/knight.png" +dest_files=["res://.godot/imported/knight.png-7c67c83d34932624952797d9e971a644.ctex"] [params] diff --git a/assets/sprites/platforms.png.import b/assets/sprites/platforms.png.import index e036b54..7562c7d 100644 --- a/assets/sprites/platforms.png.import +++ b/assets/sprites/platforms.png.import @@ -3,11 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b7cc0lt1g041f" -valid=false +path="res://.godot/imported/platforms.png-3869606db457611ed4193d705dc364e4.ctex" +metadata={ +"vram_texture": false +} [deps] source_file="res://assets/sprites/platforms.png" +dest_files=["res://.godot/imported/platforms.png-3869606db457611ed4193d705dc364e4.ctex"] [params] diff --git a/assets/sprites/slime_green.png.import b/assets/sprites/slime_green.png.import index 4a5ea92..6a5cb4a 100644 --- a/assets/sprites/slime_green.png.import +++ b/assets/sprites/slime_green.png.import @@ -3,11 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bfp7d2c8w5d5j" -valid=false +path="res://.godot/imported/slime_green.png-f6349164bf3a0f5189bb927b97af9c58.ctex" +metadata={ +"vram_texture": false +} [deps] source_file="res://assets/sprites/slime_green.png" +dest_files=["res://.godot/imported/slime_green.png-f6349164bf3a0f5189bb927b97af9c58.ctex"] [params] diff --git a/assets/sprites/slime_purple.png.import b/assets/sprites/slime_purple.png.import index 49dead0..019f2db 100644 --- a/assets/sprites/slime_purple.png.import +++ b/assets/sprites/slime_purple.png.import @@ -3,11 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cjx7y6aru1j2v" -valid=false +path="res://.godot/imported/slime_purple.png-26dc5ddef235ce6a400e78e0d532b050.ctex" +metadata={ +"vram_texture": false +} [deps] source_file="res://assets/sprites/slime_purple.png" +dest_files=["res://.godot/imported/slime_purple.png-26dc5ddef235ce6a400e78e0d532b050.ctex"] [params] diff --git a/assets/sprites/world_tileset.png.import b/assets/sprites/world_tileset.png.import index c73e6f3..a097067 100644 --- a/assets/sprites/world_tileset.png.import +++ b/assets/sprites/world_tileset.png.import @@ -3,11 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bdtdnto04r82s" -valid=false +path="res://.godot/imported/world_tileset.png-61a32465f33c3d9d3bfecb75b6485009.ctex" +metadata={ +"vram_texture": false +} [deps] source_file="res://assets/sprites/world_tileset.png" +dest_files=["res://.godot/imported/world_tileset.png-61a32465f33c3d9d3bfecb75b6485009.ctex"] [params] diff --git a/scenes/puzzles/phonephreak.tscn b/scenes/puzzles/phonephreak.tscn new file mode 100644 index 0000000..c4b4b8a --- /dev/null +++ b/scenes/puzzles/phonephreak.tscn @@ -0,0 +1,32 @@ +[gd_scene format=3 uid="uid://btj7tpfvqfelu"] + +[ext_resource type="Script" uid="uid://c7fhd1eqlgwr4" path="res://scripts/Phonephreak.gd" id="1_knn0u"] +[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="2_bg4gc"] + +[node name="Phonephreak" type="Node2D" unique_id=1830177910] +script = ExtResource("1_knn0u") + +[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." unique_id=519900134] + +[node name="Button0" type="Button" parent="." unique_id=1619377723] +offset_left = 568.0 +offset_top = 494.0 +offset_right = 668.0 +offset_bottom = 594.0 + +[node name="Label" type="Label" parent="Button0" unique_id=1004291322] +layout_mode = 0 +offset_left = 15.0 +offset_top = 14.0 +offset_right = 85.0 +offset_bottom = 94.0 +theme_override_fonts/font = ExtResource("2_bg4gc") +theme_override_font_sizes/font_size = 80 +text = "0" + +[node name="ColorRect" type="ColorRect" parent="Button0" unique_id=582830561] +layout_mode = 0 +offset_right = 100.0 +offset_bottom = 100.0 +mouse_filter = 2 +color = Color(1, 1, 1, 0) diff --git a/scripts/Phonephreak.gd b/scripts/Phonephreak.gd new file mode 100644 index 0000000..2919aaf --- /dev/null +++ b/scripts/Phonephreak.gd @@ -0,0 +1,76 @@ +extends Node + +var Rounds: int = 5 + +var pieces: Array[int] = [] +var guessed: Array[int] = [] +var to_play: Array[int] = [] +var buttons: Array[Button] = [] + +const PhoneSounds = [ + preload("res://assets/sounds/0.mp3"), + preload("res://assets/sounds/1.mp3"), + preload("res://assets/sounds/2.mp3"), + preload("res://assets/sounds/3.mp3"), + preload("res://assets/sounds/4.mp3"), + preload("res://assets/sounds/5.mp3"), + preload("res://assets/sounds/6.mp3"), + preload("res://assets/sounds/7.mp3"), + preload("res://assets/sounds/8.mp3"), + preload("res://assets/sounds/9.mp3"), +] + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + var origin = Vector2(0, 0) + var offset = 125 + $Button0.position.x = origin.x + 1 * offset + $Button0.position.y = origin.y + 3 * offset + buttons.append($Button0) + for i in range(0, 9): + var col = i % 3 + var row = i / 3 + var b: Button = $Button0.duplicate() + var label: Label = b.get_child(0) + label.text = "%s" %(i+1) + var rect: ColorRect = b.get_child(1) + rect.color = Color.from_rgba8(255, 255, 255, 0) + b.position.x = origin.x + col * offset + b.position.y = origin.y + row * offset + b.pressed.connect(_on_button_pressed.bind(i+1)) + buttons.append(b) + b.name = "Button%i" %(i) + add_child(b) + $Button0.pressed.connect(_on_button_pressed.bind(0)) + + for i in Rounds: + var item = randi() % len(PhoneSounds) + pieces.append(item) + to_play.append(item) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + if guessed.size() >= pieces.size(): + if guessed == pieces: + print("Got it") + else: + print("Nope") + + if !$AudioStreamPlayer2D.playing and !to_play.is_empty(): + actuate_button(to_play.pop_front()) + + for b in buttons: + var rect: ColorRect = b.get_child(1) + if rect.color.a8 != 0: + rect.color = Color.from_rgba8(255, 255, 255, rect.color.a8 - 5) + +func _on_button_pressed(button: int) -> void: + guessed.append(button) + actuate_button(button) + +func actuate_button(button: int) -> void: + var rect: ColorRect = buttons[button].get_child(1) + rect.color = Color.from_rgba8(255, 255, 255, 255) + + $AudioStreamPlayer2D.stream = PhoneSounds[button] + $AudioStreamPlayer2D.play() diff --git a/scripts/Phonephreak.gd.uid b/scripts/Phonephreak.gd.uid new file mode 100644 index 0000000..1daef64 --- /dev/null +++ b/scripts/Phonephreak.gd.uid @@ -0,0 +1 @@ +uid://c7fhd1eqlgwr4 -- 2.54.0