From cd0e7fcc542515a32d6e69d879e060549e6f1f4e Mon Sep 17 00:00:00 2001 From: Clevertop Date: Wed, 14 Aug 2024 02:14:09 +1000 Subject: [PATCH] changed renderer --- Levels/StartingRoom.tscn | 24 ++++++++++++++++++++- README.md | 11 +++++----- Scripts/ChronoManager.gd | 2 ++ Scripts/menu.gd | 7 ++++++ game_manager.tscn | 19 +++++++++++++++-- kill_block.tscn | 8 +++---- menu.tscn | 46 +++++++++++++++++++++------------------- project.godot | 2 ++ 8 files changed, 84 insertions(+), 35 deletions(-) diff --git a/Levels/StartingRoom.tscn b/Levels/StartingRoom.tscn index 25a9721..9f51051 100644 --- a/Levels/StartingRoom.tscn +++ b/Levels/StartingRoom.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=21 format=3 uid="uid://bojbawyoy11i4"] +[gd_scene load_steps=23 format=3 uid="uid://bojbawyoy11i4"] [ext_resource type="Script" path="res://Scripts/ChronoManager.gd" id="1_5b2rd"] [ext_resource type="Material" uid="uid://cr4ra7ijk1uec" path="res://Assets/Materials/floor.tres" id="2_0aj3l"] @@ -12,6 +12,7 @@ [ext_resource type="Texture2D" uid="uid://cxljjpwweuds0" path="res://Commands/phase_shift_new.png" id="11_82hoi"] [ext_resource type="Texture2D" uid="uid://dx8s88cut5kka" path="res://Commands/haste_new.png" id="12_3c4u7"] [ext_resource type="AudioStream" uid="uid://jm6vo1vxrlyx" path="res://Assets/62986__radian__chime-0011.wav" id="12_bm4h4"] +[ext_resource type="PackedScene" uid="uid://cy5g1lkvw2fxs" path="res://sign.tscn" id="14_m7cxt"] [ext_resource type="Texture2D" uid="uid://dc23iehev1s8w" path="res://Assets/Textures/crystal_wall_2.png" id="15_t0vv6"] [sub_resource type="Environment" id="Environment_u27ip"] @@ -40,6 +41,13 @@ top_radius = 0.3 bottom_radius = 0.3 height = 0.2 +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_646ym"] +albedo_color = Color(0.32203, 0.623698, 0, 1) +albedo_texture = ExtResource("15_t0vv6") +uv1_offset = Vector3(0.5, 0.5, 0.5) +uv1_triplanar = true +texture_filter = 0 + [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4ui8w"] albedo_texture = ExtResource("15_t0vv6") uv1_offset = Vector3(0.5, 0, 0.5) @@ -192,6 +200,16 @@ shape = SubResource("ConcavePolygonShape3D_jchw8") material_override = SubResource("StandardMaterial3D_cqb2w") mesh = SubResource("CylinderMesh_vrcmc") +[node name="MenuButton" type="Area3D" parent="."] +transform = Transform3D(4.37114e-08, 1, 8.74228e-08, 1, -4.37114e-08, 0, 3.82138e-15, 8.74228e-08, -1, 5, 2.5, -1.5) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MenuButton"] +shape = SubResource("ConcavePolygonShape3D_jchw8") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="MenuButton"] +material_override = SubResource("StandardMaterial3D_646ym") +mesh = SubResource("CylinderMesh_vrcmc") + [node name="DoorLeft" type="StaticBody3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 2, -5.5) @@ -214,6 +232,10 @@ skeleton = NodePath("../..") [node name="CollisionShape3D" type="CollisionShape3D" parent="DoorRight"] shape = SubResource("BoxShape3D_jvb5m") +[node name="Sign" parent="." instance=ExtResource("14_m7cxt")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 1.5, -1.5) +sign_text = "Back to Menu" + [connection signal="broadcast" from="." to="Player" method="_on_chrono_manager_broadcast"] [connection signal="tick" from="." to="Player" method="_on_chrono_manager_tick"] [connection signal="object_clicked" from="Player" to="." method="_on_player_object_clicked"] diff --git a/README.md b/README.md index 1eccc07..13964fd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Puzzle game made by Tom for the Playmakers August Jam 2024 - [x] FPS Controller - [x] Chrono terminal - [x] commands -- [ ] level deign +- [x] level deign - aiming for at least 5 levels, ideally about 10 - [x] level funciton - [x] Losing the game @@ -21,10 +21,10 @@ Puzzle game made by Tom for the Playmakers August Jam 2024 - [x] Menu - [x] Level select - [x] Credits page - - [ ] level data - - [ ] quit button + - [x] level data + - [x] quit button - [ ] itch.io page -- [ ] kill blocks - resets level if player touches them +- [x] kill blocks - resets level if player touches them - [x] door, starting level button - [ ] Sounds - [ ] Press button @@ -33,7 +33,6 @@ Puzzle game made by Tom for the Playmakers August Jam 2024 - [x] tick chime - [ ] take/place/drop block - [ ] per command sounds? -- [ ] enum dropdown for the command blocks @@ -41,7 +40,7 @@ Puzzle game made by Tom for the Playmakers August Jam 2024 - [x] Jump - go up! works in the air too - [x] Dash - Move in direction you are facing for 0.3s (horizontal only, maybe normalise/magnitude) - [x] Phase - collider turns off for 1 second (should i make this longer or a toggle perhaps?) -- [ ] Toggle gravity - could also be low gravity? +- [-] Toggle gravity - could also be low gravity? - 2-3 more commands would add more content/puzzle potencial ## BUGS diff --git a/Scripts/ChronoManager.gd b/Scripts/ChronoManager.gd index 25e1cb3..6fc664b 100644 --- a/Scripts/ChronoManager.gd +++ b/Scripts/ChronoManager.gd @@ -174,6 +174,8 @@ func open_termimal(): func _on_player_object_clicked(object): if(object.name == "StartButton"): start_room() + if(object.name == "MenuButton"): + get_tree().change_scene_to_file(GameManager.menu_scene_path) func _player_area_entered(area : Area3D): #print(area.name) diff --git a/Scripts/menu.gd b/Scripts/menu.gd index 15b74ea..291f48b 100644 --- a/Scripts/menu.gd +++ b/Scripts/menu.gd @@ -6,9 +6,12 @@ var credits_shown : bool = false @export var credits_node : Control @export var credits_button : Button @export var levels_vbox : VBoxContainer +@export var exit_button : Button # Called when the node enters the scene tree for the first time. func _ready(): + if OS.get_name() == "Web": + exit_button.hide() Input.mouse_mode = Input.MOUSE_MODE_VISIBLE for level_num in GameManager.levels.size(): var new_button : Button = Button.new() @@ -43,3 +46,7 @@ func _on_credits_button_pressed(): func _on_credits_page_meta_clicked(meta): OS.shell_open(str(meta)) + + +func _on_exit_button_pressed(): + get_tree().quit() diff --git a/game_manager.tscn b/game_manager.tscn index bfe95aa..7face0d 100644 --- a/game_manager.tscn +++ b/game_manager.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://d387n4cp3duhn"] +[gd_scene load_steps=12 format=3 uid="uid://d387n4cp3duhn"] [ext_resource type="Script" path="res://game_manager.gd" id="1_rsuf4"] [ext_resource type="Script" path="res://Scripts/level_res.gd" id="2_w2hey"] @@ -33,8 +33,23 @@ script = ExtResource("2_w2hey") level_path = "res://Levels/Level 6.tscn" level_name = ":/" +[sub_resource type="Resource" id="Resource_jr8pj"] +script = ExtResource("2_w2hey") +level_path = "res://Levels/Level 7.tscn" +level_name = "Labrinth" + +[sub_resource type="Resource" id="Resource_oteey"] +script = ExtResource("2_w2hey") +level_path = "res://Levels/Level 8.tscn" +level_name = "Fall" + +[sub_resource type="Resource" id="Resource_td0vm"] +script = ExtResource("2_w2hey") +level_path = "res://Levels/Level 9.tscn" +level_name = "The Last Challenge" + [node name="GameManager" type="Node"] script = ExtResource("1_rsuf4") -levels = Array[ExtResource("2_w2hey")]([SubResource("Resource_vs5fw"), SubResource("Resource_yde0b"), SubResource("Resource_5anvy"), SubResource("Resource_ksvl5"), SubResource("Resource_clwum"), SubResource("Resource_fdajg")]) +levels = Array[ExtResource("2_w2hey")]([SubResource("Resource_vs5fw"), SubResource("Resource_yde0b"), SubResource("Resource_5anvy"), SubResource("Resource_ksvl5"), SubResource("Resource_clwum"), SubResource("Resource_fdajg"), SubResource("Resource_jr8pj"), SubResource("Resource_oteey"), SubResource("Resource_td0vm")]) menu_scene_path = "res://menu.tscn" sandbox_scene_path = "res://Levels/StartingRoom.tscn" diff --git a/kill_block.tscn b/kill_block.tscn index b647307..7887e44 100644 --- a/kill_block.tscn +++ b/kill_block.tscn @@ -3,10 +3,10 @@ [ext_resource type="Material" uid="uid://br3erknm4b1i0" path="res://Assets/Materials/kill.tres" id="1_2ed3b"] [ext_resource type="Script" path="res://Scripts/kill_block.gd" id="1_pvkd4"] -[sub_resource type="BoxMesh" id="BoxMesh_j8om8"] +[sub_resource type="BoxMesh" id="BoxMesh_x546n"] material = ExtResource("1_2ed3b") -[sub_resource type="BoxShape3D" id="BoxShape3D_j8noh"] +[sub_resource type="BoxShape3D" id="BoxShape3D_m47l7"] [node name="KillBlock" type="Area3D" node_paths=PackedStringArray("mesh", "collider")] script = ExtResource("1_pvkd4") @@ -14,7 +14,7 @@ mesh = NodePath("MeshInstance3D") collider = NodePath("CollisionShape3D") [node name="MeshInstance3D" type="MeshInstance3D" parent="."] -mesh = SubResource("BoxMesh_j8om8") +mesh = SubResource("BoxMesh_x546n") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] -shape = SubResource("BoxShape3D_j8noh") +shape = SubResource("BoxShape3D_m47l7") diff --git a/menu.tscn b/menu.tscn index 8209866..2ef5745 100644 --- a/menu.tscn +++ b/menu.tscn @@ -8,7 +8,7 @@ font_color = Color(0.631665, 0.267098, 1, 1) outline_size = 15 outline_color = Color(1, 0.446282, 0.988369, 1) -[node name="Menu" type="Control" node_paths=PackedStringArray("level_node", "credits_node", "credits_button", "levels_vbox")] +[node name="Menu" type="Control" node_paths=PackedStringArray("level_node", "credits_node", "credits_button", "levels_vbox", "exit_button")] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -20,6 +20,7 @@ level_node = NodePath("MarginContainer/VBoxContainer/PanelContainer/ScrollContai credits_node = NodePath("MarginContainer/VBoxContainer/PanelContainer/ScrollContainer/MarginContainer/CreditsPage") credits_button = NodePath("MarginContainer/VBoxContainer/HBoxContainer/CreditsButton") levels_vbox = NodePath("MarginContainer/VBoxContainer/PanelContainer/ScrollContainer/VBoxContainer") +exit_button = NodePath("MarginContainer/VBoxContainer/HBoxContainer/ExitButton") [node name="MarginContainer" type="MarginContainer" parent="."] layout_mode = 1 @@ -55,6 +56,27 @@ size_flags_vertical = 3 layout_mode = 2 size_flags_vertical = 3 +[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/PanelContainer/ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 10 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_bottom = 10 + +[node name="CreditsPage" type="RichTextLabel" parent="MarginContainer/VBoxContainer/PanelContainer/ScrollContainer/MarginContainer"] +visible = false +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +bbcode_enabled = true +text = "Programming and Game Design: [url=https://clevertop.dev]Tom Howarth[/url] +Created for the [url=https://itch.io/jam/playmakers-august-game-jam]August 2024 Game Jam[/url] hosted by Playmakers! - Themes: 3D, Puzzle + +Textures: [url=https://opengameart.org/content/dungeon-crawl-32x32-tiles]Dungeon Crawl Stone Soup[/url] +Command Chime Sounds: [url=https://freesound.org/people/radian/sounds/62986/]Chime 0011.wav by radian[/url]" + [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/PanelContainer/ScrollContainer"] layout_mode = 2 size_flags_horizontal = 3 @@ -79,27 +101,6 @@ visible = false layout_mode = 2 text = "Level 1 - Name" -[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/VBoxContainer/PanelContainer/ScrollContainer"] -visible = false -layout_mode = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 -theme_override_constants/margin_left = 10 -theme_override_constants/margin_top = 10 -theme_override_constants/margin_right = 10 -theme_override_constants/margin_bottom = 10 - -[node name="CreditsPage" type="RichTextLabel" parent="MarginContainer/VBoxContainer/PanelContainer/ScrollContainer/MarginContainer"] -layout_mode = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 -bbcode_enabled = true -text = "Programming and Game Design: [url=https://clevertop.dev]Tom Howarth[/url] -Created for the [url=https://itch.io/jam/playmakers-august-game-jam]August 2024 Game Jam[/url] hosted by Playmakers! - Themes: 3D, Puzzle - -Textures: [url=https://opengameart.org/content/dungeon-crawl-32x32-tiles]Dungeon Crawl Stone Soup[/url] -Command Chime Sounds: [url=https://freesound.org/people/radian/sounds/62986/]Chime 0011.wav by radian[/url]" - [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] layout_mode = 2 @@ -115,3 +116,4 @@ text = "Exit Game" [connection signal="meta_clicked" from="MarginContainer/VBoxContainer/PanelContainer/ScrollContainer/MarginContainer/CreditsPage" to="." method="_on_credits_page_meta_clicked"] [connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/CreditsButton" to="." method="_on_credits_button_pressed"] +[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/ExitButton" to="." method="_on_exit_button_pressed"] diff --git a/project.godot b/project.godot index 2c64588..7118881 100644 --- a/project.godot +++ b/project.godot @@ -81,3 +81,5 @@ reset={ [rendering] textures/canvas_textures/default_texture_filter=0 +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility"