diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn new file mode 100644 index 0000000..69ed0cb --- /dev/null +++ b/Scenes/Main.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=5 format=3 uid="uid://vwrw05ob2caq"] + +[ext_resource type="Script" path="res://Scripts/Main.cs" id="1_g4hua"] +[ext_resource type="PackedScene" uid="uid://dy3d4e6qegyjg" path="res://Scenes/TestLevel.tscn" id="2_52ghj"] +[ext_resource type="PackedScene" uid="uid://b12gq4yqc3d8i" path="res://Scenes/MainMenu.tscn" id="2_kvovw"] +[ext_resource type="PackedScene" uid="uid://c7vj45kuquma" path="res://Scenes/TestLevel2.tscn" id="3_mbufn"] + +[node name="Main" type="Node"] +script = ExtResource("1_g4hua") +Levels = Array[PackedScene]([ExtResource("2_52ghj"), ExtResource("3_mbufn")]) + +[node name="MainMenu" parent="." instance=ExtResource("2_kvovw")] diff --git a/Scenes/MainMenu.tscn b/Scenes/MainMenu.tscn new file mode 100644 index 0000000..222974c --- /dev/null +++ b/Scenes/MainMenu.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=3 format=3 uid="uid://b12gq4yqc3d8i"] + +[ext_resource type="Script" path="res://Scripts/MainMenu.cs" id="1_6aikc"] +[ext_resource type="PackedScene" uid="uid://cjl20bs56430j" path="res://UI/Animations/UIAnimations.tscn" id="2_erh7e"] + +[node name="MainMenu" type="Node2D"] +script = ExtResource("1_6aikc") + +[node name="Control" type="Control" parent="."] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Button" type="Button" parent="Control"] +layout_mode = 0 +offset_left = 583.0 +offset_top = 441.0 +offset_right = 1155.0 +offset_bottom = 645.0 +text = "Play" + +[node name="UIAnimations" parent="." instance=ExtResource("2_erh7e")] + +[connection signal="IntroAnimationsCompleted" from="." to="." method="OnAllAnimationsFinished"] +[connection signal="pressed" from="Control/Button" to="." method="OnStartButtonPressed"] diff --git a/Scenes/TestLevel2.tscn b/Scenes/TestLevel2.tscn new file mode 100644 index 0000000..d1a0f3e --- /dev/null +++ b/Scenes/TestLevel2.tscn @@ -0,0 +1,94 @@ +[gd_scene load_steps=10 format=3 uid="uid://c7vj45kuquma"] + +[ext_resource type="Script" path="res://Scripts/TestLevel.cs" id="1_3m6or"] +[ext_resource type="PackedScene" uid="uid://bckd04543occ5" path="res://Levels/levelTEST.gltf" id="5_ne5tf"] +[ext_resource type="PackedScene" uid="uid://dkjdt7uq3a4j3" path="res://Scenes/TestEnemy.tscn" id="6_n5k0x"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_iokol"] +size = Vector3(77.2254, 10, 63.5656) + +[sub_resource type="BoxShape3D" id="BoxShape3D_hr26o"] +size = Vector3(37.611, 23.269, 13.2547) + +[sub_resource type="BoxShape3D" id="BoxShape3D_sjyl3"] +size = Vector3(100, 100, 18.6922) + +[sub_resource type="CylinderShape3D" id="CylinderShape3D_lhgew"] +height = 7.44995 +radius = 1.45911 + +[sub_resource type="CylinderShape3D" id="CylinderShape3D_fa41j"] +height = 4.6719 +radius = 2.32337 + +[sub_resource type="CylinderShape3D" id="CylinderShape3D_krlem"] +height = 5.0 +radius = 2.06347 + +[node name="Level" type="Node3D" node_paths=PackedStringArray("_spawnPoint")] +script = ExtResource("1_3m6or") +_spawnPoint = NodePath("SpawnPoint") + +[node name="Camera3D" type="Camera3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0, 1, 0, -1, 0, -0.0769171, 95.2611, -32.0601) +fov = 30.0 + +[node name="DebugCamera" type="Camera3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0.821149, 0.570714, 0, -0.570714, 0.821149, -0.36148, 22.6449, 10.8421) + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(-0.931845, -0.0850834, 0.35274, -0.0909281, 0.995857, -1.47234e-08, -0.351279, -0.032074, -0.935721, -3.58319, 8.01249, 0.163277) + +[node name="StaticBody3D" type="StaticBody3D" parent="."] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -36.9892) +shape = SubResource("BoxShape3D_iokol") + +[node name="CollisionShape3D3" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22.5146, 4.08253, -31.0556) +shape = SubResource("BoxShape3D_hr26o") + +[node name="CollisionShape3D2" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.1248, 1.81661, -31.1077) +shape = SubResource("BoxShape3D_hr26o") + +[node name="levelTEST" parent="StaticBody3D" instance=ExtResource("5_ne5tf")] + +[node name="CollisionShape3D4" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.42545) +shape = SubResource("BoxShape3D_sjyl3") + +[node name="CollisionShape3D5" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.650528, -0.488932, -78.351) +shape = SubResource("BoxShape3D_sjyl3") + +[node name="CollisionShape3D6" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 46.5847, -0.977863, -37.8814) +shape = SubResource("BoxShape3D_sjyl3") + +[node name="CollisionShape3D7" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -48.9058, -1.95573, -38.8643) +shape = SubResource("BoxShape3D_sjyl3") + +[node name="CollisionShape3D8" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -48.9058, -1.95573, -40.25) +shape = SubResource("BoxShape3D_sjyl3") + +[node name="Rock1" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.93645, 5.82082, -21.6909) +shape = SubResource("CylinderShape3D_lhgew") + +[node name="Rock2" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.82773, 6.46042, -40.6232) +shape = SubResource("CylinderShape3D_fa41j") + +[node name="Rock3" type="CollisionShape3D" parent="StaticBody3D"] +transform = Transform3D(0.999841, -0.0178538, 0, 0.0178538, 0.999841, 0, 0, 0, 1, -6.84036, 6.33278, -46.1737) +shape = SubResource("CylinderShape3D_krlem") + +[node name="TestEnemy" parent="." instance=ExtResource("6_n5k0x")] +transform = Transform3D(0.998405, 0.0226647, 0.0517184, -0.0544217, 0.630486, 0.77429, -0.0150588, -0.775869, 0.630714, -20.5579, 5.52246, -43.2246) + +[node name="SpawnPoint" type="Marker3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, -0.757998, 6.71652, -10.4768) diff --git a/Scripts/Main.cs b/Scripts/Main.cs new file mode 100644 index 0000000..54bbc94 --- /dev/null +++ b/Scripts/Main.cs @@ -0,0 +1,8 @@ +using Godot; +using Godot.Collections; + +public partial class Main : Node +{ + [Export] + public Array Levels; +} diff --git a/Scripts/MainMenu.cs b/Scripts/MainMenu.cs new file mode 100644 index 0000000..5d60dc4 --- /dev/null +++ b/Scripts/MainMenu.cs @@ -0,0 +1,34 @@ +using Godot; +using System.Linq; + +public partial class MainMenu : Node2D +{ + private AnimationPlayer _player; + + [Signal] + public delegate void IntroAnimationsCompletedEventHandler(); + + public override void _Ready() + { + GetParent().GetNode("MainMenu/UIAnimations/LoreSplash").Show(); + _player = GetTree().Root.GetNode("/root/Main/MainMenu/UIAnimations/AnimationPlayer"); + _player.Queue("IntroLore"); + } + + private void OnStartButtonPressed() + { + _player.Play("FirstLevel"); + Hide(); + _player.AnimationFinished += OnAnimationFinished; + } + + private void OnAnimationFinished(StringName animationName) + { + if (animationName == "FirstLevel") + { + var main = GetTree().Root.GetNode
("Main"); + var firstLevel = main.Levels.First().Instantiate(); + AddChild(firstLevel); + } + } +} diff --git a/UI/Animations/UIAnimations.tscn b/UI/Animations/UIAnimations.tscn new file mode 100644 index 0000000..deb9648 --- /dev/null +++ b/UI/Animations/UIAnimations.tscn @@ -0,0 +1,219 @@ +[gd_scene load_steps=8 format=3 uid="uid://cjl20bs56430j"] + +[ext_resource type="Texture2D" uid="uid://b1ucutlpx3fnp" path="res://UI/INTRO LORE.png" id="1_f4dp3"] +[ext_resource type="Texture2D" uid="uid://haxbuoepqn2b" path="res://UI/LEVEL DROP 1.png" id="2_r3e0d"] + +[sub_resource type="Animation" id="Animation_fm0re"] +resource_name = "RESET" +length = 0.1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("DissolveRect:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("FirstLevelSplash:visible") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("DissolveRect:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("LoreSplash:visible") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} + +[sub_resource type="Animation" id="Animation_ghusn"] +resource_name = "fade_out" +length = 3.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("DissolveRect:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 3), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} + +[sub_resource type="Animation" id="Animation_qsjit"] +resource_name = "IntroLore" +length = 10.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("DissolveRect:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 3, 7.5, 10), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("DissolveRect:visible") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 10), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("LoreSplash:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 10), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("FirstLevelSplash:visible") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} + +[sub_resource type="Animation" id="Animation_3u8q8"] +resource_name = "FirstLevel" +length = 5.0 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("DissolveRect:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("FirstLevelSplash:visible") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 5), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("LoreSplash:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 5), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [false, false] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("DissolveRect:visible") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0, 5), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_iabf8"] +_data = { +"FirstLevel": SubResource("Animation_3u8q8"), +"IntroLore": SubResource("Animation_qsjit"), +"RESET": SubResource("Animation_fm0re"), +"fade_out": SubResource("Animation_ghusn") +} + +[node name="UIAnimations" type="CanvasLayer"] + +[node name="DissolveRect" type="ColorRect" parent="."] +visible = false +modulate = Color(1, 1, 1, 0) +z_index = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +color = Color(0, 0, 0, 1) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_iabf8") +} + +[node name="LoreSplash" type="TextureRect" parent="."] +visible = false +show_behind_parent = true +offset_right = 1920.0 +offset_bottom = 1080.0 +texture = ExtResource("1_f4dp3") + +[node name="FirstLevelSplash" type="TextureRect" parent="."] +z_index = -2 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_r3e0d") diff --git a/UI/INTRO LORE.png b/UI/INTRO LORE.png new file mode 100644 index 0000000..584741e Binary files /dev/null and b/UI/INTRO LORE.png differ diff --git a/UI/INTRO LORE.png.import b/UI/INTRO LORE.png.import new file mode 100644 index 0000000..8ec4824 --- /dev/null +++ b/UI/INTRO LORE.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b1ucutlpx3fnp" +path="res://.godot/imported/INTRO LORE.png-9f0c5de7059ad6efdc55035e18ffc142.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/INTRO LORE.png" +dest_files=["res://.godot/imported/INTRO LORE.png-9f0c5de7059ad6efdc55035e18ffc142.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 diff --git a/UI/LEVEL DROP 1.png b/UI/LEVEL DROP 1.png new file mode 100644 index 0000000..dc2c645 Binary files /dev/null and b/UI/LEVEL DROP 1.png differ diff --git a/UI/LEVEL DROP 1.png.import b/UI/LEVEL DROP 1.png.import new file mode 100644 index 0000000..a026aa0 --- /dev/null +++ b/UI/LEVEL DROP 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://haxbuoepqn2b" +path="res://.godot/imported/LEVEL DROP 1.png-400f238971b5b1e157c191e736f20e64.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/LEVEL DROP 1.png" +dest_files=["res://.godot/imported/LEVEL DROP 1.png-400f238971b5b1e157c191e736f20e64.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 diff --git a/project.godot b/project.godot index d0df686..844ac75 100644 --- a/project.godot +++ b/project.godot @@ -11,13 +11,13 @@ config_version=5 [application] config/name="GameJam2023" -run/main_scene="res://Scenes/TestLevel.tscn" +run/main_scene="res://Scenes/Main.tscn" config/features=PackedStringArray("4.1", "C#", "Forward Plus") [display] window/size/viewport_width=1920 -window/size/viewport_height=1400 +window/size/viewport_height=1080 [dotnet]