Game jam submission
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://4ajccsn6o10n"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cbual4qbgv2fc" path="res://scenes/player.tscn" id="1_e2xum"]
|
||||
[ext_resource type="Script" uid="uid://bvgm53qsm13tt" path="res://scripts/couch_camera.gd" id="1_epadm"]
|
||||
[ext_resource type="PackedScene" uid="uid://x4xnc85khpl5" path="res://scenes/path_3d_rope.tscn" id="2_jetiq"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xcqlg"]
|
||||
size = Vector3(40, 2, 5)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_xcqlg"]
|
||||
size = Vector3(40, 2, 5)
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_epadm"]
|
||||
resource_local_to_scene = true
|
||||
bake_interval = 512.0
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5),
|
||||
"tilts": PackedFloat32Array(0, 0)
|
||||
}
|
||||
point_count = 2
|
||||
|
||||
[node name="3Dlevel" type="Node3D" unique_id=1570360592]
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=362192398]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" unique_id=351393792]
|
||||
shape = SubResource("BoxShape3D_xcqlg")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D" unique_id=336650218]
|
||||
mesh = SubResource("BoxMesh_xcqlg")
|
||||
|
||||
[node name="CouchCamera" type="Camera3D" parent="." unique_id=2114757393]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.9961947, 0.08715574, 0, -0.08715574, 0.9961947, 0, 9, 23)
|
||||
fov = 48.4
|
||||
size = 50.0
|
||||
script = ExtResource("1_epadm")
|
||||
min_distance = 20.0
|
||||
max_distance = 50.0
|
||||
framing_offset = Vector3(0, 5, 0)
|
||||
tether_path = NodePath("../Path3DRope")
|
||||
tension_offset = 0.075
|
||||
tension_roll = 0.008
|
||||
tension_ramp = 6.0
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=716627405]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.25881907, 0.9659258, 0, -0.9659258, 0.25881907, 0, 0, 0)
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="Player1" parent="." unique_id=68487004 instance=ExtResource("1_e2xum")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.0015082, 1, 0)
|
||||
|
||||
[node name="Player2" parent="." unique_id=432105976 instance=ExtResource("1_e2xum")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.154851, 1, 0)
|
||||
player_id = 2
|
||||
|
||||
[node name="Path3DRope" parent="." unique_id=301387047 instance=ExtResource("2_jetiq")]
|
||||
curve = SubResource("Curve3D_epadm")
|
||||
attach_start_path = NodePath("../Player1")
|
||||
attach_end_path = NodePath("../Player2")
|
||||
max_length = 4.0
|
||||
elastic_stiffness = 20.0
|
||||
haul_drag = 20.0
|
||||
reel_speed = 2.0
|
||||
number_of_segments = 16
|
||||
cable_thickness = 0.05
|
||||
fixed_start_point = false
|
||||
|
||||
[node name="SnapTimer" type="Timer" parent="Path3DRope" unique_id=1395149861]
|
||||
one_shot = true
|
||||
@@ -1,37 +1,30 @@
|
||||
extends Node
|
||||
extends Node3D
|
||||
|
||||
signal level_lost
|
||||
signal level_won(level_path : String)
|
||||
@warning_ignore("unused_signal")
|
||||
signal level_changed(level_path : String)
|
||||
|
||||
## Optional path to the next level if using an open world level system.
|
||||
@export_file("*.tscn") var next_level_path : String
|
||||
## The tether whose parting ends the run.
|
||||
@export var tether_path : NodePath = ^"Path3DRope"
|
||||
|
||||
var level_state : LevelState
|
||||
## Beat between the rope parting and the lost screen, in seconds, so the break
|
||||
## is actually seen instead of being covered by the menu on the same frame.
|
||||
@export var lose_delay := 0.5
|
||||
|
||||
func _on_lose_button_pressed() -> void:
|
||||
level_lost.emit()
|
||||
var _lost := false
|
||||
|
||||
func _on_win_button_pressed() -> void:
|
||||
level_won.emit(next_level_path)
|
||||
|
||||
func open_tutorials() -> void:
|
||||
%TutorialManager.open_tutorials()
|
||||
level_state.tutorial_read = true
|
||||
GlobalState.save()
|
||||
|
||||
func _ready() -> void:
|
||||
level_state = GameState.get_level_state(scene_file_path)
|
||||
%ColorPickerButton.color = level_state.color
|
||||
%BackgroundColor.color = level_state.color
|
||||
if not level_state.tutorial_read:
|
||||
open_tutorials()
|
||||
var tether := get_node_or_null(tether_path)
|
||||
if tether != null and tether.has_signal(&"snapped"):
|
||||
tether.snapped.connect(_on_tether_snapped)
|
||||
|
||||
func _on_color_picker_button_color_changed(color : Color) -> void:
|
||||
%BackgroundColor.color = color
|
||||
level_state.color = color
|
||||
GlobalState.save()
|
||||
|
||||
func _on_tutorial_button_pressed() -> void:
|
||||
open_tutorials()
|
||||
func _on_tether_snapped(_at_position : Vector3) -> void:
|
||||
if _lost:
|
||||
return
|
||||
_lost = true
|
||||
if lose_delay > 0.0:
|
||||
await get_tree().create_timer(lose_delay).timeout
|
||||
for player in get_tree().get_nodes_in_group(&"players"):
|
||||
if player is Player:
|
||||
(player as Player).controls_enabled = false
|
||||
level_lost.emit()
|
||||
|
||||
@@ -1 +1 @@
|
||||
uid://qi4qdfy4cte8
|
||||
uid://crn62v1g86h8
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,107 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://danrqx83o0lal"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/game_scene/levels/level.gd" id="1_rgywr"]
|
||||
[ext_resource type="Script" path="res://addons/maaacks_game_template/base/nodes/utilities/capture_focus.gd" id="2_8s04l"]
|
||||
[ext_resource type="Script" path="res://scenes/game_scene/input_display_label.gd" id="3_kjg0a"]
|
||||
[ext_resource type="Script" path="res://scenes/game_scene/tutorial_manager.gd" id="4_w8c7f"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/game_scene/tutorials/tutorial_2.tscn" id="5_i1l6d"]
|
||||
|
||||
[node name="Level2" type="Control" unique_id=2110036821]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_rgywr")
|
||||
next_level_path = "res://scenes/game_scene/levels/level_3.tscn"
|
||||
|
||||
[node name="BackgroundColor" type="ColorRect" parent="." unique_id=1479828644]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=523912810]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 32
|
||||
theme_override_constants/margin_top = 32
|
||||
theme_override_constants/margin_right = 32
|
||||
theme_override_constants/margin_bottom = 32
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=107158970]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer" unique_id=806912222]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Example Level #2"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer" unique_id=1089021380]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=1396072092]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 32
|
||||
script = ExtResource("2_8s04l")
|
||||
|
||||
[node name="LoseButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=842568930]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Lose"
|
||||
|
||||
[node name="WinButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=2033630088]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Win"
|
||||
|
||||
[node name="LoseButton2" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=866810661]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Lose"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=429267659]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TutorialButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=63948276]
|
||||
layout_mode = 2
|
||||
text = "Tutorial"
|
||||
|
||||
[node name="InputDisplayLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=919863907]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
horizontal_alignment = 1
|
||||
script = ExtResource("3_kjg0a")
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=1863562002]
|
||||
layout_mode = 2
|
||||
text = "Change Level Color: "
|
||||
|
||||
[node name="ColorPickerButton" type="ColorPickerButton" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=153143410]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Change Color"
|
||||
|
||||
[node name="TutorialManager" type="Node" parent="." unique_id=927712379]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("4_w8c7f")
|
||||
tutorial_scenes = Array[PackedScene]([ExtResource("5_i1l6d")])
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/LoseButton" to="." method="_on_lose_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/WinButton" to="." method="_on_win_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/LoseButton2" to="." method="_on_lose_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/TutorialButton" to="." method="_on_tutorial_button_pressed"]
|
||||
[connection signal="color_changed" from="MarginContainer/VBoxContainer/HBoxContainer2/ColorPickerButton" to="." method="_on_color_picker_button_color_changed"]
|
||||
@@ -1,112 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://rpyqx1valdin"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/game_scene/levels/level.gd" id="1_3s8h5"]
|
||||
[ext_resource type="Script" path="res://addons/maaacks_game_template/base/nodes/utilities/capture_focus.gd" id="2_satlj"]
|
||||
[ext_resource type="Script" path="res://scenes/game_scene/input_display_label.gd" id="3_4popk"]
|
||||
[ext_resource type="Script" path="res://scenes/game_scene/tutorial_manager.gd" id="4_mdq82"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/game_scene/tutorials/tutorial_3.tscn" id="5_32y40"]
|
||||
|
||||
[node name="Level3" type="Control" unique_id=710690354]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_3s8h5")
|
||||
|
||||
[node name="BackgroundColor" type="ColorRect" parent="." unique_id=2048289432]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1139802558]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 32
|
||||
theme_override_constants/margin_top = 32
|
||||
theme_override_constants/margin_right = 32
|
||||
theme_override_constants/margin_bottom = 32
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=24784916]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer" unique_id=1118917856]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Example Level #3"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer" unique_id=1867660130]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=1499324122]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 32
|
||||
script = ExtResource("2_satlj")
|
||||
|
||||
[node name="WinButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=500607117]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Win"
|
||||
|
||||
[node name="LoseButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=1616502597]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Lose"
|
||||
|
||||
[node name="LoseButton2" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=1282863293]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Lose"
|
||||
|
||||
[node name="LoseButton3" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer" unique_id=760845382]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Lose"
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=1147500718]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TutorialButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=90402611]
|
||||
layout_mode = 2
|
||||
text = "Tutorial"
|
||||
|
||||
[node name="InputDisplayLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=1335603973]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
horizontal_alignment = 1
|
||||
script = ExtResource("3_4popk")
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=1223774581]
|
||||
layout_mode = 2
|
||||
text = "Change Level Color: "
|
||||
|
||||
[node name="ColorPickerButton" type="ColorPickerButton" parent="MarginContainer/VBoxContainer/HBoxContainer2" unique_id=550861861]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Change Color"
|
||||
|
||||
[node name="TutorialManager" type="Node" parent="." unique_id=18876677]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("4_mdq82")
|
||||
tutorial_scenes = Array[PackedScene]([ExtResource("5_32y40")])
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/WinButton" to="." method="_on_win_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/LoseButton" to="." method="_on_lose_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/LoseButton2" to="." method="_on_lose_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/LoseButton3" to="." method="_on_lose_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/TutorialButton" to="." method="_on_tutorial_button_pressed"]
|
||||
[connection signal="color_changed" from="MarginContainer/VBoxContainer/HBoxContainer2/ColorPickerButton" to="." method="_on_color_picker_button_color_changed"]
|
||||
+10
-3
@@ -1,10 +1,12 @@
|
||||
[gd_scene format=3 uid="uid://cbual4qbgv2fc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bg6mw4gfk50jv" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||
[ext_resource type="PackedScene" uid="uid://n4ewjryy001b" path="res://assets/chara_red.fbx" id="2_g2els"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_xcqlg"]
|
||||
height = 1.6
|
||||
|
||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_xcqlg"]
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_top"]
|
||||
|
||||
[node name="Player" type="CharacterBody3D" unique_id=432105976]
|
||||
collision_layer = 2
|
||||
@@ -14,7 +16,12 @@ script = ExtResource("1_3vyb7")
|
||||
metadata/_custom_type_script = "uid://bg6mw4gfk50jv"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1758174490]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.19999999, 0)
|
||||
shape = SubResource("CapsuleShape3D_xcqlg")
|
||||
|
||||
[node name="Body" type="MeshInstance3D" parent="." unique_id=977363109]
|
||||
mesh = SubResource("CapsuleMesh_xcqlg")
|
||||
[node name="TopCollisionShape3D" type="CollisionShape3D" parent="." unique_id=1758174491]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
|
||||
shape = SubResource("BoxShape3D_top")
|
||||
|
||||
[node name="chara_red" parent="." unique_id=1864019899 instance=ExtResource("2_g2els")]
|
||||
transform = Transform3D(8, 0, 0, 0, 8, 0, 0, 0, 8, 0, -1, 0)
|
||||
|
||||
Reference in New Issue
Block a user