From 18e144e81d3eaa479da1a7a8e05b06c9f7d3a52c Mon Sep 17 00:00:00 2001 From: Fabio Date: Sat, 17 Aug 2024 01:28:23 +0200 Subject: [PATCH 1/7] add main menu --- gmtk_2024/control.gd | 59 +++++++++++++++++++++++++++ gmtk_2024/menu/main_menu/conFBFE.tmp | 18 ++++++++ gmtk_2024/menu/main_menu/control.tscn | 34 +++++++++++++++ gmtk_2024/project.godot | 5 +++ 4 files changed, 116 insertions(+) create mode 100644 gmtk_2024/control.gd create mode 100644 gmtk_2024/menu/main_menu/conFBFE.tmp create mode 100644 gmtk_2024/menu/main_menu/control.tscn diff --git a/gmtk_2024/control.gd b/gmtk_2024/control.gd new file mode 100644 index 0000000..c4a6fee --- /dev/null +++ b/gmtk_2024/control.gd @@ -0,0 +1,59 @@ +extends Control + +var display_text = "ULTIM809 COMPUTER BY MATT SARNOFF\nDEBUG ROM V0.3 - 28 JUN 2010\n512KB AVAILABLE RAM\n\nCARD: NO NAME\n128040960 BYTES\nOFFSETS: F:33 R:279 D:311\n\nMONITOR READY." + +var current_text = "" +var char_index = 0 +var typing_speed = 0.05 +var fast_typing_speed = 0.01 + +func _ready(): + modulate = Color(0, 0, 0) + + $VBoxContainer/Label.add_theme_color_override("font_color", Color(0, 1, 0)) + + $VBoxContainer/Label.set_custom_minimum_size(Vector2(20, 0)) + + for button in $VBoxContainer.get_children(): + if button is Button: + button.visible = false + button.add_theme_color_override("font_color", Color(0, 1, 0)) + button.add_theme_stylebox_override("normal", StyleBoxEmpty.new()) + + _start_typing() + +func _process(delta: float) -> void: + if Input.is_action_pressed("ui_accept") or Input.is_action_pressed("click"): + typing_speed = fast_typing_speed + else: + typing_speed = 0.05 + +func _start_typing() -> void: + current_text = "" + char_index = 0 + _update_text() + +func _update_text() -> void: + if char_index < display_text.length(): + current_text += display_text[char_index] + $VBoxContainer/Label.text = current_text + char_index += 1 + await get_tree().create_timer(typing_speed).timeout + _update_text() + else: + _show_menu_options() + +func _show_menu_options() -> void: + for button in $VBoxContainer.get_children(): + button.visible = true + +func _on_start_button_pressed() -> void: + print("Start Button Clicked") + +func _on_credits_button_pressed() -> void: + print("Credits Button Clicked") + +func _on_quit_button_pressed() -> void: + $VBoxContainer/Label.text += "\nBye!" + await get_tree().create_timer(1).timeout + get_tree().quit() diff --git a/gmtk_2024/menu/main_menu/conFBFE.tmp b/gmtk_2024/menu/main_menu/conFBFE.tmp new file mode 100644 index 0000000..0c2e91e --- /dev/null +++ b/gmtk_2024/menu/main_menu/conFBFE.tmp @@ -0,0 +1,18 @@ +[gd_scene load_steps=3 format=3 uid="uid://cscsuljo8ivad"] + +[ext_resource type="Script" path="res://control.gd" id="1_demfw"] +[ext_resource type="PackedScene" uid="uid://cxbalfjqtp06t" path="res://canvas_layer.tscn" id="2_jr3s0"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_demfw") + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 23.0 + +[node name="CanvasLayer" parent="." instance=ExtResource("2_jr3s0")] diff --git a/gmtk_2024/menu/main_menu/control.tscn b/gmtk_2024/menu/main_menu/control.tscn new file mode 100644 index 0000000..c0c4621 --- /dev/null +++ b/gmtk_2024/menu/main_menu/control.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=2 format=3 uid="uid://cscsuljo8ivad"] + +[ext_resource type="Script" path="res://control.gd" id="1_demfw"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 0 +offset_right = 40.0 +offset_bottom = 40.0 +script = ExtResource("1_demfw") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 +offset_right = 70.0 +offset_bottom = 101.0 + +[node name="Label" type="Label" parent="VBoxContainer"] +layout_mode = 2 + +[node name="start" type="Button" parent="VBoxContainer"] +layout_mode = 2 +text = ">start" + +[node name="credits" type="Button" parent="VBoxContainer"] +layout_mode = 2 +text = ">credits" + +[node name="quit" type="Button" parent="VBoxContainer"] +layout_mode = 2 +text = ">quit" + +[connection signal="pressed" from="VBoxContainer/start" to="." method="_on_start_button_pressed"] +[connection signal="pressed" from="VBoxContainer/credits" to="." method="_on_credits_button_pressed"] +[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_button_pressed"] diff --git a/gmtk_2024/project.godot b/gmtk_2024/project.godot index 9b95802..49cdbcd 100644 --- a/gmtk_2024/project.godot +++ b/gmtk_2024/project.godot @@ -39,6 +39,11 @@ player_jump={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) ] } +click={ +"deadzone": 0.5, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null) +] +} [rendering] From bb034108c80233a8f46e1ef16e087f621721a103 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sat, 17 Aug 2024 11:20:56 +0200 Subject: [PATCH 2/7] main menu changes --- gmtk_2024/CommodoreSixtyFour.ttf | Bin 0 -> 12748 bytes gmtk_2024/CommodoreSixtyFour.ttf.import | 34 +++++ gmtk_2024/Winds 7.ttf | Bin 0 -> 118342 bytes gmtk_2024/Winds 7.ttf.import | 34 +++++ gmtk_2024/control.gd | 59 --------- gmtk_2024/menu/main_menu/control.tscn | 34 ----- gmtk_2024/menu/main_menu/main_menu.tscn | 157 ++++++++++++++++++++++++ gmtk_2024/project.godot | 2 +- 8 files changed, 226 insertions(+), 94 deletions(-) create mode 100644 gmtk_2024/CommodoreSixtyFour.ttf create mode 100644 gmtk_2024/CommodoreSixtyFour.ttf.import create mode 100644 gmtk_2024/Winds 7.ttf create mode 100644 gmtk_2024/Winds 7.ttf.import delete mode 100644 gmtk_2024/control.gd delete mode 100644 gmtk_2024/menu/main_menu/control.tscn create mode 100644 gmtk_2024/menu/main_menu/main_menu.tscn diff --git a/gmtk_2024/CommodoreSixtyFour.ttf b/gmtk_2024/CommodoreSixtyFour.ttf new file mode 100644 index 0000000000000000000000000000000000000000..8fa222999ec5b45acea6ec678c892b6b8d51d177 GIT binary patch literal 12748 zcmbtbdu$xXdH-e~cgOdUGA+r{NtCD)Wt}3EJe^33qPvzQT5)1qwrs_5ZFiddS+tcu?J7x{Oml@&{d3XzW?x%3Hnpo zf%_}C-}UhEyM{kMdhhE*>J08roSK=uF!0Fl{vnb3eIn<;sTbz^XuE^Cxy^X)JvVvr z!qO4}!%&F(!gJ?dJpH5R-u^qH{63=c^)u6xQ-#-NzKdr+#<~9t2K*~t3*ZAM?Km?t zf4TT_|FgJ{0Kf0t?5WA$dEqzz2k`qa)-yAC`2xK|pGE&D=J%bSoSE+3^z!{gAH%JB z|HACWdGDTYzE8CGXITF-Q^Mz8?J7(^-F5K4X{(0;qQAfRwd3`6DRe^T4cr&V;ZYn| zgo)gal3`))beLhLIqRR+3 ze1_&(z^#e|ZvfrNy*$&j1fa*9Y^gjC4cir;o3+iTeYj)m*-W0=fc6k(`I!6}dWxQ= z&(Z7jM{cz3x5`ery<9BcR^CwFT;5UMQ{GoTSiV^PwepwCua>`7{_FDJl>dF_GdoZ1 zJUy^(kd{7xrxPreVN4nrUn#2$7&GNxEx!U7Ulkbd3XJI(#?rqn{b1=|m%hLB=SzR~ z^WVSmy~U>&Pb?l^Jhu4Y;scBKEgoE~E$&_TaN)leZZ5pH@S}xm3xBfk^@VKpsf13^KIEXve@hpy-6@`aYxw)T$Bu3~r3y4!khU%z4F9h)|n zwruU&w!MExdFQ~cJ9k(1d~EMsgG0mBeYO1~qjw(|J2-w1{Q_iu@1gq;VDCTr@drNf z$p;^L_}C+l9)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lmMNVBUa#t%(N)4w*x&1z&p4+l7bbBibm>t(rajFi=>vy3rfMV?gLnWQYA`fR~SN$V}EgAtK3B2q8+JoToEvlLJ3;-$XIZFZ=9 zbf$fLp67Q!Zy!O*k(VE$-rn^@2ku?q}-`=`*>Z@L_Mi@bzjbt-I{GHo&rYU`$p#bS4I_?n`+5fLck;j*xq=e20F29rT(*qY!XMf`Q}MXAks z7a<%Ddiegw)YI6zuZ<3c2;;Tru)k9n6k|5~+Tdd)&zO5v(#DwCP7JLdF{z^-Kh2BP zA)rFu_wzF%Y6CDl0%oJ6e~z=HgY3}`SB}m0 zuwFD6H@<(d)<18rhv(8itaW%dL@?s&`yq+d)hZ$acAnDA8sB-=i+PrQCCD zuTVMlNLjB$fpSl&N4vHnIJ>=-DtOf)`+1g&6`Kzxn zSRB`(VCXfm-Ohc=Tf6q_wX0qhO-4%!N5b48?`f`GR<5x?7=sR$m{N^X2FC z^%-)G{F1&t6IT!)(AQ_<^#?KUtK(-wa-MudUw3|fT3>g5eqLX9e*SxX-TC?Z`Wk*# z=j&_uSzRPI%U$v|xn1s;9l1(gC3nbMAn^{?}L@Q|*> z@T2i!S7VBf5e=xZ=0nv0y6?L0y6?L0y6?L0y6?L0y6?L z0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L z0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L z0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L0y6?L d0y6?L0y6?L0y6?L0y6?L0y6?L0uvzce*ts?UMc_p literal 0 HcmV?d00001 diff --git a/gmtk_2024/Winds 7.ttf.import b/gmtk_2024/Winds 7.ttf.import new file mode 100644 index 0000000..13b2a24 --- /dev/null +++ b/gmtk_2024/Winds 7.ttf.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://b1m5vkvhmf1x8" +path="res://.godot/imported/Winds 7.ttf-d65fb42952f9ffdf099366b21f03c274.fontdata" + +[deps] + +source_file="res://Winds 7.ttf" +dest_files=["res://.godot/imported/Winds 7.ttf-d65fb42952f9ffdf099366b21f03c274.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/gmtk_2024/control.gd b/gmtk_2024/control.gd deleted file mode 100644 index c4a6fee..0000000 --- a/gmtk_2024/control.gd +++ /dev/null @@ -1,59 +0,0 @@ -extends Control - -var display_text = "ULTIM809 COMPUTER BY MATT SARNOFF\nDEBUG ROM V0.3 - 28 JUN 2010\n512KB AVAILABLE RAM\n\nCARD: NO NAME\n128040960 BYTES\nOFFSETS: F:33 R:279 D:311\n\nMONITOR READY." - -var current_text = "" -var char_index = 0 -var typing_speed = 0.05 -var fast_typing_speed = 0.01 - -func _ready(): - modulate = Color(0, 0, 0) - - $VBoxContainer/Label.add_theme_color_override("font_color", Color(0, 1, 0)) - - $VBoxContainer/Label.set_custom_minimum_size(Vector2(20, 0)) - - for button in $VBoxContainer.get_children(): - if button is Button: - button.visible = false - button.add_theme_color_override("font_color", Color(0, 1, 0)) - button.add_theme_stylebox_override("normal", StyleBoxEmpty.new()) - - _start_typing() - -func _process(delta: float) -> void: - if Input.is_action_pressed("ui_accept") or Input.is_action_pressed("click"): - typing_speed = fast_typing_speed - else: - typing_speed = 0.05 - -func _start_typing() -> void: - current_text = "" - char_index = 0 - _update_text() - -func _update_text() -> void: - if char_index < display_text.length(): - current_text += display_text[char_index] - $VBoxContainer/Label.text = current_text - char_index += 1 - await get_tree().create_timer(typing_speed).timeout - _update_text() - else: - _show_menu_options() - -func _show_menu_options() -> void: - for button in $VBoxContainer.get_children(): - button.visible = true - -func _on_start_button_pressed() -> void: - print("Start Button Clicked") - -func _on_credits_button_pressed() -> void: - print("Credits Button Clicked") - -func _on_quit_button_pressed() -> void: - $VBoxContainer/Label.text += "\nBye!" - await get_tree().create_timer(1).timeout - get_tree().quit() diff --git a/gmtk_2024/menu/main_menu/control.tscn b/gmtk_2024/menu/main_menu/control.tscn deleted file mode 100644 index c0c4621..0000000 --- a/gmtk_2024/menu/main_menu/control.tscn +++ /dev/null @@ -1,34 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://cscsuljo8ivad"] - -[ext_resource type="Script" path="res://control.gd" id="1_demfw"] - -[node name="Control" type="Control"] -layout_mode = 3 -anchors_preset = 0 -offset_right = 40.0 -offset_bottom = 40.0 -script = ExtResource("1_demfw") - -[node name="VBoxContainer" type="VBoxContainer" parent="."] -layout_mode = 2 -offset_right = 70.0 -offset_bottom = 101.0 - -[node name="Label" type="Label" parent="VBoxContainer"] -layout_mode = 2 - -[node name="start" type="Button" parent="VBoxContainer"] -layout_mode = 2 -text = ">start" - -[node name="credits" type="Button" parent="VBoxContainer"] -layout_mode = 2 -text = ">credits" - -[node name="quit" type="Button" parent="VBoxContainer"] -layout_mode = 2 -text = ">quit" - -[connection signal="pressed" from="VBoxContainer/start" to="." method="_on_start_button_pressed"] -[connection signal="pressed" from="VBoxContainer/credits" to="." method="_on_credits_button_pressed"] -[connection signal="pressed" from="VBoxContainer/quit" to="." method="_on_quit_button_pressed"] diff --git a/gmtk_2024/menu/main_menu/main_menu.tscn b/gmtk_2024/menu/main_menu/main_menu.tscn new file mode 100644 index 0000000..9599281 --- /dev/null +++ b/gmtk_2024/menu/main_menu/main_menu.tscn @@ -0,0 +1,157 @@ +[gd_scene load_steps=3 format=3 uid="uid://dpiyhpt7it05x"] + +[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="1_4eeva"] + +[sub_resource type="GDScript" id="GDScript_0d3dd"] +script/source = "extends Control + +var display_text = \"\"\" +SYSTEM INITIALIZATION... +--------------------------------------- +PLACEHOLDER BOOT SEQUENCE +COPYRIGHT PLACEHOLDER + +> CPU: +> MEMORY: +> STORAGE: +> GPU: + +>> WARNING: +>> RECOMMENDED ACTION: + +SYSTEM READY. +PRESS START TO INITIATE. + +\"\"\" + +var current_text = \"\" +var char_index = 0 +var typing_speed = 0.05 +var fast_typing_speed = 0.01 + +func _ready(): + modulate = Color(0, 0, 0) + + $VBoxContainer/Label.add_theme_color_override(\"font_color\", Color(0, 1, 0)) + + $VBoxContainer/Label.set_custom_minimum_size(Vector2(20, 0)) + + for button in $VBoxContainer/VBoxContainer2.get_children(): + if button is Button: + button.visible = false + button.add_theme_color_override(\"font_color\", Color(0, 1, 0)) + button.add_theme_stylebox_override(\"normal\", StyleBoxEmpty.new()) + + _start_typing() + +func _process(delta: float) -> void: + if Input.is_action_pressed(\"ui_accept\") or Input.is_action_pressed(\"click\"): + typing_speed = fast_typing_speed + else: + typing_speed = 0.05 + +func _start_typing() -> void: + current_text = \"\" + char_index = 0 + _update_text() + +func _update_text() -> void: + if char_index < display_text.length(): + current_text += display_text[char_index] + $VBoxContainer/Label.text = current_text + char_index += 1 + await get_tree().create_timer(typing_speed).timeout + _update_text() + else: + _show_menu_options() + +func _show_menu_options() -> void: + for button in $VBoxContainer/VBoxContainer2.get_children(): + button.visible = true + +func _on_start_button_pressed() -> void: + print(\"Start Button Clicked\") + +func _on_credits_button_pressed() -> void: + print(\"Credits Button Clicked\") + +func _on_quit_button_pressed() -> void: + $VBoxContainer/Label.text += \"\\nBye!\" + await get_tree().create_timer(1).timeout + get_tree().quit() +" + +[node name="MainMenu" type="MarginContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="ColorRect" type="ColorRect" parent="."] +visible = false +layout_mode = 2 +color = Color(0, 0, 0, 1) + +[node name="Control" type="Control" parent="."] +layout_mode = 2 +script = SubResource("GDScript_0d3dd") + +[node name="VBoxContainer" type="VBoxContainer" parent="Control"] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="Label" parent="Control/VBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0, 1, 0, 1) +theme_override_fonts/font = ExtResource("1_4eeva") + +[node name="VBoxContainer2" type="VBoxContainer" parent="Control/VBoxContainer"] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"] +layout_mode = 2 + +[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer"] +custom_minimum_size = Vector2(8, 0) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_4eeva") +text = ">" + +[node name="start" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_4eeva") +text = "start" + +[node name="HBoxContainer2" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"] +layout_mode = 2 + +[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer2"] +custom_minimum_size = Vector2(8, 0) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_4eeva") +text = ">" + +[node name="credits" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer2"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_4eeva") +text = "credits" + +[node name="HBoxContainer3" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"] +layout_mode = 2 + +[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer3"] +custom_minimum_size = Vector2(8, 0) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_4eeva") +text = ">" + +[node name="quit" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer3"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_4eeva") +text = "quit" + +[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer/start" to="Control" method="_on_start_button_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer2/credits" to="Control" method="_on_credits_button_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer3/quit" to="Control" method="_on_quit_button_pressed"] diff --git a/gmtk_2024/project.godot b/gmtk_2024/project.godot index 49cdbcd..1048417 100644 --- a/gmtk_2024/project.godot +++ b/gmtk_2024/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="GMTK_2024" -run/main_scene="res://levels/TestingRoom.tscn" +run/main_scene="res://menu/main_menu/main_menu.tscn" config/features=PackedStringArray("4.3", "GL Compatibility") config/icon="res://icon.svg" From 036c42b5bcc68c3ad068148dc227ce85132930e0 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sat, 17 Aug 2024 12:36:44 +0200 Subject: [PATCH 3/7] fixed menu color problem --- gmtk_2024/control.gd | 68 ++++++++++ gmtk_2024/menu/main_menu/MainMenu.tscn | 99 +++++++++++++++ gmtk_2024/menu/main_menu/main_menu.tscn | 157 ------------------------ gmtk_2024/project.godot | 2 +- 4 files changed, 168 insertions(+), 158 deletions(-) create mode 100644 gmtk_2024/control.gd create mode 100644 gmtk_2024/menu/main_menu/MainMenu.tscn delete mode 100644 gmtk_2024/menu/main_menu/main_menu.tscn diff --git a/gmtk_2024/control.gd b/gmtk_2024/control.gd new file mode 100644 index 0000000..3bf34ed --- /dev/null +++ b/gmtk_2024/control.gd @@ -0,0 +1,68 @@ +extends Control + +var display_text = """ +SYSTEM INITIALIZATION... +--------------------------------------- +PLACEHOLDER BOOT SEQUENCE +COPYRIGHT PLACEHOLDER + +> CPU: +> MEMORY: +> STORAGE: +> GPU: + +>> WARNING: +>> RECOMMENDED ACTION: + +SYSTEM READY. +PRESS START TO INITIATE. + +""" + +var current_text = "" +var char_index = 0 +var typing_speed = 0.05 +var fast_typing_speed = 0.005 + +func _ready(): + for hbox in $VBoxContainer/VBoxContainer3.get_children(): + hbox.visible = false + + _start_typing() + +func _process(delta: float) -> void: + if Input.is_action_pressed("ui_accept") or Input.is_action_pressed("click"): + typing_speed = fast_typing_speed + else: + typing_speed = 0.05 + +func _start_typing() -> void: + current_text = "" + char_index = 0 + _update_text() + +func _update_text() -> void: + if char_index < display_text.length(): + current_text += display_text[char_index] + $VBoxContainer/VBoxContainer2/Label.text = current_text + char_index += 1 + await get_tree().create_timer(typing_speed).timeout + _update_text() + else: + _show_menu_options() + +func _show_menu_options() -> void: + for hbox in $VBoxContainer/VBoxContainer3.get_children(): + hbox.visible = true + + +func _on_start_button_pressed() -> void: + print("Start Button Clicked") + +func _on_credits_button_pressed() -> void: + print("Credits Button Clicked") + +func _on_quit_button_pressed() -> void: + $VBoxContainer/VBoxContainer2/Label.text += "\nBye!" + await get_tree().create_timer(0.5).timeout + get_tree().quit() diff --git a/gmtk_2024/menu/main_menu/MainMenu.tscn b/gmtk_2024/menu/main_menu/MainMenu.tscn new file mode 100644 index 0000000..32ee0fc --- /dev/null +++ b/gmtk_2024/menu/main_menu/MainMenu.tscn @@ -0,0 +1,99 @@ +[gd_scene load_steps=5 format=3 uid="uid://1h2urto6y63r"] + +[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="1_1tx2i"] +[ext_resource type="Script" path="res://control.gd" id="2_deavt"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vnp6n"] + +[sub_resource type="Theme" id="Theme_p2nm6"] +default_font = ExtResource("1_1tx2i") +Button/colors/font_color = Color(0, 1, 0, 1) +Label/colors/font_color = Color(0, 1, 0, 1) +Label/colors/font_outline_color = Color(0, 0, 0, 1) +Label/colors/font_shadow_color = Color(0, 0, 0, 0) +Label/constants/line_spacing = 3 +Label/constants/outline_size = 0 +Label/constants/shadow_offset_x = 1 +Label/constants/shadow_offset_y = 1 +Label/constants/shadow_outline_size = 1 +Label/font_sizes/font_size = 16 +Label/styles/normal = SubResource("StyleBoxEmpty_vnp6n") + +[node name="MainMenu" type="MarginContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = SubResource("Theme_p2nm6") + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 2 +color = Color(0, 0, 0, 1) + +[node name="Control" type="Control" parent="."] +layout_mode = 2 +script = ExtResource("2_deavt") + +[node name="VBoxContainer" type="VBoxContainer" parent="Control"] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="VBoxContainer2" type="VBoxContainer" parent="Control/VBoxContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2"] +layout_mode = 2 + +[node name="VBoxContainer3" type="VBoxContainer" parent="Control/VBoxContainer"] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer3"] +visible = false +layout_mode = 2 + +[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer3/HBoxContainer"] +custom_minimum_size = Vector2(8, 0) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_1tx2i") +text = ">" + +[node name="start" type="Button" parent="Control/VBoxContainer/VBoxContainer3/HBoxContainer"] +layout_mode = 2 +text = "start" +flat = true + +[node name="HBoxContainer2" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer3"] +visible = false +layout_mode = 2 + +[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer3/HBoxContainer2"] +custom_minimum_size = Vector2(8, 0) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_1tx2i") +text = ">" + +[node name="credits" type="Button" parent="Control/VBoxContainer/VBoxContainer3/HBoxContainer2"] +layout_mode = 2 +text = "credits" +flat = true + +[node name="HBoxContainer3" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer3"] +visible = false +layout_mode = 2 + +[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer3/HBoxContainer3"] +custom_minimum_size = Vector2(8, 0) +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_1tx2i") +text = ">" + +[node name="quit" type="Button" parent="Control/VBoxContainer/VBoxContainer3/HBoxContainer3"] +layout_mode = 2 +text = "quit" +flat = true + +[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer3/HBoxContainer/start" to="Control" method="_on_start_button_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer3/HBoxContainer2/credits" to="Control" method="_on_credits_button_pressed"] +[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer3/HBoxContainer3/quit" to="Control" method="_on_quit_button_pressed"] diff --git a/gmtk_2024/menu/main_menu/main_menu.tscn b/gmtk_2024/menu/main_menu/main_menu.tscn deleted file mode 100644 index 9599281..0000000 --- a/gmtk_2024/menu/main_menu/main_menu.tscn +++ /dev/null @@ -1,157 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://dpiyhpt7it05x"] - -[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="1_4eeva"] - -[sub_resource type="GDScript" id="GDScript_0d3dd"] -script/source = "extends Control - -var display_text = \"\"\" -SYSTEM INITIALIZATION... ---------------------------------------- -PLACEHOLDER BOOT SEQUENCE -COPYRIGHT PLACEHOLDER - -> CPU: -> MEMORY: -> STORAGE: -> GPU: - ->> WARNING: ->> RECOMMENDED ACTION: - -SYSTEM READY. -PRESS START TO INITIATE. - -\"\"\" - -var current_text = \"\" -var char_index = 0 -var typing_speed = 0.05 -var fast_typing_speed = 0.01 - -func _ready(): - modulate = Color(0, 0, 0) - - $VBoxContainer/Label.add_theme_color_override(\"font_color\", Color(0, 1, 0)) - - $VBoxContainer/Label.set_custom_minimum_size(Vector2(20, 0)) - - for button in $VBoxContainer/VBoxContainer2.get_children(): - if button is Button: - button.visible = false - button.add_theme_color_override(\"font_color\", Color(0, 1, 0)) - button.add_theme_stylebox_override(\"normal\", StyleBoxEmpty.new()) - - _start_typing() - -func _process(delta: float) -> void: - if Input.is_action_pressed(\"ui_accept\") or Input.is_action_pressed(\"click\"): - typing_speed = fast_typing_speed - else: - typing_speed = 0.05 - -func _start_typing() -> void: - current_text = \"\" - char_index = 0 - _update_text() - -func _update_text() -> void: - if char_index < display_text.length(): - current_text += display_text[char_index] - $VBoxContainer/Label.text = current_text - char_index += 1 - await get_tree().create_timer(typing_speed).timeout - _update_text() - else: - _show_menu_options() - -func _show_menu_options() -> void: - for button in $VBoxContainer/VBoxContainer2.get_children(): - button.visible = true - -func _on_start_button_pressed() -> void: - print(\"Start Button Clicked\") - -func _on_credits_button_pressed() -> void: - print(\"Credits Button Clicked\") - -func _on_quit_button_pressed() -> void: - $VBoxContainer/Label.text += \"\\nBye!\" - await get_tree().create_timer(1).timeout - get_tree().quit() -" - -[node name="MainMenu" type="MarginContainer"] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="ColorRect" type="ColorRect" parent="."] -visible = false -layout_mode = 2 -color = Color(0, 0, 0, 1) - -[node name="Control" type="Control" parent="."] -layout_mode = 2 -script = SubResource("GDScript_0d3dd") - -[node name="VBoxContainer" type="VBoxContainer" parent="Control"] -layout_mode = 0 -offset_right = 40.0 -offset_bottom = 40.0 - -[node name="Label" type="Label" parent="Control/VBoxContainer"] -layout_mode = 2 -theme_override_colors/font_color = Color(0, 1, 0, 1) -theme_override_fonts/font = ExtResource("1_4eeva") - -[node name="VBoxContainer2" type="VBoxContainer" parent="Control/VBoxContainer"] -layout_mode = 2 - -[node name="HBoxContainer" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"] -layout_mode = 2 - -[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer"] -custom_minimum_size = Vector2(8, 0) -layout_mode = 2 -theme_override_fonts/font = ExtResource("1_4eeva") -text = ">" - -[node name="start" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer"] -layout_mode = 2 -theme_override_fonts/font = ExtResource("1_4eeva") -text = "start" - -[node name="HBoxContainer2" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"] -layout_mode = 2 - -[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer2"] -custom_minimum_size = Vector2(8, 0) -layout_mode = 2 -theme_override_fonts/font = ExtResource("1_4eeva") -text = ">" - -[node name="credits" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer2"] -layout_mode = 2 -theme_override_fonts/font = ExtResource("1_4eeva") -text = "credits" - -[node name="HBoxContainer3" type="HBoxContainer" parent="Control/VBoxContainer/VBoxContainer2"] -layout_mode = 2 - -[node name="Label" type="Label" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer3"] -custom_minimum_size = Vector2(8, 0) -layout_mode = 2 -theme_override_fonts/font = ExtResource("1_4eeva") -text = ">" - -[node name="quit" type="Button" parent="Control/VBoxContainer/VBoxContainer2/HBoxContainer3"] -layout_mode = 2 -theme_override_fonts/font = ExtResource("1_4eeva") -text = "quit" - -[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer/start" to="Control" method="_on_start_button_pressed"] -[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer2/credits" to="Control" method="_on_credits_button_pressed"] -[connection signal="pressed" from="Control/VBoxContainer/VBoxContainer2/HBoxContainer3/quit" to="Control" method="_on_quit_button_pressed"] diff --git a/gmtk_2024/project.godot b/gmtk_2024/project.godot index 1048417..576b7f2 100644 --- a/gmtk_2024/project.godot +++ b/gmtk_2024/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="GMTK_2024" -run/main_scene="res://menu/main_menu/main_menu.tscn" +run/main_scene="res://menu/main_menu/MainMenu.tscn" config/features=PackedStringArray("4.3", "GL Compatibility") config/icon="res://icon.svg" From 78ef008e6a0924db561550a6abeb9ef67d9e59a8 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sat, 17 Aug 2024 12:57:20 +0200 Subject: [PATCH 4/7] add a credit scene --- gmtk_2024/menu/main_menu/CreditsScene.tscn | 25 +++++++++++ gmtk_2024/menu/main_menu/MainMenu.tscn | 25 +++-------- gmtk_2024/menu/main_menu/MainMenuTheme.tres | 19 +++++++++ gmtk_2024/scripts/menu_credit_control.gd | 42 +++++++++++++++++++ .../menu_main_control.gd} | 6 +-- 5 files changed, 94 insertions(+), 23 deletions(-) create mode 100644 gmtk_2024/menu/main_menu/CreditsScene.tscn create mode 100644 gmtk_2024/menu/main_menu/MainMenuTheme.tres create mode 100644 gmtk_2024/scripts/menu_credit_control.gd rename gmtk_2024/{control.gd => scripts/menu_main_control.gd} (88%) diff --git a/gmtk_2024/menu/main_menu/CreditsScene.tscn b/gmtk_2024/menu/main_menu/CreditsScene.tscn new file mode 100644 index 0000000..95c7a98 --- /dev/null +++ b/gmtk_2024/menu/main_menu/CreditsScene.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=3 format=3 uid="uid://cut2xjnvh8i58"] + +[ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_tmf11"] +[ext_resource type="Script" path="res://scripts/menu_credit_control.gd" id="2_ogwi7"] + +[node name="CreditScene" type="MarginContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("1_tmf11") + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 2 +color = Color(0, 0, 0, 1) + +[node name="Control" type="Control" parent="."] +layout_mode = 2 +script = ExtResource("2_ogwi7") + +[node name="Label" type="Label" parent="Control"] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 13.0 diff --git a/gmtk_2024/menu/main_menu/MainMenu.tscn b/gmtk_2024/menu/main_menu/MainMenu.tscn index 32ee0fc..7f15265 100644 --- a/gmtk_2024/menu/main_menu/MainMenu.tscn +++ b/gmtk_2024/menu/main_menu/MainMenu.tscn @@ -1,23 +1,8 @@ -[gd_scene load_steps=5 format=3 uid="uid://1h2urto6y63r"] +[gd_scene load_steps=4 format=3 uid="uid://1h2urto6y63r"] [ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="1_1tx2i"] -[ext_resource type="Script" path="res://control.gd" id="2_deavt"] - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vnp6n"] - -[sub_resource type="Theme" id="Theme_p2nm6"] -default_font = ExtResource("1_1tx2i") -Button/colors/font_color = Color(0, 1, 0, 1) -Label/colors/font_color = Color(0, 1, 0, 1) -Label/colors/font_outline_color = Color(0, 0, 0, 1) -Label/colors/font_shadow_color = Color(0, 0, 0, 0) -Label/constants/line_spacing = 3 -Label/constants/outline_size = 0 -Label/constants/shadow_offset_x = 1 -Label/constants/shadow_offset_y = 1 -Label/constants/shadow_outline_size = 1 -Label/font_sizes/font_size = 16 -Label/styles/normal = SubResource("StyleBoxEmpty_vnp6n") +[ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_kkajn"] +[ext_resource type="Script" path="res://scripts/menu_main_control.gd" id="2_g8c7b"] [node name="MainMenu" type="MarginContainer"] anchors_preset = 15 @@ -25,7 +10,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme = SubResource("Theme_p2nm6") +theme = ExtResource("1_kkajn") [node name="ColorRect" type="ColorRect" parent="."] layout_mode = 2 @@ -33,7 +18,7 @@ color = Color(0, 0, 0, 1) [node name="Control" type="Control" parent="."] layout_mode = 2 -script = ExtResource("2_deavt") +script = ExtResource("2_g8c7b") [node name="VBoxContainer" type="VBoxContainer" parent="Control"] layout_mode = 0 diff --git a/gmtk_2024/menu/main_menu/MainMenuTheme.tres b/gmtk_2024/menu/main_menu/MainMenuTheme.tres new file mode 100644 index 0000000..13841fe --- /dev/null +++ b/gmtk_2024/menu/main_menu/MainMenuTheme.tres @@ -0,0 +1,19 @@ +[gd_resource type="Theme" load_steps=3 format=3 uid="uid://cohbys634cf18"] + +[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="1_ep67t"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vnp6n"] + +[resource] +default_font = ExtResource("1_ep67t") +Button/colors/font_color = Color(0, 1, 0, 1) +Label/colors/font_color = Color(0, 1, 0, 1) +Label/colors/font_outline_color = Color(0, 0, 0, 1) +Label/colors/font_shadow_color = Color(0, 0, 0, 0) +Label/constants/line_spacing = 3 +Label/constants/outline_size = 0 +Label/constants/shadow_offset_x = 1 +Label/constants/shadow_offset_y = 1 +Label/constants/shadow_outline_size = 1 +Label/font_sizes/font_size = 16 +Label/styles/normal = SubResource("StyleBoxEmpty_vnp6n") diff --git a/gmtk_2024/scripts/menu_credit_control.gd b/gmtk_2024/scripts/menu_credit_control.gd new file mode 100644 index 0000000..c6e6147 --- /dev/null +++ b/gmtk_2024/scripts/menu_credit_control.gd @@ -0,0 +1,42 @@ +extends Control + +var credits_text = """ +CREDITS: +----------- +Programming: Jannis, Fabio +Design: Leon +Music: TBN +""" + +var current_text = "" +var char_index = 0 +var typing_speed = 0.05 +var fast_typing_speed = 0.005 + +func _ready(): + _start_typing() + +func _process(_delta: float) -> void: + if Input.is_action_pressed("ui_accept") or Input.is_action_pressed("click"): + typing_speed = fast_typing_speed + else: + typing_speed = 0.05 + +func _start_typing() -> void: + current_text = "" + char_index = 0 + _update_text() + +func _update_text() -> void: + if char_index < credits_text.length(): + current_text += credits_text[char_index] + $Label.text = current_text + char_index += 1 + await get_tree().create_timer(typing_speed).timeout + _update_text() + else: + _return_to_main_menu() + +func _return_to_main_menu() -> void: + await get_tree().create_timer(2).timeout + get_tree().change_scene_to_file("res://menu/main_menu/MainMenu.tscn") diff --git a/gmtk_2024/control.gd b/gmtk_2024/scripts/menu_main_control.gd similarity index 88% rename from gmtk_2024/control.gd rename to gmtk_2024/scripts/menu_main_control.gd index 3bf34ed..869b1d9 100644 --- a/gmtk_2024/control.gd +++ b/gmtk_2024/scripts/menu_main_control.gd @@ -30,7 +30,7 @@ func _ready(): _start_typing() -func _process(delta: float) -> void: +func _process(_delta: float) -> void: if Input.is_action_pressed("ui_accept") or Input.is_action_pressed("click"): typing_speed = fast_typing_speed else: @@ -60,9 +60,9 @@ func _on_start_button_pressed() -> void: print("Start Button Clicked") func _on_credits_button_pressed() -> void: - print("Credits Button Clicked") + get_tree().change_scene_to_file("res://menu/main_menu/CreditsScene.tscn") func _on_quit_button_pressed() -> void: - $VBoxContainer/VBoxContainer2/Label.text += "\nBye!" + $VBoxContainer/VBoxContainer2/Label.text += "\nLogging out!" await get_tree().create_timer(0.5).timeout get_tree().quit() From e2502866ef79fd5023bde6a3b8c139629b8532cb Mon Sep 17 00:00:00 2001 From: Booklordofthedings Date: Sat, 17 Aug 2024 13:20:46 +0200 Subject: [PATCH 5/7] stuff --- .../textures/level01-spritesheet.png.import | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gmtk_2024/textures/level01-spritesheet.png.import diff --git a/gmtk_2024/textures/level01-spritesheet.png.import b/gmtk_2024/textures/level01-spritesheet.png.import new file mode 100644 index 0000000..2f5f288 --- /dev/null +++ b/gmtk_2024/textures/level01-spritesheet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c3m4os8kteaix" +path="res://.godot/imported/level01-spritesheet.png-1916fd85baf9b82e97ba6ec03a3146d9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/level01-spritesheet.png" +dest_files=["res://.godot/imported/level01-spritesheet.png-1916fd85baf9b82e97ba6ec03a3146d9.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 From b27563059877a29e678a68d6a7b831095a07f327 Mon Sep 17 00:00:00 2001 From: Fabio Date: Sat, 17 Aug 2024 14:15:26 +0200 Subject: [PATCH 6/7] import file-icons --- gmtk_2024/textures/File-Icon-Closed.png | Bin 0 -> 565 bytes gmtk_2024/textures/File-Icon.png | Bin 0 -> 467 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 gmtk_2024/textures/File-Icon-Closed.png create mode 100644 gmtk_2024/textures/File-Icon.png diff --git a/gmtk_2024/textures/File-Icon-Closed.png b/gmtk_2024/textures/File-Icon-Closed.png new file mode 100644 index 0000000000000000000000000000000000000000..04f422792a7f30d7dd58036164c3d6bf0108652d GIT binary patch literal 565 zcmV-50?Pe~P)Px$)k#D_R9J=Wmc38HKp4g!5lt|NVPIj=F!(`Yq7IrECrq5(Ive7|F5xdAx)LU1 zOx(ITIT&SP!2w7dKqg#pU?9rJCD2j_(%5V7;0`bj@{I5MUY}o|UfTm^`tO=!6}LB5 z414YM?UOk>soeHLIOH~NE)N`o(Rj}I4G8Lj;gH)%CH&06<-jhY@!Z%(Ja|U}JT>bD zSd-a5eWdy?_a{Tw^AZ$Jz^dc(I!0QVjkp?oVfe;pA;MKY#2dX5B4 zbG=n$0+{0UdG(B{Afl-7`T_txe&DF7J`pmPmEJ0%Pb$c$ilav*p!M3q=KiCaGz0+0 z-f}T!Co+`<69$mEFmG0G6`|SQ0;vR8YGi|GWP@X`p9sJ-mW_RC0MpQ)0|@^OS(+qz zQ&a*SVjy2)f8(d2e5r>Hp$}Wak3eRpvu1fWMgfqnfpS&j4vRnxGcQ*)kS?8o&OIg^{MiWHrCK{la@q=O0L>31LlPx$b4f%&R9J=WmOoFzKp4g!v6|E%#-WRghQU814!W@OB{~~Mb_t(=;A$9&bH4;T z3y?T~Ot|R4q!cdczjGjsz202{^=M4!Gv52=eSUp%*StWcUDuxI@b>D2#?M~gzJ$Gh zl@>oJ6*byvmAS@hy+^kJ!3-=FHTv8*6*e9lcc|8TiH&6NTmmx9X9I|mSy!?I*9Hh7 zlB&}x3n6leCvK=P!T1FiCeUbWKtR;F=X5k{9_F(Fe0RZ=7=V1iK%)(GEfWEmDD=NX z#kA0@d0dT4AT;;wp)!DQZpE~aFBkwmf8m&}fNaIww}%MG1YOJIYD@y2yHIW(g#f_a zt<+wDOsN9+_7Gm|73@|58NmMsSQ3i<$laP*f8=6G*kvoV1Y{q^01$^_JoS{P5Y8J< zJrIXYfZI^c&-Ur#Ljl(ptH1R9&4DuWr literal 0 HcmV?d00001 From 6831dd3a3f9ad64eaa7f031c2c94b779da35748d Mon Sep 17 00:00:00 2001 From: Fabio Date: Sat, 17 Aug 2024 18:06:43 +0200 Subject: [PATCH 7/7] implement level menu --- gmtk_2024/canvas_layer.tscn | 21 +++++ gmtk_2024/levels/TestingField.tscn | 4 +- gmtk_2024/menu/level_menu/level_button.tscn | 37 +++++++++ gmtk_2024/menu/level_menu/level_select.tscn | 86 ++++++++++++++++++++ gmtk_2024/project.godot | 3 +- gmtk_2024/scripts/level_menu_level_button.gd | 24 ++++++ gmtk_2024/scripts/level_select.gd | 13 +++ gmtk_2024/scripts/menu_main_control.gd | 2 +- 8 files changed, 185 insertions(+), 5 deletions(-) create mode 100644 gmtk_2024/canvas_layer.tscn create mode 100644 gmtk_2024/menu/level_menu/level_button.tscn create mode 100644 gmtk_2024/menu/level_menu/level_select.tscn create mode 100644 gmtk_2024/scripts/level_menu_level_button.gd create mode 100644 gmtk_2024/scripts/level_select.gd diff --git a/gmtk_2024/canvas_layer.tscn b/gmtk_2024/canvas_layer.tscn new file mode 100644 index 0000000..9f54ec3 --- /dev/null +++ b/gmtk_2024/canvas_layer.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=3 format=3 uid="uid://7rnltps0ssra"] + +[ext_resource type="Shader" path="res://shaders/crt.gdshader" id="2_wxq0n"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_c8ly2"] +shader = ExtResource("2_wxq0n") +shader_parameter/crt_curve = 0.02 +shader_parameter/crt_scan_line_color = 0.347 +shader_parameter/aperture_grille_rate = 0.4 +shader_parameter/rf_switch_esque_blur = 1.0 +shader_parameter/white_noise_rate = 0.0 + +[node name="CanvasLayer" type="CanvasLayer"] + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_c8ly2") +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 diff --git a/gmtk_2024/levels/TestingField.tscn b/gmtk_2024/levels/TestingField.tscn index f85545c..bbd2cc2 100644 --- a/gmtk_2024/levels/TestingField.tscn +++ b/gmtk_2024/levels/TestingField.tscn @@ -1,6 +1,6 @@ -[gd_scene load_steps=7 format=4 uid="uid://ctc0arg3efa5k"] +[gd_scene load_steps=7 format=4 uid="uid://cvjuhe3a7mskm"] -[ext_resource type="PackedScene" uid="uid://ba6afuig8bqrg" path="res://levels/LevelBase.tscn" id="1_ad6qp"] +[ext_resource type="PackedScene" path="res://levels/LevelBase.tscn" id="1_ad6qp"] [ext_resource type="Texture2D" uid="uid://dr4ayedb5xb2k" path="res://textures/file_editor.png" id="2_gwmxk"] [ext_resource type="Texture2D" uid="uid://c3m4os8kteaix" path="res://textures/level01-spritesheet.png" id="3_3ou1v"] [ext_resource type="PackedScene" uid="uid://vtwswrkfkgas" path="res://objects/EnemyMover.tscn" id="4_3fnma"] diff --git a/gmtk_2024/menu/level_menu/level_button.tscn b/gmtk_2024/menu/level_menu/level_button.tscn new file mode 100644 index 0000000..177f0b6 --- /dev/null +++ b/gmtk_2024/menu/level_menu/level_button.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=5 format=3 uid="uid://t83eid7pf4iv"] + +[ext_resource type="Texture2D" uid="uid://yg2u8vwwbpv1" path="res://textures/File-Icon.png" id="1_2sfn6"] +[ext_resource type="Texture2D" uid="uid://bc2ictes4mln1" path="res://textures/File-Icon-Closed.png" id="2_6ev1f"] +[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="3_732s0"] +[ext_resource type="Script" path="res://scripts/level_menu_level_button.gd" id="3_t0h1w"] + +[node name="LevelButton" type="TextureButton"] +custom_minimum_size = Vector2(50, 50) +offset_right = 40.0 +offset_bottom = 40.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +disabled = true +texture_normal = ExtResource("1_2sfn6") +texture_disabled = ExtResource("2_6ev1f") +ignore_texture_size = true +stretch_mode = 5 +script = ExtResource("3_t0h1w") + +[node name="Label" type="Label" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_colors/font_outline_color = Color(0, 0, 0, 1) +theme_override_constants/outline_size = 3 +theme_override_fonts/font = ExtResource("3_732s0") +theme_override_font_sizes/font_size = 35 +text = "1" +horizontal_alignment = 1 +vertical_alignment = 1 + +[connection signal="pressed" from="." to="." method="_on_pressed"] diff --git a/gmtk_2024/menu/level_menu/level_select.tscn b/gmtk_2024/menu/level_menu/level_select.tscn new file mode 100644 index 0000000..418c50b --- /dev/null +++ b/gmtk_2024/menu/level_menu/level_select.tscn @@ -0,0 +1,86 @@ +[gd_scene load_steps=5 format=3 uid="uid://bvvxwhg4tihng"] + +[ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_3v0vu"] +[ext_resource type="Texture2D" uid="uid://dr4ayedb5xb2k" path="res://textures/file_editor.png" id="1_44xee"] +[ext_resource type="Script" path="res://scripts/level_select.gd" id="2_nurro"] +[ext_resource type="PackedScene" uid="uid://t83eid7pf4iv" path="res://menu/level_menu/level_button.tscn" id="4_0d7hu"] + +[node name="LevelSelect" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("1_3v0vu") +script = ExtResource("2_nurro") + +[node name="Background" type="TextureRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("1_44xee") +expand_mode = 1 + +[node name="Label" type="Label" parent="Background"] +layout_mode = 0 +offset_left = 30.0 +offset_top = -8.0 +offset_right = 272.0 +offset_bottom = 42.0 +theme_override_font_sizes/font_size = 45 +text = "level select" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="QuitButton" type="Button" parent="Background"] +layout_mode = 0 +offset_left = 1232.0 +offset_top = 2.0 +offset_right = 1270.0 +offset_bottom = 40.0 +flat = true + +[node name="ClipControl" type="Control" parent="Background"] +layout_mode = 1 +anchor_left = 0.005 +anchor_top = 0.11 +anchor_right = 0.956 +anchor_bottom = 0.924 +offset_left = 0.599999 +offset_top = -0.200005 +offset_right = 0.319946 +offset_bottom = -0.280029 + +[node name="GridContainer" type="GridContainer" parent="Background/ClipControl"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +columns = 3 + +[node name="LevelButton" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")] +layout_mode = 2 + +[node name="LevelButton2" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")] +layout_mode = 2 + +[node name="LevelButton3" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")] +layout_mode = 2 + +[node name="LevelButton4" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")] +layout_mode = 2 +level_num = 2 + +[node name="LevelButton5" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")] +layout_mode = 2 + +[node name="LevelButton6" parent="Background/ClipControl/GridContainer" instance=ExtResource("4_0d7hu")] +layout_mode = 2 + +[connection signal="pressed" from="Background/QuitButton" to="." method="_on_quit_button_pressed"] diff --git a/gmtk_2024/project.godot b/gmtk_2024/project.godot index 6e94ed2..e49bb36 100644 --- a/gmtk_2024/project.godot +++ b/gmtk_2024/project.godot @@ -13,7 +13,7 @@ config_version=5 config/name="GMTK_2024" run/main_scene="res://menu/main_menu/MainMenu.tscn" config/features=PackedStringArray("4.3", "GL Compatibility") -config/icon="res://temp_assets/icon.svg" +config/icon="res://icon.svg" [display] @@ -50,5 +50,4 @@ click={ textures/canvas_textures/default_texture_filter=0 renderer/rendering_method="gl_compatibility" renderer/rendering_method.mobile="gl_compatibility" -environment/defaults/default_clear_color=Color(0.785573, 0.700355, 0.83902, 1) 2d/snap/snap_2d_transforms_to_pixel=true diff --git a/gmtk_2024/scripts/level_menu_level_button.gd b/gmtk_2024/scripts/level_menu_level_button.gd new file mode 100644 index 0000000..8144dfe --- /dev/null +++ b/gmtk_2024/scripts/level_menu_level_button.gd @@ -0,0 +1,24 @@ +@tool +extends TextureButton + +signal level_selected + +@export var level_num: int = 1 +@export var locked: bool = true: + set(value): + locked = value + level_locked() if locked else level_unlocked() + +func level_locked() -> void: + level_state(true) + +func level_unlocked() -> void: + level_state(false) + +func level_state(value: bool) -> void: + disabled = value + $Label.visible = not value + + +func _on_pressed(): + level_selected.emit(level_num) diff --git a/gmtk_2024/scripts/level_select.gd b/gmtk_2024/scripts/level_select.gd new file mode 100644 index 0000000..db4ad08 --- /dev/null +++ b/gmtk_2024/scripts/level_select.gd @@ -0,0 +1,13 @@ +extends Control + +func _ready(): + setup_level_box() + +func setup_level_box(): + for box in $Background/ClipControl/GridContainer.get_children(): + box.level_num = box.get_index() + 1 + box.locked = false + + +func _on_quit_button_pressed(): + get_tree().change_scene_to_file("res://menu/main_menu/MainMenu.tscn") diff --git a/gmtk_2024/scripts/menu_main_control.gd b/gmtk_2024/scripts/menu_main_control.gd index 869b1d9..e445554 100644 --- a/gmtk_2024/scripts/menu_main_control.gd +++ b/gmtk_2024/scripts/menu_main_control.gd @@ -57,7 +57,7 @@ func _show_menu_options() -> void: func _on_start_button_pressed() -> void: - print("Start Button Clicked") + get_tree().change_scene_to_file("res://menu/level_menu/level_select.tscn") func _on_credits_button_pressed() -> void: get_tree().change_scene_to_file("res://menu/main_menu/CreditsScene.tscn")