diff --git a/.gitignore b/.gitignore index 567cb9e..4709183 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ # Godot 4+ specific ignores .godot/ -builds/ -art/ diff --git a/AudioManager.gd b/AudioManager.gd deleted file mode 100644 index ef104ff..0000000 --- a/AudioManager.gd +++ /dev/null @@ -1 +0,0 @@ -audiost diff --git a/builds/pDash.sh b/builds/pDash.sh deleted file mode 100755 index 6df87ef..0000000 --- a/builds/pDash.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -echo -ne '\033c\033]0;pDash\a' -base_path="$(dirname "$(realpath "$0")")" -"$base_path/pDash.x86_64" "$@" diff --git a/builds/pDash.x86_64 b/builds/pDash.x86_64 deleted file mode 100755 index 5837969..0000000 Binary files a/builds/pDash.x86_64 and /dev/null differ diff --git a/default_bus_layout.tres b/default_bus_layout.tres deleted file mode 100644 index 9a6a4e1..0000000 --- a/default_bus_layout.tres +++ /dev/null @@ -1,15 +0,0 @@ -[gd_resource type="AudioBusLayout" format=3 uid="uid://bnfly6iu8nvfp"] - -[resource] -bus/1/name = &"SFX" -bus/1/solo = false -bus/1/mute = false -bus/1/bypass_fx = false -bus/1/volume_db = 0.0 -bus/1/send = &"Master" -bus/2/name = &"Music" -bus/2/solo = false -bus/2/mute = false -bus/2/bypass_fx = false -bus/2/volume_db = 0.0 -bus/2/send = &"Master" diff --git a/export_presets.cfg b/export_presets.cfg deleted file mode 100644 index 6c4f742..0000000 --- a/export_presets.cfg +++ /dev/null @@ -1,39 +0,0 @@ -[preset.0] - -name="Linux/X11" -platform="Linux/X11" -runnable=true -dedicated_server=false -custom_features="" -export_filter="all_resources" -include_filter="" -exclude_filter="" -export_path="../builds/pDash_v0.1.x86_64" -encryption_include_filters="" -encryption_exclude_filters="" -encrypt_pck=false -encrypt_directory=false - -[preset.0.options] - -custom_template/debug="" -custom_template/release="" -debug/export_console_wrapper=1 -binary_format/embed_pck=true -texture_format/bptc=true -texture_format/s3tc=true -texture_format/etc=false -texture_format/etc2=false -binary_format/architecture="x86_64" -ssh_remote_deploy/enabled=false -ssh_remote_deploy/host="user@host_ip" -ssh_remote_deploy/port="22" -ssh_remote_deploy/extra_args_ssh="" -ssh_remote_deploy/extra_args_scp="" -ssh_remote_deploy/run_script="#!/usr/bin/env bash -export DISPLAY=:0 -unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" -\"{temp_dir}/{exe_name}\" {cmd_args}" -ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash -kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") -rm -rf \"{temp_dir}\"" diff --git a/icon.svg b/icon.svg index b370ceb..e9c2e75 100644 --- a/icon.svg +++ b/icon.svg @@ -1 +1,3696 @@ - + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YORCHNET.COM + + + + + + + + + + + + + + + diff --git a/icon.svg.import b/icon.svg.import index 5883ff3..61a50c8 100644 --- a/icon.svg.import +++ b/icon.svg.import @@ -2,7 +2,7 @@ importer="texture" type="CompressedTexture2D" -uid="uid://clej3tikgcaj4" +uid="uid://cihjayxr028j3" path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" metadata={ "vram_texture": false diff --git a/icons/gravity_switch.png b/icons/gravity_switch.png deleted file mode 100644 index c710064..0000000 Binary files a/icons/gravity_switch.png and /dev/null differ diff --git a/icons/gravity_switch.png.import b/icons/gravity_switch.png.import deleted file mode 100644 index 8f9f5bf..0000000 --- a/icons/gravity_switch.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://h6nywllbx7in" -path="res://.godot/imported/gravity_switch.png-4c9bdc1ecc3cdc6d786578b3cfafa968.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://icons/gravity_switch.png" -dest_files=["res://.godot/imported/gravity_switch.png-4c9bdc1ecc3cdc6d786578b3cfafa968.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/icons/yorchnet_pixel_64.png b/icons/yorchnet_pixel_64.png deleted file mode 100644 index 5b1d486..0000000 Binary files a/icons/yorchnet_pixel_64.png and /dev/null differ diff --git a/icons/yorchnet_pixel_64.png.import b/icons/yorchnet_pixel_64.png.import deleted file mode 100644 index f420b62..0000000 --- a/icons/yorchnet_pixel_64.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bdshi27v4osg2" -path="res://.godot/imported/yorchnet_pixel_64.png-72f4e78a0b6ea5c7ddb078ba06cc8c02.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://icons/yorchnet_pixel_64.png" -dest_files=["res://.godot/imported/yorchnet_pixel_64.png-72f4e78a0b6ea5c7ddb078ba06cc8c02.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/pDash.pck b/pDash.pck deleted file mode 100644 index 10762f1..0000000 Binary files a/pDash.pck and /dev/null differ diff --git a/project.godot b/project.godot index d851013..dbfeacb 100644 --- a/project.godot +++ b/project.godot @@ -10,42 +10,12 @@ config_version=5 [application] -config/name="pDash_v0.1" -config/version=".1" -run/main_scene="res://scenes/UI/Splash.tscn" +config/name="pDash v0.2" +run/main_scene="res://scenes/Main.tscn" config/features=PackedStringArray("4.2", "Forward Plus") -config/icon="res://icons/yorchnet_pixel_64.png" - -[display] - -window/size/viewport_width=1920 -window/size/viewport_height=1080 -window/size/mode=3 -window/size/borderless=true -window/stretch/mode="viewport" -window/stretch/aspect="expand" +config/icon="res://icon.svg" [editor] -movie_writer/movie_file="/home/jorge/recorded/recorded.avi" version_control/plugin_name="GitPlugin" version_control/autoload_on_startup=true - -[input] - -jump={ -"deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"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":0,"echo":false,"script":null) -] -} -debug={ -"deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":96,"key_label":0,"unicode":0,"echo":false,"script":null) -] -} - -[rendering] - -textures/canvas_textures/default_texture_filter=0 -renderer/rendering_method="mobile" -textures/vram_compression/import_etc2_astc=true diff --git a/scenes/Main.tscn b/scenes/Main.tscn new file mode 100644 index 0000000..dbb1a4e --- /dev/null +++ b/scenes/Main.tscn @@ -0,0 +1,11 @@ +[gd_scene format=3 uid="uid://bc3i3udumnh3r"] + +[node name="Main" type="Node"] + +[node name="Game" type="CanvasLayer" parent="."] + +[node name="UI" type="CanvasLayer" parent="."] + +[node name="Curtains" type="CanvasLayer" parent="."] + +[node name="Post" type="CanvasLayer" parent="."] diff --git a/scenes/UI/End.tscn b/scenes/UI/End.tscn deleted file mode 100644 index 445dc68..0000000 --- a/scenes/UI/End.tscn +++ /dev/null @@ -1,31 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://8rtse17u7bqg"] - -[ext_resource type="Script" path="res://scripts/End.gd" id="1_0587q"] - -[node name="End" type="CanvasLayer"] -script = ExtResource("1_0587q") -metadata/_edit_use_anchors_ = true - -[node name="CenterContainer" type="CenterContainer" parent="."] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -layout_mode = 2 - -[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -size_flags_vertical = 1 -theme_override_font_sizes/font_size = 72 -text = "Game Over!" -horizontal_alignment = 1 - -[node name="Label2" type="Button" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -text = "Try again -" - -[connection signal="button_up" from="CenterContainer/VBoxContainer/Label2" to="." method="_on_play"] diff --git a/scenes/UI/Splash.tscn b/scenes/UI/Splash.tscn deleted file mode 100644 index 1b02843..0000000 --- a/scenes/UI/Splash.tscn +++ /dev/null @@ -1,75 +0,0 @@ -[gd_scene load_steps=7 format=3 uid="uid://dvt585i7m0286"] - -[ext_resource type="Script" path="res://scripts/Splash.gd" id="1_3yqra"] -[ext_resource type="Shader" path="res://shaders/Splash.gdshader" id="2_5fbyd"] -[ext_resource type="Texture2D" uid="uid://bdshi27v4osg2" path="res://icons/yorchnet_pixel_64.png" id="2_fpfqa"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_ijjp2"] -shader = ExtResource("2_5fbyd") -shader_parameter/flap_speed = 4.0 -shader_parameter/scale = 4.0 - -[sub_resource type="Animation" id="Animation_2v5v3"] -resource_name = "animation" -length = 3.0 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("ColorRect:self_modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0.1, 0.5, 2.5, 3), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 0, -"values": [Color(1, 1, 1, 1), Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(1, 1, 1, 1)] -} -tracks/1/type = "method" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath(".") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(3), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"load_start_menu" -}] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_sansa"] -_data = { -"animation": SubResource("Animation_2v5v3") -} - -[node name="Splash" type="CanvasLayer"] -script = ExtResource("1_3yqra") -metadata/_edit_use_anchors_ = true - -[node name="CenterContainer" type="CenterContainer" parent="."] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="TextureRect" type="TextureRect" parent="CenterContainer"] -material = SubResource("ShaderMaterial_ijjp2") -layout_mode = 2 -texture = ExtResource("2_fpfqa") - -[node name="ColorRect" type="ColorRect" parent="."] -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="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_sansa") -} -autoplay = "animation" diff --git a/scenes/UI/Start.tscn b/scenes/UI/Start.tscn deleted file mode 100644 index 9dd71aa..0000000 --- a/scenes/UI/Start.tscn +++ /dev/null @@ -1,81 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://o0c5ir7543g1"] - -[ext_resource type="Script" path="res://scripts/End.gd" id="1_jfc42"] - -[node name="MainMenu" type="CanvasLayer"] -script = ExtResource("1_jfc42") -metadata/_edit_use_anchors_ = true - -[node name="CenterContainer" type="CenterContainer" parent="."] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -layout_mode = 2 - -[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -size_flags_vertical = 1 -theme_override_font_sizes/font_size = 72 -text = "Welcome to pDash" -horizontal_alignment = 1 - -[node name="Button01" type="Button" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -focus_neighbor_left = NodePath("../Button05") -focus_neighbor_top = NodePath("../Button05") -focus_neighbor_right = NodePath("../Button02") -focus_neighbor_bottom = NodePath("../Button02") -focus_next = NodePath("../Button02") -focus_previous = NodePath("../Button05") -text = "Play Level 1" - -[node name="Button02" type="Button" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -focus_neighbor_left = NodePath("../Button01") -focus_neighbor_top = NodePath("../Button01") -focus_neighbor_right = NodePath("../Button03") -focus_neighbor_bottom = NodePath("../Button03") -focus_next = NodePath("../Button03") -focus_previous = NodePath("../Button01") -text = "Play Level 2" - -[node name="Button03" type="Button" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -focus_neighbor_left = NodePath("../Button02") -focus_neighbor_top = NodePath("../Button02") -focus_neighbor_right = NodePath("../Button04") -focus_neighbor_bottom = NodePath("../Button04") -focus_next = NodePath("../Button04") -focus_previous = NodePath("../Button02") -disabled = true -text = "Options" - -[node name="Button04" type="Button" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -focus_neighbor_left = NodePath("../Button03") -focus_neighbor_top = NodePath("../Button03") -focus_neighbor_right = NodePath("../Button05") -focus_neighbor_bottom = NodePath("../Button05") -focus_next = NodePath("../Button05") -focus_previous = NodePath(".") -disabled = true -text = "Credits" - -[node name="Button05" type="Button" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -focus_neighbor_left = NodePath("../Button04") -focus_neighbor_top = NodePath("../Button04") -focus_neighbor_right = NodePath("../Button01") -focus_neighbor_bottom = NodePath("../Button01") -focus_next = NodePath("../Button01") -focus_previous = NodePath("../Button04") -text = "Quit -" - -[connection signal="button_up" from="CenterContainer/VBoxContainer/Button01" to="." method="_on_play_lv0"] -[connection signal="button_up" from="CenterContainer/VBoxContainer/Button02" to="." method="_on_play_lv1"] -[connection signal="button_up" from="CenterContainer/VBoxContainer/Button05" to="." method="_on_quit"] diff --git a/scenes/UI/Win.tscn b/scenes/UI/Win.tscn deleted file mode 100644 index 42c3656..0000000 --- a/scenes/UI/Win.tscn +++ /dev/null @@ -1,30 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://8euefl26umu1"] - -[ext_resource type="Script" path="res://scripts/Win.gd" id="1_wgn5v"] - -[node name="End" type="CanvasLayer"] -script = ExtResource("1_wgn5v") -metadata/_edit_use_anchors_ = true - -[node name="CenterContainer" type="CenterContainer" parent="."] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -layout_mode = 2 - -[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -size_flags_vertical = 1 -theme_override_font_sizes/font_size = 72 -text = "You Win!" -horizontal_alignment = 1 - -[node name="Label2" type="Button" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -text = "Play Again?" - -[connection signal="button_up" from="CenterContainer/VBoxContainer/Label2" to="." method="_on_label_2_button_up"] diff --git a/scenes/gravity_switch.tscn b/scenes/gravity_switch.tscn deleted file mode 100644 index 90ed1f9..0000000 --- a/scenes/gravity_switch.tscn +++ /dev/null @@ -1,110 +0,0 @@ -[gd_scene load_steps=12 format=3 uid="uid://cjpwcih4ro8gu"] - -[ext_resource type="Script" path="res://scripts/switch.gd" id="1_523fa"] -[ext_resource type="Texture2D" uid="uid://h6nywllbx7in" path="res://icons/gravity_switch.png" id="2_wf4my"] - -[sub_resource type="Curve" id="Curve_wyj6h"] -_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.133178, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] -point_count = 3 - -[sub_resource type="CurveTexture" id="CurveTexture_silse"] -curve = SubResource("Curve_wyj6h") - -[sub_resource type="Curve" id="Curve_vvvck"] -min_value = -200.0 -max_value = 200.0 -_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.05, 32), 0.0, 0.0, 0, 0, Vector2(0.2, -5), 0.0, 0.0, 0, 0] -point_count = 3 - -[sub_resource type="CurveTexture" id="CurveTexture_qurcg"] -curve = SubResource("Curve_vvvck") - -[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_axyq0"] -particle_flag_disable_z = true -inherit_velocity_ratio = -0.51 -spread = 180.0 -initial_velocity_min = 80.0 -initial_velocity_max = 160.0 -gravity = Vector3(0, 0, 0) -linear_accel_max = 45.0 -linear_accel_curve = SubResource("CurveTexture_qurcg") -scale_min = 8.0 -scale_max = 8.0 -alpha_curve = SubResource("CurveTexture_silse") - -[sub_resource type="CircleShape2D" id="CircleShape2D_yx6cf"] -radius = 15.0 - -[sub_resource type="Animation" id="Animation_fvmq8"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("CollisionShape2D/TextureRect:rotation") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0.0] -} - -[sub_resource type="Animation" id="Animation_a34jr"] -resource_name = "spin" -length = 5.0 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("CollisionShape2D:rotation") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 5), -"transitions": PackedFloat32Array(0.0853777, 0.0877996), -"update": 0, -"values": [0.0, 12.5664] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_0riwv"] -_data = { -"RESET": SubResource("Animation_fvmq8"), -"spin": SubResource("Animation_a34jr") -} - -[node name="GravitySwitch01" type="Area2D"] -position = Vector2(361, 15) -collision_layer = 0 -linear_damp = 1.02 -angular_damp = 1.205 -script = ExtResource("1_523fa") -type = "gravity" -metadata/_edit_group_ = true - -[node name="GPUParticles2D" type="GPUParticles2D" parent="."] -process_material = SubResource("ParticleProcessMaterial_axyq0") -randomness = 1.0 - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -scale = Vector2(4, 4) -shape = SubResource("CircleShape2D_yx6cf") - -[node name="TextureRect" type="TextureRect" parent="CollisionShape2D"] -modulate = Color(1, 1, 1, 0.196078) -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -8.0 -offset_top = -8.0 -offset_right = 8.0 -offset_bottom = 8.0 -grow_horizontal = 2 -grow_vertical = 2 -texture = ExtResource("2_wf4my") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_0riwv") -} diff --git a/scenes/levels/level_0.tscn b/scenes/levels/level_0.tscn index 6c09e8b..744e57a 100644 --- a/scenes/levels/level_0.tscn +++ b/scenes/levels/level_0.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=6 format=3 uid="uid://bhoqj8b4oxyks"] -[ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/platform_01.tscn" id="1_kka3y"] -[ext_resource type="Script" path="res://scripts/checkpoint.gd" id="2_0yetm"] -[ext_resource type="PackedScene" uid="uid://cuefds30ddne1" path="res://scenes/platform_00.tscn" id="4_wje6l"] +[ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/modules/platform_02.tscn" id="1_kka3y"] +[ext_resource type="Script" path="res://scripts/null.gd" id="2_0yetm"] +[ext_resource type="PackedScene" uid="uid://cuefds30ddne1" path="res://scenes/modules/platform_00.tscn" id="4_wje6l"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] @@ -62,7 +62,6 @@ position = Vector2(2492, 59) position = Vector2(3755, 128) scale = Vector2(16.672, 1) script = ExtResource("2_0yetm") -type = "end" metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Checkpoints/End"] diff --git a/scenes/levels/level_1.tscn b/scenes/levels/level_1.tscn index 66a73b9..4d89e9a 100644 --- a/scenes/levels/level_1.tscn +++ b/scenes/levels/level_1.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=8 format=3 uid="uid://duai0nkslx7o8"] [ext_resource type="Script" path="res://scripts/checkpoint.gd" id="1_mogvd"] -[ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/platform_01.tscn" id="1_p1vy7"] -[ext_resource type="PackedScene" uid="uid://cjpwcih4ro8gu" path="res://scenes/gravity_switch.tscn" id="2_ufuu6"] +[ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/modules/platform_02.tscn" id="1_p1vy7"] +[ext_resource type="PackedScene" path="res://scenes/gravity_switch.tscn" id="2_ufuu6"] [ext_resource type="Script" path="res://scripts/switch.gd" id="3_vaslk"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] diff --git a/scenes/levels/level_X.tscn b/scenes/levels/level_X.tscn deleted file mode 100644 index 081579d..0000000 --- a/scenes/levels/level_X.tscn +++ /dev/null @@ -1,181 +0,0 @@ -[gd_scene load_steps=8 format=3 uid="uid://ctnhjgpqxjrw0"] - -[ext_resource type="PackedScene" uid="uid://dn0lboldm331y" path="res://scenes/platform_01.tscn" id="1_30vdq"] -[ext_resource type="Script" path="res://scripts/checkpoint.gd" id="2_v00sg"] -[ext_resource type="PackedScene" uid="uid://cjpwcih4ro8gu" path="res://scenes/gravity_switch.tscn" id="3_fjevk"] -[ext_resource type="Script" path="res://scripts/switch.gd" id="4_64uew"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] - -[sub_resource type="RectangleShape2D" id="RectangleShape2D_0f50m"] -size = Vector2(7318, 557) - -[sub_resource type="QuadMesh" id="QuadMesh_qcjog"] - -[node name="Level" type="Node2D"] - -[node name="Platforms" type="CanvasGroup" parent="."] - -[node name="Platform_01" parent="Platforms" instance=ExtResource("1_30vdq")] - -[node name="Platform_14" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(2986, 91) -scale = Vector2(16.672, 1) - -[node name="Platform_15" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(1483, -696) -scale = Vector2(16.672, 1) - -[node name="Platform_16" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(1595, 188) -scale = Vector2(16.672, 1) - -[node name="Platform_17" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(2068, 161) -scale = Vector2(16.672, 1) - -[node name="Platform_18" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(1019, -452) -scale = Vector2(16.672, 1) - -[node name="Platform_19" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(3629, 130) -rotation = 1.5708 -scale = Vector2(16.672, 1) - -[node name="Platform_20" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(2338, 297) -rotation = 1.5708 -scale = Vector2(16.672, 1) - -[node name="Platform_21" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(607, -296) -scale = Vector2(16.672, 1) - -[node name="Platform_22" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(1052, -220) -scale = Vector2(16.672, 1) - -[node name="Platform_23" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(2604, 159) -scale = Vector2(16.672, 1) - -[node name="Platform_24" parent="Platforms" instance=ExtResource("1_30vdq")] -position = Vector2(3363, 53) -scale = Vector2(16.672, 1) - -[node name="Platform_25" parent="Platforms" instance=ExtResource("1_30vdq")] -modulate = Color(0.00784314, 0.490196, 0, 1) -position = Vector2(3880, 153) -scale = Vector2(16.672, 1) - -[node name="Checkpoints" type="CanvasGroup" parent="."] - -[node name="End" type="Area2D" parent="Checkpoints"] -position = Vector2(3880, 133) -scale = Vector2(16.672, 1) -script = ExtResource("2_v00sg") -type = "end" -metadata/_edit_group_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Checkpoints/End"] -shape = SubResource("RectangleShape2D_7hfyn") - -[node name="Abysses" type="CanvasGroup" parent="."] - -[node name="Abyss" type="Area2D" parent="Abysses"] -metadata/_edit_group_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Abysses/Abyss"] -position = Vector2(951, 1182) -shape = SubResource("RectangleShape2D_0f50m") - -[node name="Abyss2" type="Area2D" parent="Abysses"] -position = Vector2(0, -2964) -metadata/_edit_group_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Abysses/Abyss2"] -position = Vector2(951, 1182) -shape = SubResource("RectangleShape2D_0f50m") - -[node name="Switches" type="CanvasGroup" parent="."] - -[node name="Gravity" type="Node2D" parent="Switches"] - -[node name="GravitySwitch01" parent="Switches/Gravity" instance=ExtResource("3_fjevk")] - -[node name="GravitySwitch02" parent="Switches/Gravity" instance=ExtResource("3_fjevk")] -position = Vector2(1344, -102) - -[node name="GravitySwitch03" parent="Switches/Gravity" instance=ExtResource("3_fjevk")] -position = Vector2(1743, -586) - -[node name="Direction" type="Node2D" parent="Switches"] - -[node name="DirectionSwitch01" type="Area2D" parent="Switches/Direction"] -self_modulate = Color(0, 0.737255, 0.745098, 0.423529) -position = Vector2(1017, -416) -collision_layer = 0 -script = ExtResource("4_64uew") -type = "gravity" -metadata/_edit_group_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch01"] -scale = Vector2(2, 2) -shape = SubResource("RectangleShape2D_7hfyn") - -[node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch01"] -self_modulate = Color(1, 1, 1, 0.0980392) -scale = Vector2(48, 48) -mesh = SubResource("QuadMesh_qcjog") - -[node name="DirectionSwitch02" type="Area2D" parent="Switches/Direction"] -self_modulate = Color(0, 0.737255, 0.745098, 0.423529) -position = Vector2(703, -262) -collision_layer = 0 -script = ExtResource("4_64uew") -type = "gravity" -metadata/_edit_group_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch02"] -scale = Vector2(2, 2) -shape = SubResource("RectangleShape2D_7hfyn") - -[node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch02"] -self_modulate = Color(1, 1, 1, 0.0980392) -scale = Vector2(48, 48) -mesh = SubResource("QuadMesh_qcjog") - -[node name="DirectionSwitch03" type="Area2D" parent="Switches/Direction"] -self_modulate = Color(0, 0.737255, 0.745098, 0.423529) -position = Vector2(1642, 153) -collision_layer = 0 -script = ExtResource("4_64uew") -type = "gravity" -metadata/_edit_group_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch03"] -scale = Vector2(2, 2) -shape = SubResource("RectangleShape2D_7hfyn") - -[node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch03"] -self_modulate = Color(1, 1, 1, 0.0980392) -scale = Vector2(48, 48) -mesh = SubResource("QuadMesh_qcjog") - -[node name="DirectionSwitch04" type="Area2D" parent="Switches/Direction"] -self_modulate = Color(0, 0.737255, 0.745098, 0.423529) -position = Vector2(2339, 104) -collision_layer = 0 -script = ExtResource("4_64uew") -type = "gravity" -metadata/_edit_group_ = true - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Switches/Direction/DirectionSwitch04"] -scale = Vector2(2, 2) -shape = SubResource("RectangleShape2D_7hfyn") - -[node name="MeshInstance2D" type="MeshInstance2D" parent="Switches/Direction/DirectionSwitch04"] -self_modulate = Color(1, 1, 1, 0.0980392) -scale = Vector2(48, 48) -mesh = SubResource("QuadMesh_qcjog") diff --git a/scenes/loader.tscn b/scenes/loader.tscn deleted file mode 100644 index 534f0ad..0000000 --- a/scenes/loader.tscn +++ /dev/null @@ -1,3 +0,0 @@ -[gd_scene format=3 uid="uid://b8xj2c2pml2p6"] - -[node name="Loader" type="Node"] diff --git a/scenes/main.tscn b/scenes/main.tscn index 0de8178..dbb1a4e 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,20 +1,11 @@ -[gd_scene load_steps=4 format=3 uid="uid://dsqm17w8hg428"] +[gd_scene format=3 uid="uid://bc3i3udumnh3r"] -[ext_resource type="Script" path="res://scripts/World.gd" id="1_131aq"] -[ext_resource type="PackedScene" uid="uid://cnp8h65468543" path="res://scenes/overlays/crt_overlay.tscn" id="2_xf15f"] -[ext_resource type="PackedScene" uid="uid://bhoqj8b4oxyks" path="res://scenes/levels/level_0.tscn" id="3_wx6ne"] +[node name="Main" type="Node"] -[node name="World" type="Node2D"] -script = ExtResource("1_131aq") +[node name="Game" type="CanvasLayer" parent="."] -[node name="Timer" type="Timer" parent="."] -one_shot = true +[node name="UI" type="CanvasLayer" parent="."] -[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +[node name="Curtains" type="CanvasLayer" parent="."] -[node name="Level" parent="." instance=ExtResource("3_wx6ne")] - -[node name="CRT_Overlay" parent="." instance=ExtResource("2_xf15f")] -visible = false - -[connection signal="timeout" from="Timer" to="." method="_on_timeout"] +[node name="Post" type="CanvasLayer" parent="."] diff --git a/scenes/main1.tscn b/scenes/main1.tscn deleted file mode 100644 index 32243f5..0000000 --- a/scenes/main1.tscn +++ /dev/null @@ -1,20 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://cokjt1a3cdywh"] - -[ext_resource type="Script" path="res://scripts/World.gd" id="1_3g8ek"] -[ext_resource type="PackedScene" uid="uid://cnp8h65468543" path="res://scenes/overlays/crt_overlay.tscn" id="2_onw3m"] -[ext_resource type="PackedScene" uid="uid://duai0nkslx7o8" path="res://scenes/levels/level_1.tscn" id="2_xjpi1"] - -[node name="World" type="Node2D"] -script = ExtResource("1_3g8ek") - -[node name="Timer" type="Timer" parent="."] -one_shot = true - -[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] - -[node name="Level" parent="." instance=ExtResource("2_xjpi1")] - -[node name="CRT_Overlay" parent="." instance=ExtResource("2_onw3m")] -visible = false - -[connection signal="timeout" from="Timer" to="." method="_on_timeout"] diff --git a/scenes/platform_00.tscn b/scenes/modules/platform_00.tscn similarity index 91% rename from scenes/platform_00.tscn rename to scenes/modules/platform_00.tscn index b2e5612..83eeb7c 100644 --- a/scenes/platform_00.tscn +++ b/scenes/modules/platform_00.tscn @@ -1,6 +1,7 @@ [gd_scene load_steps=3 format=3 uid="uid://cuefds30ddne1"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] +size = Vector2(96, 32) [sub_resource type="QuadMesh" id="QuadMesh_qcjog"] @@ -9,9 +10,8 @@ collision_layer = 2 metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -scale = Vector2(4, 1) shape = SubResource("RectangleShape2D_7hfyn") [node name="MeshInstance2D" type="MeshInstance2D" parent="."] -scale = Vector2(60, 20) +scale = Vector2(64, 32) mesh = SubResource("QuadMesh_qcjog") diff --git a/scenes/modules/platform_01.tscn b/scenes/modules/platform_01.tscn new file mode 100644 index 0000000..70e0cac --- /dev/null +++ b/scenes/modules/platform_01.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://bfanvsl6qnd7g"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] +size = Vector2(224, 32) + +[sub_resource type="QuadMesh" id="QuadMesh_qcjog"] +size = Vector2(192, 32) + +[node name="Platform_01" type="StaticBody2D"] +collision_layer = 2 +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_7hfyn") + +[node name="MeshInstance2D" type="MeshInstance2D" parent="."] +mesh = SubResource("QuadMesh_qcjog") diff --git a/scenes/platform_01.tscn b/scenes/modules/platform_02.tscn similarity index 76% rename from scenes/platform_01.tscn rename to scenes/modules/platform_02.tscn index 01bee27..0dac721 100644 --- a/scenes/platform_01.tscn +++ b/scenes/modules/platform_02.tscn @@ -1,18 +1,17 @@ [gd_scene load_steps=3 format=3 uid="uid://dn0lboldm331y"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_7hfyn"] +size = Vector2(352, 32) [sub_resource type="QuadMesh" id="QuadMesh_qcjog"] +size = Vector2(320, 32) -[node name="Platform_01" type="StaticBody2D"] +[node name="Platform_02" type="StaticBody2D"] collision_layer = 2 metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -scale = Vector2(16, 1) shape = SubResource("RectangleShape2D_7hfyn") [node name="MeshInstance2D" type="MeshInstance2D" parent="."] -position = Vector2(0.0224935, -0.125005) -scale = Vector2(300, 20) mesh = SubResource("QuadMesh_qcjog") diff --git a/scenes/overlays/crt_overlay.tscn b/scenes/overlays/crt_overlay.tscn deleted file mode 100644 index 6c9cd2f..0000000 --- a/scenes/overlays/crt_overlay.tscn +++ /dev/null @@ -1,40 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://cnp8h65468543"] - -[ext_resource type="Shader" path="res://shaders/pend00-crt-vhs.gdshader" id="1_hco18"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_vmiki"] -shader = ExtResource("1_hco18") -shader_parameter/overlay = true -shader_parameter/scanlines_opacity = 0.062 -shader_parameter/scanlines_width = 0.062 -shader_parameter/grille_opacity = 0.062 -shader_parameter/resolution = Vector2(640, 320) -shader_parameter/pixelate = false -shader_parameter/roll = true -shader_parameter/roll_speed = 1.0 -shader_parameter/roll_size = 0.8 -shader_parameter/roll_variation = 2.574 -shader_parameter/distort_intensity = 0.0 -shader_parameter/noise_opacity = 0.05 -shader_parameter/noise_speed = 5.0 -shader_parameter/static_noise_intensity = 0.06 -shader_parameter/aberration = 0.00500005 -shader_parameter/brightness = 1.4 -shader_parameter/discolor = true -shader_parameter/warp_amount = 0.0 -shader_parameter/clip_warp = false -shader_parameter/vignette_intensity = 0.1 -shader_parameter/vignette_opacity = 0.5 - -[node name="CRT_Overlay" type="CanvasLayer"] - -[node name="ColorRect" type="ColorRect" parent="."] -light_mask = 0 -z_as_relative = false -material = SubResource("ShaderMaterial_vmiki") -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -mouse_filter = 2 diff --git a/scenes/pDasher.tscn b/scenes/pDasher.tscn deleted file mode 100644 index 4e879cf..0000000 --- a/scenes/pDasher.tscn +++ /dev/null @@ -1,165 +0,0 @@ -[gd_scene load_steps=14 format=3 uid="uid://cqa6qtn1lj53m"] - -[ext_resource type="Script" path="res://scripts/pDasher.gd" id="1_str71"] -[ext_resource type="AudioStream" uid="uid://cuyel4kvgrcov" path="res://audio/jump.wav" id="2_w5kyr"] - -[sub_resource type="ShaderMaterial" id="ShaderMaterial_3db0b"] - -[sub_resource type="Animation" id="Animation_qv6th"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("CollisionShape2D:scale") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(1, 1)] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("CollisionShape2D:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(0, 0)] -} - -[sub_resource type="Animation" id="Animation_37igj"] -resource_name = "jump" -length = 0.5 -step = 0.05 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("CollisionShape2D:scale") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.05, 0.15), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(1, 1), Vector2(1.5, 0.5), Vector2(0.6, 1.4)] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("CollisionShape2D:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.05, 0.15), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(0, 0), Vector2(0, 4), Vector2(0, -4)] -} - -[sub_resource type="Animation" id="Animation_caret"] -resource_name = "land" -length = 0.5 -step = 0.05 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("CollisionShape2D:scale") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.1, 0.15), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(0.6, 1.4), Vector2(1.5, 0.5), Vector2(1, 1)] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("CollisionShape2D:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.1, 0.15), -"transitions": PackedFloat32Array(1, 1, 1), -"update": 0, -"values": [Vector2(0, -4), Vector2(0, 4), Vector2(0, 0)] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_x6ekt"] -_data = { -"RESET": SubResource("Animation_qv6th"), -"jump": SubResource("Animation_37igj"), -"land": SubResource("Animation_caret") -} - -[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_pnajy"] -radius = 4.0 -height = 16.0 - -[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_oeovl"] - -[sub_resource type="Curve" id="Curve_v0kkc"] -_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.14486, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] -point_count = 3 - -[sub_resource type="CurveTexture" id="CurveTexture_k65h6"] -curve = SubResource("Curve_v0kkc") - -[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_fswit"] -particle_flag_disable_z = true -gravity = Vector3(0, 98, 0) -scale_min = 4.0 -scale_max = 4.0 -alpha_curve = SubResource("CurveTexture_k65h6") -turbulence_noise_strength = 10.49 -turbulence_noise_scale = 50.0 -sub_emitter_keep_velocity = true - -[sub_resource type="PrismMesh" id="PrismMesh_43iim"] -lightmap_size_hint = Vector2i(14, 21) -size = Vector3(2, 2, 0) - -[node name="pDasher" type="CharacterBody2D"] -material = SubResource("ShaderMaterial_3db0b") -collision_layer = 3 -collision_mask = 3 -script = ExtResource("1_str71") -metadata/_edit_group_ = true -metadata/_edit_horizontal_guides_ = [8.0] - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -deterministic = true -libraries = { -"": SubResource("AnimationLibrary_x6ekt") -} - -[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] -stream = ExtResource("2_w5kyr") - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CapsuleShape2D_pnajy") - -[node name="GPUParticles2D" type="GPUParticles2D" parent="CollisionShape2D"] -material = SubResource("CanvasItemMaterial_oeovl") -position = Vector2(0, -4) -process_material = SubResource("ParticleProcessMaterial_fswit") -lifetime = 0.5 -trail_lifetime = 3.78 -trail_sections = 48 -trail_section_subdivisions = 1 - -[node name="MeshInstance2D" type="MeshInstance2D" parent="CollisionShape2D"] -rotation = -3.14159 -scale = Vector2(8, 8) -mesh = SubResource("PrismMesh_43iim") - -[node name="Camera2D" type="Camera2D" parent="."] -limit_top = -700 -limit_bottom = 700 -limit_smoothed = true -position_smoothing_enabled = true diff --git a/scripts/Abyss.gd b/scripts/Abyss.gd deleted file mode 100644 index c5ba635..0000000 --- a/scripts/Abyss.gd +++ /dev/null @@ -1,12 +0,0 @@ -extends Area2D - - -# Called when the node enters the scene tree for the first time. -func _ready(): - #$pDasher.body_entered.connect(OnBodyEntered) - pass # Replace with function body. - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - diff --git a/scripts/DebugOverlay.gd b/scripts/DebugOverlay.gd deleted file mode 100644 index 21dc514..0000000 --- a/scripts/DebugOverlay.gd +++ /dev/null @@ -1,19 +0,0 @@ -extends CanvasLayer - - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - _draw() - pass - -func _draw(): - var width = 5 - var color = Color(0, 1, 0) - var start = Vector2(0,0) - var end = Vector2(100,100) - $Line2D.draw_line(start, end, color, width) diff --git a/scripts/End.gd b/scripts/End.gd deleted file mode 100644 index d4694a2..0000000 --- a/scripts/End.gd +++ /dev/null @@ -1,31 +0,0 @@ -extends CanvasLayer -var mainScene - -# Called when the node enters the scene tree for the first time. -func _ready(): - #$CenterContainer/VBoxContainer/Button05.button_up.connect( _on_quit ) - #$CenterContainer/VBoxContainer/Button01.button_up.connect( _on_play ) - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - -func _on_quit(): - get_tree().quit() - -func _on_play_lv0(): - get_tree().change_scene_to_file( "res://scenes/main.tscn" ) -func _on_play_lv1(): - get_tree().change_scene_to_file( "res://scenes/main1.tscn" ) - #$".".hide() - #var w = get_node("/root/World"); - # - #if !w: - #get_tree().change_scene_to_file( "res://scenes/main.tscn" ) - #else: - #w.load_level() - #w.player_spawn() - #w.show() - diff --git a/scripts/Menu.gd b/scripts/Menu.gd deleted file mode 100644 index d4694a2..0000000 --- a/scripts/Menu.gd +++ /dev/null @@ -1,31 +0,0 @@ -extends CanvasLayer -var mainScene - -# Called when the node enters the scene tree for the first time. -func _ready(): - #$CenterContainer/VBoxContainer/Button05.button_up.connect( _on_quit ) - #$CenterContainer/VBoxContainer/Button01.button_up.connect( _on_play ) - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - -func _on_quit(): - get_tree().quit() - -func _on_play_lv0(): - get_tree().change_scene_to_file( "res://scenes/main.tscn" ) -func _on_play_lv1(): - get_tree().change_scene_to_file( "res://scenes/main1.tscn" ) - #$".".hide() - #var w = get_node("/root/World"); - # - #if !w: - #get_tree().change_scene_to_file( "res://scenes/main.tscn" ) - #else: - #w.load_level() - #w.player_spawn() - #w.show() - diff --git a/scripts/Splash.gd b/scripts/Splash.gd deleted file mode 100644 index 5ca79bb..0000000 --- a/scripts/Splash.gd +++ /dev/null @@ -1,22 +0,0 @@ -extends CanvasLayer -var start = preload("res://scenes/UI/Start.tscn").instantiate() - -# Called when the node enters the scene tree for the first time. -func _ready(): - #$CenterContainer/VBoxContainer/Button05.button_up.connect( _on_quit ) - #$CenterContainer/VBoxContainer/Button01.button_up.connect( _on_play ) - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - -func _on_quit(): - get_tree().quit() - -func load_start_menu(): - #$".".hide() - #get_tree().get_root().add_child( start ) - get_tree().change_scene_to_file("res://scenes/UI/Start.tscn") - diff --git a/scripts/Win.gd b/scripts/Win.gd deleted file mode 100644 index a3cf02e..0000000 --- a/scripts/Win.gd +++ /dev/null @@ -1,31 +0,0 @@ -extends CanvasLayer -var mainScene - -# Called when the node enters the scene tree for the first time. -func _ready(): - #$CenterContainer/VBoxContainer/Button05.button_up.connect( _on_quit ) - #$CenterContainer/VBoxContainer/Button01.button_up.connect( _on_play ) - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - -func _on_quit(): - get_tree().quit() - -func _on_play(): - #$".".hide() - #var w = get_node("/root/World"); - # - #if !w: - get_tree().change_scene_to_file( "res://scenes/Start.tscn" ) - #else: - #w.player_spawn() - #w.show() - - - -func _on_label_2_button_up(): - get_tree().change_scene_to_file("res://scenes/UI/Start.tscn") diff --git a/scripts/World.gd b/scripts/World.gd deleted file mode 100644 index 2b2dd08..0000000 --- a/scripts/World.gd +++ /dev/null @@ -1,103 +0,0 @@ -extends Node2D - -var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") -var gravity_vector = ProjectSettings.get_setting("physics/2d/default_gravity_vector") -var player = load("res://scenes/pDasher.tscn") -#var level -var direction: int = 1 -var paused: bool = false -var asp: AudioStreamPlayer -var switch_gravity_sound = preload("res://audio/switch_gravity.wav") -var win = preload("res://scenes/UI/Win.tscn").instantiate() -var end = preload("res://scenes/UI/End.tscn").instantiate() -#var level_n: int = 1 -var pDasher - - -## WORLD METHODS -func switch_gravity(): - gravity_vector = gravity_vector.rotated(deg_to_rad(180)) - -func switch_direction(): - print("changing") - direction *= -1 - -## NAVIGATION -func player_fail(): - get_tree().change_scene_to_file("res://scenes/UI/Start.tscn") - -func player_win(): - #level_n += 1 - #load_level() - #$"." .hide() - #get_tree().get_root().add_child( win ) - get_tree().change_scene_to_file("res://scenes/UI/Win.tscn") - -func player_spawn(): - pDasher.position = Vector2(0,0 ) - -#func load_level(): - ##if level_n == null: - ##level_n = 0 - #level = Levels[level_n] - -func _ready(): - - #load_level() - - asp = $AudioStreamPlayer - - #load player and level - get_node("/root/World").add_child( player.instantiate() ) - #get_node("/root/World").add_child( level.instantiate() ) #relative way meaning or whatever node this script is attached to. - - # manage signals connections - var abysses = $Level/Abysses.get_children() - for abyss in abysses: - abyss.body_entered.connect( _on_abyss_body_entered ) - - var gravity_switches = $Level/Switches/Gravity.get_children() - for gswitch in gravity_switches: - gswitch.body_entered.connect( _on_gswitch_body_entered ) - - var direction_switches = $Level/Switches/Direction.get_children() - for dswitch in direction_switches: - dswitch.body_entered.connect( _on_dswitch_body_entered ) - - - var checkpoints = $Level/Checkpoints.get_children() - for checkpoint in checkpoints: - #print( checkpoint ) - checkpoint.body_entered.connect( _on_checkpoint_body_entered ) - - pDasher = get_node("/root/World/pDasher") - player_spawn() -## MAIN -#func _process(delta): - #pass - -##SIGNAL HANDLING -func _on_abyss_body_entered(body): - #check that body is player - player_fail() - #print( str(body) + " se fue pal hoyo" ) - -func _on_gswitch_body_entered(body): - #check type of switch - #body.get_node("AnimationPlayer").spin() - asp.stream = switch_gravity_sound - asp.play() - switch_gravity() - -func _on_dswitch_body_entered(body): - pDasher - pDasher.switch_direction() - - - -func _on_checkpoint_body_entered(body): - body.direction = 0; - $Timer.start() - -func _on_timeout(): - player_win() diff --git a/scripts/checkpoint.gd b/scripts/null.gd similarity index 78% rename from scripts/checkpoint.gd rename to scripts/null.gd index 91d8473..e08925d 100644 --- a/scripts/checkpoint.gd +++ b/scripts/null.gd @@ -1,9 +1,10 @@ -extends Area2D -@export var type: String +extends Node + # Called when the node enters the scene tree for the first time. func _ready(): - pass + pass # Replace with function body. + # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): diff --git a/scripts/pDasher.gd b/scripts/pDasher.gd deleted file mode 100644 index db3168b..0000000 --- a/scripts/pDasher.gd +++ /dev/null @@ -1,76 +0,0 @@ -extends CharacterBody2D - -const SPEED = 300 -const JUMP_VELOCITY = -400.0 -const ANGULAR_ACCELERATION = 7.5; - -var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") -var direction: int -var World: Node2D -var ap: AnimationPlayer -var asp: AudioStreamPlayer -var jumping: bool = false -var lives: int = 3 - -var jump_sound = preload("res://audio/jump.wav") -var land_sound = preload("res://audio/land.wav") -var fall_sound = preload("res://audio/fall.wav") -var switch_direction_sound = preload("res://audio/switch_direction.wav") - -func switch_direction(): - velocity.x *= -1 - direction *= -1 - asp.stream = switch_direction_sound - asp.play() - -func _ready(): - ap = $AnimationPlayer; - asp = $AudioStreamPlayer; - World = get_node("/root/World") ## why did get_world("World") didn't work? - direction = World.direction ## maybe should be getting initial direction from level - -func _physics_process(delta): - - if Input.is_action_just_pressed("debug"): - switch_direction() - #if direction != World.direction: - #swap_direction() - - # Add the gravity. - self.up_direction = -World.gravity_vector; - $CollisionShape2D.skew = lerp( $CollisionShape2D.skew, (.001) * self.velocity.x * sin(World.gravity_vector.angle()) , delta * ANGULAR_ACCELERATION ) - self.rotation = lerp( self.rotation , -World.gravity_vector.angle() + (.5*PI) , delta * ANGULAR_ACCELERATION ) ; - - - if not is_on_floor(): - velocity.y += gravity * (sin(World.gravity_vector.angle())) * delta - velocity.x += gravity * (cos(World.gravity_vector.angle())) * delta - else: - # Handle jump. - - if jumping: - jumping = false - ap.play("land") - asp.stream = land_sound - asp.play() - - - if Input.is_action_just_pressed("jump") and is_on_floor(): - #velocity.x = JUMP_VELOCITY * cos(jump_vector.angle()) - jumping = true - ap.play("jump") - asp.stream = jump_sound - asp.play() - - velocity.y = JUMP_VELOCITY * sin(World.gravity_vector.angle()) - - if direction != 0: - velocity.x = direction * SPEED - else: - velocity.x = move_toward(velocity.x, 0, SPEED) - - move_and_slide() - -func _on_fall(): - asp.stream = fall_sound - asp.play() diff --git a/scripts/switch.gd b/scripts/switch.gd deleted file mode 100644 index b7852bf..0000000 --- a/scripts/switch.gd +++ /dev/null @@ -1,16 +0,0 @@ -extends Area2D - -@export var type: String - -var w: Node -# Called when the node enters the scene tree for the first time. -func _ready(): - w = get_node("/root/World") -# print(w) - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - -func spin(): - $AnimationPlayer.play("spin") diff --git a/shaders/Splash.gdshader b/shaders/Splash.gdshader deleted file mode 100644 index 86a8334..0000000 --- a/shaders/Splash.gdshader +++ /dev/null @@ -1,9 +0,0 @@ -shader_type canvas_item; -uniform float flap_speed = 4.0; -uniform float scale = 4; - -void vertex() { - VERTEX.y = VERTEX.y * scale - (64.0*scale/2.0); - VERTEX.x = VERTEX.x * scale - (64.0*scale/2.0); - -} \ No newline at end of file diff --git a/shaders/pend00-crt-vhs.gdshader b/shaders/pend00-crt-vhs.gdshader deleted file mode 100644 index d659f14..0000000 --- a/shaders/pend00-crt-vhs.gdshader +++ /dev/null @@ -1,231 +0,0 @@ -/* -Shader from Godot Shaders - the free shader library. -godotshaders.com/shader/VHS-and-CRT-monitor-effect - -This shader is under CC0 license. Feel free to use, improve and -change this shader according to your needs and consider sharing -the modified result to godotshaders.com. -*/ - -shader_type canvas_item; -uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap; - -//*** IMPORTANT! ***/ -// - If you are using this shader to affect the node it is applied to set 'overlay' to false (unchecked in the instepctor). -// - If you are using this shader as an overlay, and want the shader to affect the nodes below in the Scene hierarchy, -// set 'overlay' to true (checked in the inspector). -// On Mac there is potentially a bug causing this to not work properly. If that is the case and you want to use the shader as an overlay -// change all "overlay ? SCREEN_TEXTURE : TEXTURE" to only "SCREEN_TEXTURE" on lines 129-140, and "vec2 uv = overlay ? warp(SCREEN_UV) : warp(UV);" -// to "vec2 uv = warp(SCREEN_UV);" on line 98. -uniform bool overlay = false; - -uniform float scanlines_opacity : hint_range(0.0, 1.0) = 0.4; -uniform float scanlines_width : hint_range(0.0, 0.5) = 0.25; -uniform float grille_opacity : hint_range(0.0, 1.0) = 0.3; -uniform vec2 resolution = vec2(640.0, 480.0); // Set the number of rows and columns the texture will be divided in. Scanlines and grille will make a square based on these values - -uniform bool pixelate = true; // Fill each square ("pixel") with a sampled color, creating a pixel look and a more accurate representation of how a CRT monitor would work. - -uniform bool roll = true; -uniform float roll_speed = 8.0; // Positive values are down, negative are up -uniform float roll_size : hint_range(0.0, 100.0) = 15.0; -uniform float roll_variation : hint_range(0.1, 5.0) = 1.8; // This valie is not an exact science. You have to play around with the value to find a look you like. How this works is explained in the code below. -uniform float distort_intensity : hint_range(0.0, 0.2) = 0.05; // The distortion created by the rolling effect. - -uniform float noise_opacity : hint_range(0.0, 1.0) = 0.4; -uniform float noise_speed = 5.0; // There is a movement in the noise pattern that can be hard to see first. This sets the speed of that movement. - -uniform float static_noise_intensity : hint_range(0.0, 1.0) = 0.06; - -uniform float aberration : hint_range(-1.0, 1.0) = 0.03; // Chromatic aberration, a distortion on each color channel. -uniform float brightness = 1.4; // When adding scanline gaps and grille the image can get very dark. Brightness tries to compensate for that. -uniform bool discolor = true; // Add a discolor effect simulating a VHS - -uniform float warp_amount :hint_range(0.0, 5.0) = 1.0; // Warp the texture edges simulating the curved glass of a CRT monitor or old TV. -uniform bool clip_warp = false; - -uniform float vignette_intensity = 0.4; // Size of the vignette, how far towards the middle it should go. -uniform float vignette_opacity : hint_range(0.0, 1.0) = 0.5; - -// Used by the noise functin to generate a pseudo random value between 0.0 and 1.0 -vec2 random(vec2 uv){ - uv = vec2( dot(uv, vec2(127.1,311.7) ), - dot(uv, vec2(269.5,183.3) ) ); - return -1.0 + 2.0 * fract(sin(uv) * 43758.5453123); -} - -// Generate a Perlin noise used by the distortion effects -float noise(vec2 uv) { - vec2 uv_index = floor(uv); - vec2 uv_fract = fract(uv); - - vec2 blur = smoothstep(0.0, 1.0, uv_fract); - - return mix( mix( dot( random(uv_index + vec2(0.0,0.0) ), uv_fract - vec2(0.0,0.0) ), - dot( random(uv_index + vec2(1.0,0.0) ), uv_fract - vec2(1.0,0.0) ), blur.x), - mix( dot( random(uv_index + vec2(0.0,1.0) ), uv_fract - vec2(0.0,1.0) ), - dot( random(uv_index + vec2(1.0,1.0) ), uv_fract - vec2(1.0,1.0) ), blur.x), blur.y) * 0.5 + 0.5; -} - -// Takes in the UV and warps the edges, creating the spherized effect -vec2 warp(vec2 uv){ - vec2 delta = uv - 0.5; - float delta2 = dot(delta.xy, delta.xy); - float delta4 = delta2 * delta2; - float delta_offset = delta4 * warp_amount; - - return uv + delta * delta_offset; -} - -// Adds a black border to hide stretched pixel created by the warp effect -float border (vec2 uv){ - float radius = min(warp_amount, 0.08); - radius = max(min(min(abs(radius * 2.0), abs(1.0)), abs(1.0)), 1e-5); - vec2 abs_uv = abs(uv * 2.0 - 1.0) - vec2(1.0, 1.0) + radius; - float dist = length(max(vec2(0.0), abs_uv)) / radius; - float square = smoothstep(0.96, 1.0, dist); - return clamp(1.0 - square, 0.0, 1.0); -} - -// Adds a vignette shadow to the edges of the image -float vignette(vec2 uv){ - uv *= 1.0 - uv.xy; - float vignette = uv.x * uv.y * 15.0; - return pow(vignette, vignette_intensity * vignette_opacity); -} - -void fragment() -{ - vec2 uv = overlay ? warp(SCREEN_UV) : warp(UV); // Warp the uv. uv will be used in most cases instead of UV to keep the warping - vec2 text_uv = uv; - vec2 roll_uv = vec2(0.0); - float time = roll ? TIME : 0.0; - - - // Pixelate the texture based on the given resolution. - if (pixelate) - { - text_uv = ceil(uv * resolution) / resolution; - } - - // Create the rolling effect. We need roll_line a bit later to make the noise effect. - // That is why this runs if roll is true OR noise_opacity is over 0. - float roll_line = 0.0; - if (roll || noise_opacity > 0.0) - { - // Create the areas/lines where the texture will be distorted. - roll_line = smoothstep(0.3, 0.9, sin(uv.y * roll_size - (time * roll_speed) ) ); - // Create more lines of a different size and apply to the first set of lines. This creates a bit of variation. - roll_line *= roll_line * smoothstep(0.3, 0.9, sin(uv.y * roll_size * roll_variation - (time * roll_speed * roll_variation) ) ); - // Distort the UV where where the lines are - roll_uv = vec2(( roll_line * distort_intensity * (1.-UV.x)), 0.0); - } - - vec4 text; - if (roll) - { - // If roll is true distort the texture with roll_uv. The texture is split up into RGB to - // make some chromatic aberration. We apply the aberration to the red and green channels accorging to the aberration parameter - // and intensify it a bit in the roll distortion. - text.r = texture(SCREEN_TEXTURE, text_uv + roll_uv * 0.8 + vec2(aberration, 0.0) * .1).r; - text.g = texture(SCREEN_TEXTURE, text_uv + roll_uv * 1.2 - vec2(aberration, 0.0) * .1 ).g; - text.b = texture(SCREEN_TEXTURE, text_uv + roll_uv).b; - text.a = 1.0; - } - else - { - // If roll is false only apply the aberration without any distorion. The aberration values are very small so the .1 is only - // to make the slider in the Inspector less sensitive. - text.r = texture(SCREEN_TEXTURE, text_uv + vec2(aberration, 0.0) * .1).r; - text.g = texture(SCREEN_TEXTURE, text_uv - vec2(aberration, 0.0) * .1).g; - text.b = texture(SCREEN_TEXTURE, text_uv).b; - text.a = 1.0; - } - - float r = text.r; - float g = text.g; - float b = text.b; - - uv = warp(UV); - - // CRT monitors don't have pixels but groups of red, green and blue dots or lines, called grille. We isolate the texture's color channels - // and divide it up in 3 offsetted lines to show the red, green and blue colors next to each other, with a small black gap between. - if (grille_opacity > 0.0){ - - float g_r = smoothstep(0.85, 0.95, abs(sin(uv.x * (resolution.x * 3.14159265)))); - r = mix(r, r * g_r, grille_opacity); - - float g_g = smoothstep(0.85, 0.95, abs(sin(1.05 + uv.x * (resolution.x * 3.14159265)))); - g = mix(g, g * g_g, grille_opacity); - - float b_b = smoothstep(0.85, 0.95, abs(sin(2.1 + uv.x * (resolution.x * 3.14159265)))); - b = mix(b, b * b_b, grille_opacity); - - } - - // Apply the grille to the texture's color channels and apply Brightness. Since the grille and the scanlines (below) make the image very dark you - // can compensate by increasing the brightness. - text.r = clamp(r * brightness, 0.0, 1.0); - text.g = clamp(g * brightness, 0.0, 1.0); - text.b = clamp(b * brightness, 0.0, 1.0); - - // Scanlines are the horizontal lines that make up the image on a CRT monitor. - // Here we are actual setting the black gap between each line, which I guess is not the right definition of the word, but you get the idea - float scanlines = 0.5; - if (scanlines_opacity > 0.0) - { - // Same technique as above, create lines with sine and applying it to the texture. Smoothstep to allow setting the line size. - scanlines = smoothstep(scanlines_width, scanlines_width + 0.5, abs(sin(uv.y * (resolution.y * 3.14159265)))); - text.rgb = mix(text.rgb, text.rgb * vec3(scanlines), scanlines_opacity); - } - - // Apply the banded noise. - if (noise_opacity > 0.0) - { - // Generate a noise pattern that is very stretched horizontally, and animate it with noise_speed - float noise = smoothstep(0.4, 0.5, noise(uv * vec2(2.0, 200.0) + vec2(10.0, (TIME * (noise_speed))) ) ); - - // We use roll_line (set above) to define how big the noise should be vertically (multiplying cuts off all black parts). - // We also add in some basic noise with random() to break up the noise pattern above. The noise is sized according to - // the resolution value set in the inspector. If you don't like this look you can - // change "ceil(uv * resolution) / resolution" to only "uv" to make it less pixelated. Or multiply resolution with som value - // greater than 1.0 to make them smaller. - roll_line *= noise * scanlines * clamp(random((ceil(uv * resolution) / resolution) + vec2(TIME * 0.8, 0.0)).x + 0.8, 0.0, 1.0); - // Add it to the texture based on noise_opacity - text.rgb = clamp(mix(text.rgb, text.rgb + roll_line, noise_opacity), vec3(0.0), vec3(1.0)); - } - - // Apply static noise by generating it over the whole screen in the same way as above - if (static_noise_intensity > 0.0) - { - text.rgb += clamp(random((ceil(uv * resolution) / resolution) + fract(TIME)).x, 0.0, 1.0) * static_noise_intensity; - } - - // Apply a black border to hide imperfections caused by the warping. - // Also apply the vignette - text.rgb *= border(uv); - text.rgb *= vignette(uv); - // Hides the black border and make that area transparent. Good if you want to add the the texture on top an image of a TV or monitor. - if (clip_warp) - { - text.a = border(uv); - } - - // Apply discoloration to get a VHS look (lower saturation and higher contrast) - // You can play with the values below or expose them in the Inspector. - float saturation = 0.5; - float contrast = 1.2; - if (discolor) - { - // Saturation - vec3 greyscale = vec3(text.r + text.g + text.b) / 3.; - text.rgb = mix(text.rgb, greyscale, saturation); - - // Contrast - float midpoint = pow(0.5, 2.2); - text.rgb = (text.rgb - vec3(midpoint)) * contrast + midpoint; - } - - COLOR = text; -} -