aboutsummaryrefslogtreecommitdiffstats
path: root/Nodes
diff options
context:
space:
mode:
authorLibravatar perivesta <>2023-07-08 15:53:37 +0200
committerLibravatar perivesta <>2023-07-08 15:53:37 +0200
commit9573d3ae4170f43f7f65224a16db7ad161a11e28 (patch)
treeaca31f8254e6e2876ade6472febf8ad003bfea18 /Nodes
parentbf17c8a97b77cdb783a2751e7ee4a90843a00f06 (diff)
download2023-9573d3ae4170f43f7f65224a16db7ad161a11e28.tar.gz
2023-9573d3ae4170f43f7f65224a16db7ad161a11e28.tar.bz2
2023-9573d3ae4170f43f7f65224a16db7ad161a11e28.zip
add main menu, pause menu, basic level
Diffstat (limited to 'Nodes')
-rw-r--r--Nodes/Level_test.tscn31
-rw-r--r--Nodes/drawing_and_driving.tscn2
-rw-r--r--Nodes/game.tscn76
-rw-r--r--Nodes/main_menu.tscn197
4 files changed, 302 insertions, 4 deletions
diff --git a/Nodes/Level_test.tscn b/Nodes/Level_test.tscn
index 4fa88fe..1928496 100644
--- a/Nodes/Level_test.tscn
+++ b/Nodes/Level_test.tscn
@@ -1,11 +1,16 @@
-[gd_scene load_steps=5 format=3 uid="uid://ct2kxw1rrjryo"]
+[gd_scene load_steps=8 format=3 uid="uid://ct2kxw1rrjryo"]
+[ext_resource type="Script" path="res://Scripts/scene_control.gd" id="1_0esj3"]
[ext_resource type="Texture2D" uid="uid://5xqahgawme4m" path="res://Assets/start.png" id="1_wenkl"]
[ext_resource type="Texture2D" uid="uid://b8vhe5kt6037n" path="res://Assets/end.png" id="2_gp6ng"]
[ext_resource type="Texture2D" uid="uid://dg3v488vx0oj6" path="res://Assets/checkpoint.png" id="3_cgigr"]
-[ext_resource type="PackedScene" uid="uid://cfolt02ucvo3d" path="res://Nodes/drawing.tscn" id="4_t4rjk"]
+[ext_resource type="PackedScene" uid="uid://c1mvbh2fwqtkb" path="res://Nodes/car.tscn" id="4_xvobs"]
+[ext_resource type="Script" path="res://Scripts/drawing.gd" id="5_x7h3g"]
+
+[sub_resource type="Curve2D" id="Curve2D_0exre"]
[node name="Level_test" type="Node2D"]
+script = ExtResource("1_0esj3")
[node name="Start" type="Sprite2D" parent="."]
position = Vector2(669, 515)
@@ -27,4 +32,24 @@ texture = ExtResource("3_cgigr")
position = Vector2(404, 145)
texture = ExtResource("3_cgigr")
-[node name="Drawing" parent="." instance=ExtResource("4_t4rjk")]
+[node name="Car" parent="." instance=ExtResource("4_xvobs")]
+max_speed = 500
+acceleration = 0.05
+
+[node name="DrawNode" type="Node2D" parent="."]
+script = ExtResource("5_x7h3g")
+
+[node name="TrackLine" type="Line2D" parent="DrawNode"]
+
+[node name="TrackPath" type="Path2D" parent="DrawNode"]
+curve = SubResource("Curve2D_0exre")
+
+[node name="TrackFollower" type="PathFollow2D" parent="DrawNode/TrackPath"]
+
+[node name="Sprite2D" type="Sprite2D" parent="DrawNode/TrackPath/TrackFollower"]
+scale = Vector2(0.604, 0.604)
+texture = ExtResource("3_cgigr")
+
+[node name="31005" type="Timer" parent="DrawNode/TrackPath/TrackFollower"]
+wait_time = 0.2
+one_shot = true
diff --git a/Nodes/drawing_and_driving.tscn b/Nodes/drawing_and_driving.tscn
index 865fd4e..01f0787 100644
--- a/Nodes/drawing_and_driving.tscn
+++ b/Nodes/drawing_and_driving.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=6 format=3 uid="uid://cb06k14t2slax"]
+[gd_scene load_steps=6 format=3 uid="uid://bj5wruvb2hg20"]
[ext_resource type="Script" path="res://Scripts/scene_control.gd" id="1_6bj13"]
[ext_resource type="PackedScene" uid="uid://c1mvbh2fwqtkb" path="res://Nodes/car.tscn" id="1_ktvsb"]
diff --git a/Nodes/game.tscn b/Nodes/game.tscn
new file mode 100644
index 0000000..5553ea5
--- /dev/null
+++ b/Nodes/game.tscn
@@ -0,0 +1,76 @@
+[gd_scene load_steps=3 format=3 uid="uid://b7wp8w46l64vc"]
+
+[ext_resource type="Script" path="res://Scripts/game.gd" id="1_1dait"]
+
+[sub_resource type="AudioStream" id="AudioStream_n3sou"]
+
+[node name="Game" type="Node2D"]
+script = ExtResource("1_1dait")
+
+[node name="JinglePlayer" type="AudioStreamPlayer2D" parent="."]
+stream = SubResource("AudioStream_n3sou")
+volume_db = 1.0
+
+[node name="Evaluation" type="Control" parent="."]
+visible = false
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+
+[node name="EvaluationLabel" type="Label" parent="Evaluation"]
+layout_mode = 0
+anchor_left = 0.3
+anchor_top = 0.4
+anchor_right = 0.7
+anchor_bottom = 0.5
+text = "Finished
+"
+
+[node name="PausePopup" type="Control" parent="."]
+process_mode = 2
+visible = false
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+
+[node name="Panel" type="Panel" parent="PausePopup"]
+layout_mode = 0
+anchor_right = 1.0
+anchor_bottom = 1.0
+
+[node name="Label" type="Label" parent="PausePopup/Panel"]
+layout_mode = 0
+anchor_right = 1.0
+anchor_bottom = 0.3
+text = "Game is Paused"
+
+[node name="VBoxContainer" type="VBoxContainer" parent="PausePopup/Panel"]
+layout_mode = 0
+anchor_top = 0.3
+anchor_right = 1.0
+anchor_bottom = 1.0
+alignment = 1
+
+[node name="ResumeButton" type="Button" parent="PausePopup/Panel/VBoxContainer"]
+layout_mode = 2
+text = "Resume"
+
+[node name="MainMenuButton" type="Button" parent="PausePopup/Panel/VBoxContainer"]
+layout_mode = 2
+text = "Main Menu"
+
+[node name="QuitButton" type="Button" parent="PausePopup/Panel/VBoxContainer"]
+layout_mode = 2
+text = "Quit"
+
+[node name="LoadedLevel" type="Node2D" parent="."]
+
+[connection signal="pressed" from="PausePopup/Panel/VBoxContainer/ResumeButton" to="." method="_on_ResumeButton_pressed"]
+[connection signal="pressed" from="PausePopup/Panel/VBoxContainer/MainMenuButton" to="." method="_on_MainMenuButton_pressed"]
+[connection signal="pressed" from="PausePopup/Panel/VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"]
diff --git a/Nodes/main_menu.tscn b/Nodes/main_menu.tscn
new file mode 100644
index 0000000..96928fb
--- /dev/null
+++ b/Nodes/main_menu.tscn
@@ -0,0 +1,197 @@
+[gd_scene load_steps=16 format=3 uid="uid://cqskj7j8bqmd5"]
+
+[ext_resource type="Script" path="res://Scripts/main_menu.gd" id="2"]
+[ext_resource type="FontFile" uid="uid://b2n2cbthkca0k" path="res://Assets/fonts/format.otf" id="7"]
+
+[sub_resource type="FontFile" id="1"]
+fallbacks = Array[Font]([ExtResource("7")])
+face_index = null
+embolden = null
+transform = null
+cache/0/16/0/ascent = 0.0
+cache/0/16/0/descent = 0.0
+cache/0/16/0/underline_position = 0.0
+cache/0/16/0/underline_thickness = 0.0
+cache/0/16/0/scale = 1.0
+cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
+
+[sub_resource type="StyleBoxFlat" id="2"]
+content_margin_top = 10.0
+content_margin_bottom = 10.0
+bg_color = Color(0.4, 0.337255, 0.313726, 0.32549)
+
+[sub_resource type="StyleBoxFlat" id="3"]
+content_margin_top = 10.0
+content_margin_bottom = 10.0
+bg_color = Color(0.176471, 0.14902, 0.141176, 1)
+
+[sub_resource type="StyleBoxFlat" id="4"]
+content_margin_top = 10.0
+content_margin_bottom = 10.0
+bg_color = Color(0.4, 0.337255, 0.313726, 1)
+
+[sub_resource type="StyleBoxFlat" id="5"]
+content_margin_top = 20.0
+content_margin_bottom = 20.0
+bg_color = Color(0.290196, 0.247059, 0.231373, 1)
+
+[sub_resource type="StyleBoxFlat" id="6"]
+content_margin_top = 10.0
+content_margin_bottom = 10.0
+bg_color = Color(0.176471, 0.14902, 0.141176, 1)
+
+[sub_resource type="FontFile" id="11"]
+fallbacks = Array[Font]([ExtResource("7")])
+face_index = null
+embolden = null
+transform = null
+cache/0/16/0/ascent = 0.0
+cache/0/16/0/descent = 0.0
+cache/0/16/0/underline_position = 0.0
+cache/0/16/0/underline_thickness = 0.0
+cache/0/16/0/scale = 1.0
+cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
+
+[sub_resource type="StyleBoxFlat" id="7"]
+bg_color = Color(0.160784, 0.133333, 0.133333, 1)
+
+[sub_resource type="Theme" id="12"]
+Button/fonts/font = SubResource("1")
+Button/styles/disabled = SubResource("2")
+Button/styles/focus = SubResource("3")
+Button/styles/hover = SubResource("4")
+Button/styles/normal = SubResource("5")
+Button/styles/pressed = SubResource("6")
+Label/fonts/font = SubResource("11")
+Panel/styles/panel = SubResource("7")
+
+[sub_resource type="LabelSettings" id="LabelSettings_ygt8r"]
+font = ExtResource("7")
+font_size = 40
+
+[sub_resource type="FontFile" id="8"]
+subpixel_positioning = 0
+msdf_pixel_range = 14
+msdf_size = 128
+face_index = null
+embolden = null
+transform = null
+cache/0/16/0/ascent = 0.0
+cache/0/16/0/descent = 0.0
+cache/0/16/0/underline_position = 0.0
+cache/0/16/0/underline_thickness = 0.0
+cache/0/16/0/scale = 1.0
+cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
+
+[sub_resource type="FontFile" id="9"]
+fallbacks = Array[Font]([SubResource("8")])
+face_index = null
+embolden = null
+transform = null
+cache/0/16/0/ascent = 0.0
+cache/0/16/0/descent = 0.0
+cache/0/16/0/underline_position = 0.0
+cache/0/16/0/underline_thickness = 0.0
+cache/0/16/0/scale = 1.0
+cache/0/16/0/glyphs/0/advance = Vector2(0, 0)
+cache/0/16/0/glyphs/0/offset = Vector2(0, 0)
+cache/0/16/0/glyphs/0/size = Vector2(0, 0)
+cache/0/16/0/glyphs/0/uv_rect = Rect2(0, 0, 0, 0)
+cache/0/16/0/glyphs/0/texture_idx = -1
+cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0)
+
+[sub_resource type="Theme" id="10"]
+Button/fonts/font = SubResource("1")
+Button/styles/disabled = SubResource("2")
+Button/styles/focus = SubResource("3")
+Button/styles/hover = SubResource("4")
+Button/styles/normal = SubResource("5")
+Button/styles/pressed = SubResource("6")
+Label/fonts/font = SubResource("9")
+Panel/styles/panel = SubResource("7")
+
+[node name="Menu" type="Control"]
+layout_mode = 3
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+script = ExtResource("2")
+
+[node name="VBoxContainer" type="VBoxContainer" parent="."]
+layout_mode = 0
+anchor_right = 0.25
+anchor_bottom = 1.0
+alignment = 2
+
+[node name="StartButton" type="Button" parent="VBoxContainer"]
+layout_mode = 2
+text = "Start"
+
+[node name="LevelButton" type="Button" parent="VBoxContainer"]
+visible = false
+layout_mode = 2
+text = "Levels"
+
+[node name="QuitButton" type="Button" parent="VBoxContainer"]
+layout_mode = 2
+text = "Quit"
+
+[node name="Label Title" type="Label" parent="."]
+layout_mode = 0
+theme = SubResource("12")
+text = "Racing Game but Worse"
+label_settings = SubResource("LabelSettings_ygt8r")
+
+[node name="Credits" type="VBoxContainer" parent="."]
+layout_mode = 1
+anchors_preset = -1
+anchor_left = 0.862
+anchor_top = 0.784
+anchor_right = 1.0
+anchor_bottom = 1.0
+offset_left = -0.0240479
+offset_top = -0.0320129
+offset_right = -4.0
+offset_bottom = -4.0
+
+[node name="Label" type="Label" parent="Credits"]
+layout_mode = 2
+text = "CREDITS"
+
+[node name="Label2" type="Label" parent="Credits"]
+layout_mode = 2
+theme = SubResource("10")
+text = "[Celeste]
+[IceLRemius]
+[Perivesta]
+"
+
+[node name="Label Instructions" type="Label" parent="."]
+layout_mode = 1
+anchors_preset = -1
+anchor_left = 0.05
+anchor_top = 0.2
+anchor_right = 0.3
+anchor_bottom = 0.2
+offset_left = -9.6
+offset_top = -50.6
+offset_right = -9.60001
+offset_bottom = -24.6
+text = "HOW TO PLAY"
+
+[node name="VBoxContainer3" type="VBoxContainer" parent="."]
+layout_mode = 1
+anchors_preset = -1
+anchor_left = 0.05
+anchor_top = 0.25
+anchor_right = 0.3
+anchor_bottom = 0.7
+offset_left = 264.4
+offset_top = 121.0
+offset_right = 264.4
+offset_bottom = 121.0
+
+[connection signal="pressed" from="VBoxContainer/StartButton" to="." method="_on_StartButton_pressed"]
+[connection signal="pressed" from="VBoxContainer/QuitButton" to="." method="_on_QuitButton_pressed"]