diff --git a/assets/environment/decor/bent_straw.aseprite b/assets/environment/decor/bent_straw.aseprite new file mode 100644 index 0000000..a34f571 Binary files /dev/null and b/assets/environment/decor/bent_straw.aseprite differ diff --git a/assets/environment/decor/bent_straw.aseprite.import b/assets/environment/decor/bent_straw.aseprite.import new file mode 100644 index 0000000..23e9ee4 --- /dev/null +++ b/assets/environment/decor/bent_straw.aseprite.import @@ -0,0 +1,26 @@ +[remap] + +importer="aseprite.wizard.plugin" +type="SpriteFrames" +path="res://.import/bent_straw.aseprite-e42038488046e460e799823506d46bb8.res" + +[deps] + +source_file="res://assets/environment/decor/bent_straw.aseprite" +dest_files=[ "res://.import/bent_straw.aseprite-e42038488046e460e799823506d46bb8.res" ] + +[params] + +split_layers=false +exclude_layers_pattern="" +only_visible_layers=false +sheet_type="Packed" +sprite_filename_pattern="{basename}.{layer}.{extension}" +texture_strip/import_texture_strip=false +texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}" +texture_atlas/import_texture_atlas=false +texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}" +texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}" +animated_texture/import_animated_texture=false +animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}" +animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}" diff --git a/assets/environment/decor/bent_straw.png b/assets/environment/decor/bent_straw.png new file mode 100644 index 0000000..3bd5bba Binary files /dev/null and b/assets/environment/decor/bent_straw.png differ diff --git a/assets/environment/decor/bent_straw.png.import b/assets/environment/decor/bent_straw.png.import new file mode 100644 index 0000000..37f0f9f --- /dev/null +++ b/assets/environment/decor/bent_straw.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/bent_straw.png-34af1874e71c7c7b0749bdc0374dc29d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/environment/decor/bent_straw.png" +dest_files=[ "res://.import/bent_straw.png-34af1874e71c7c7b0749bdc0374dc29d.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/environment/decor/short_straw.aseprite b/assets/environment/decor/short_straw.aseprite new file mode 100644 index 0000000..e9764d8 Binary files /dev/null and b/assets/environment/decor/short_straw.aseprite differ diff --git a/assets/environment/decor/short_straw.aseprite.import b/assets/environment/decor/short_straw.aseprite.import new file mode 100644 index 0000000..c41bef8 --- /dev/null +++ b/assets/environment/decor/short_straw.aseprite.import @@ -0,0 +1,26 @@ +[remap] + +importer="aseprite.wizard.plugin" +type="SpriteFrames" +path="res://.import/short_straw.aseprite-dc5d8347b9d6d5e161cbd2f672a5b8c7.res" + +[deps] + +source_file="res://assets/environment/decor/short_straw.aseprite" +dest_files=[ "res://.import/short_straw.aseprite-dc5d8347b9d6d5e161cbd2f672a5b8c7.res" ] + +[params] + +split_layers=false +exclude_layers_pattern="" +only_visible_layers=false +sheet_type="Packed" +sprite_filename_pattern="{basename}.{layer}.{extension}" +texture_strip/import_texture_strip=false +texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}" +texture_atlas/import_texture_atlas=false +texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}" +texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}" +animated_texture/import_animated_texture=false +animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}" +animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}" diff --git a/assets/environment/decor/short_straw.png b/assets/environment/decor/short_straw.png new file mode 100644 index 0000000..ac1b640 Binary files /dev/null and b/assets/environment/decor/short_straw.png differ diff --git a/assets/environment/decor/short_straw.png.import b/assets/environment/decor/short_straw.png.import new file mode 100644 index 0000000..653b118 --- /dev/null +++ b/assets/environment/decor/short_straw.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/short_straw.png-74a4a080ce5e7e7272200d0d4a93bc94.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/environment/decor/short_straw.png" +dest_files=[ "res://.import/short_straw.png-74a4a080ce5e7e7272200d0d4a93bc94.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/assets/environment/decor/straight_straw.aseprite b/assets/environment/decor/straight_straw.aseprite new file mode 100644 index 0000000..1ac201a Binary files /dev/null and b/assets/environment/decor/straight_straw.aseprite differ diff --git a/assets/environment/decor/straight_straw.aseprite.import b/assets/environment/decor/straight_straw.aseprite.import new file mode 100644 index 0000000..5a0c443 --- /dev/null +++ b/assets/environment/decor/straight_straw.aseprite.import @@ -0,0 +1,26 @@ +[remap] + +importer="aseprite.wizard.plugin" +type="SpriteFrames" +path="res://.import/straight_straw.aseprite-95acb695229b4f32fa48786e91411e1d.res" + +[deps] + +source_file="res://assets/environment/decor/straight_straw.aseprite" +dest_files=[ "res://.import/straight_straw.aseprite-95acb695229b4f32fa48786e91411e1d.res" ] + +[params] + +split_layers=false +exclude_layers_pattern="" +only_visible_layers=false +sheet_type="Packed" +sprite_filename_pattern="{basename}.{layer}.{extension}" +texture_strip/import_texture_strip=false +texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}" +texture_atlas/import_texture_atlas=false +texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}" +texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}" +animated_texture/import_animated_texture=false +animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}" +animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}" diff --git a/assets/environment/decor/straight_straw.png b/assets/environment/decor/straight_straw.png new file mode 100644 index 0000000..8240ce5 Binary files /dev/null and b/assets/environment/decor/straight_straw.png differ diff --git a/assets/environment/decor/straight_straw.png.import b/assets/environment/decor/straight_straw.png.import new file mode 100644 index 0000000..6fb104f --- /dev/null +++ b/assets/environment/decor/straight_straw.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/straight_straw.png-de19826f989d2481c31d92ac559e94ef.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/environment/decor/straight_straw.png" +dest_files=[ "res://.import/straight_straw.png-de19826f989d2481c31d92ac559e94ef.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/Autoload/PlayerData.gd b/src/Autoload/PlayerData.gd index 98cc33e..d4948f3 100644 --- a/src/Autoload/PlayerData.gd +++ b/src/Autoload/PlayerData.gd @@ -11,6 +11,7 @@ func reset() -> void: score = 0 deaths = 0 +#TODO Remove score func set_score(value: int) -> void: score = value emit_signal("score_updated") diff --git a/src/Environment/GrassWithBonesTest.tscn b/src/Environment/GrassWithBonesTest.tscn new file mode 100644 index 0000000..25a3458 --- /dev/null +++ b/src/Environment/GrassWithBonesTest.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/environment/decor/straight_straw.png" type="Texture" id=1] + +[node name="GrassWithBones" type="Node2D"] + +[node name="Polygon2D" type="Polygon2D" parent="."] +offset = Vector2( -6.5, -12.5 ) +texture = ExtResource( 1 ) +skeleton = NodePath("../Skeleton2D") +polygon = PoolVector2Array( 4.166, 12.5, 4.166, 7.25, 4.166, 1.5, 9.103, 1.5, 9.10325, 7.25, 9.103, 12.5 ) +uv = PoolVector2Array( 4.166, 12.5, 4.166, 7.25, 4.166, 1.5, 9.103, 1.5, 9.10325, 7.25, 9.103, 12.5 ) +polygons = [ PoolIntArray( 5, 0, 1, 2, 3, 4 ) ] +bones = [ "Base", PoolRealArray( 1, 0.34, 0, 0, 0, 1 ), "Base/Mid", PoolRealArray( 0.66, 1, 0, 0.5, 1, 0.83 ), "Base/Mid/Top", PoolRealArray( 0.49, 0.32, 1, 1, 0.49, 0.49 ) ] + +[node name="Skeleton2D" type="Skeleton2D" parent="."] + +[node name="Base" type="Bone2D" parent="Skeleton2D"] +rest = Transform2D( 1, 0, 0, 1, 0, 0 ) +default_length = 7.0 + +[node name="Mid" type="Bone2D" parent="Skeleton2D/Base"] +rest = Transform2D( 1, 0, 0, 1, 0, 0 ) +default_length = 7.0 + +[node name="Top" type="Bone2D" parent="Skeleton2D/Base/Mid"] +position = Vector2( 0, -5 ) +rotation = -1.5708 +rest = Transform2D( 2.22127e-06, -1, 1, 2.22127e-06, 0, -5 ) +default_length = 4.0 diff --git a/src/Environment/ShaderGrass.gd b/src/Environment/ShaderGrass.gd new file mode 100644 index 0000000..772f5eb --- /dev/null +++ b/src/Environment/ShaderGrass.gd @@ -0,0 +1,76 @@ +extends Node2D + +onready var blobby = get_node("../Blobby") + +var last_distance: Vector2 = Vector2(100,100) + +# TODO Incorporate other enteties and highlight mass differences +var time = 0 +var radius = 15 +var v_radius = 15 +var draft_radius = 20 +var interact_power = 0.04 +var rand = rand_range(1,1.2) +var displacement_coeff: Vector2 = Vector2(1.0,0) +var saved_displacement +var is_idle_swinging +var start_swing_time +var begin_idle + +func _ready(): + # TODO This could probably fuck something up later? For other randomness based events + randomize() + +func _physics_process(delta: float) -> void: + var distance: float = abs(global_position.x - blobby.global_position.x + 6) + var v_distance: float = abs(global_position.y - blobby.global_position.y + 11) + var blobby_vel = (last_distance.x - distance)/delta + var blobby_v_vel = (last_distance.y - v_distance)/delta + var direction: Vector2 = Vector2(sign(global_position.x - blobby.global_position.x + 6),0) + # TODO This only gets more and more unreadable *facepalm* + var power = smoothstep(radius, 0, distance) + var v_power = smoothstep(v_radius, 0, v_distance) + var draft_power = smoothstep(draft_radius, radius, distance) + + if (distance >= radius && distance <= draft_radius && blobby_vel < -0.1 && v_distance < 14): + displacement_coeff += direction * (draft_power/radius) * blobby_vel * interact_power + saved_displacement = displacement_coeff.x + is_idle_swinging = false + $Timer.stop() + + # TODO v_distance could be a problem for upside down stuff + elif (distance < radius && distance > 1 && blobby_vel != 0 && v_distance < 14 && blobby_v_vel ==0): + displacement_coeff += direction * power/radius * 0.3 * blobby_vel * interact_power + displacement_coeff += direction * power * 2 * interact_power + saved_displacement = displacement_coeff.x + is_idle_swinging = false + $Timer.stop() + + elif (v_distance < v_radius && distance < radius && blobby_v_vel != 0): + displacement_coeff += direction * v_power/v_radius * blobby_v_vel * interact_power + saved_displacement = displacement_coeff.x + is_idle_swinging = false + $Timer.stop() + + else: + if(abs(displacement_coeff.x) > 0.1 && !is_idle_swinging || !$Timer.is_stopped()): + if($Timer.is_stopped()): + saved_displacement = displacement_coeff.x + $Timer.start() + var t = $Timer.get_wait_time() - $Timer.get_time_left() + displacement_coeff.x = saved_displacement * exp(-0.66 * t) * cos(t * 3.0 * rand) + start_swing_time = time + begin_idle = true + else: + $Timer.stop() + is_idle_swinging = true + var start = displacement_coeff.x if begin_idle else 0.0 + displacement_coeff.x = start * exp(-0.2 * (time-start_swing_time)) + 0.3 * -sin(2.0*(time - start_swing_time)) + begin_idle = false + + for polygon in get_children(): + if polygon is Polygon2D: + polygon.material.set_shader_param("displacement_coefficient_x", displacement_coeff.x) + + last_distance = Vector2(distance, v_distance) + time += delta diff --git a/src/Environment/ShaderGrass.gdshader b/src/Environment/ShaderGrass.gdshader new file mode 100644 index 0000000..c7fb7a4 --- /dev/null +++ b/src/Environment/ShaderGrass.gdshader @@ -0,0 +1,8 @@ +shader_type canvas_item; + +uniform float displacement_coefficient_x; + + +void vertex() { + VERTEX += vec2(displacement_coefficient_x,0.0) * (1.0 - UV.y); +} \ No newline at end of file diff --git a/src/Environment/ShaderGrass.tres b/src/Environment/ShaderGrass.tres new file mode 100644 index 0000000..ae2d25f --- /dev/null +++ b/src/Environment/ShaderGrass.tres @@ -0,0 +1,8 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=2] + +[ext_resource path="res://src/Environment/ShaderGrass.gdshader" type="Shader" id=1] + +[resource] +resource_local_to_scene = true +shader = ExtResource( 1 ) +shader_param/displacement_coefficient_x = 0.0 diff --git a/src/Environment/ShaderGrass.tscn b/src/Environment/ShaderGrass.tscn new file mode 100644 index 0000000..355d2c6 --- /dev/null +++ b/src/Environment/ShaderGrass.tscn @@ -0,0 +1,68 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://src/Environment/ShaderGrass.gd" type="Script" id=2] +[ext_resource path="res://src/Environment/ShaderGrass.tres" type="Material" id=3] + +[sub_resource type="StreamTexture" id=3] +load_path = "res://.import/short_straw.png-74a4a080ce5e7e7272200d0d4a93bc94.stex" + +[sub_resource type="StreamTexture" id=17] +load_path = "res://.import/short_straw.png-74a4a080ce5e7e7272200d0d4a93bc94.stex" + +[sub_resource type="StreamTexture" id=18] +load_path = "res://.import/bent_straw.png-34af1874e71c7c7b0749bdc0374dc29d.stex" + +[sub_resource type="StreamTexture" id=9] +load_path = "res://.import/bent_straw.png-34af1874e71c7c7b0749bdc0374dc29d.stex" + +[sub_resource type="StreamTexture" id=2] +load_path = "res://.import/straight_straw.png-de19826f989d2481c31d92ac559e94ef.stex" + +[node name="ShaderGrass" type="Node2D"] +script = ExtResource( 2 ) + +[node name="ShortStrawPolygon2" type="Polygon2D" parent="."] +material = ExtResource( 3 ) +position = Vector2( -2.30669, 0 ) +texture = SubResource( 3 ) +polygon = PoolVector2Array( 4.8599, 12.1162, 4.84375, 7.21094, 4.91575, 2.9375, 5.84277, 2.85904, 5.84375, 1.88281, 6.96094, 1.90625, 6.999, 2.89845, 7.97825, 2.9375, 7.98438, 7.09375, 7.98528, 12.1279 ) +uv = PoolVector2Array( 4.47825, 12.125, 4.35325, 7.25, 4.41575, 2.6875, 5.66575, 2.5625, 5.66575, 1.3125, 7.16575, 1.3125, 7.22825, 2.5625, 8.54075, 2.625, 8.54075, 7.1875, 8.47825, 12.3125 ) +polygons = [ PoolIntArray( 0, 9, 1 ), PoolIntArray( 8, 1, 9 ), PoolIntArray( 8, 2, 1 ), PoolIntArray( 8, 2, 3, 4, 5, 6, 7 ) ] + +[node name="ShortStrawPolygon3" type="Polygon2D" parent="."] +material = ExtResource( 3 ) +position = Vector2( 1.24897, 0.113895 ) +texture = SubResource( 17 ) +polygon = PoolVector2Array( 4.8599, 12.1162, 4.84375, 7.21094, 4.91575, 2.9375, 5.84277, 2.85904, 5.84375, 1.88281, 6.96094, 1.90625, 6.999, 2.89845, 7.97825, 2.9375, 7.98438, 7.09375, 7.98528, 12.1279 ) +uv = PoolVector2Array( 4.47825, 12.125, 4.35325, 7.25, 4.41575, 2.6875, 5.66575, 2.5625, 5.66575, 1.3125, 7.16575, 1.3125, 7.22825, 2.5625, 8.54075, 2.625, 8.54075, 7.1875, 8.47825, 12.3125 ) +polygons = [ PoolIntArray( 0, 9, 1 ), PoolIntArray( 8, 1, 9 ), PoolIntArray( 8, 2, 1 ), PoolIntArray( 8, 2, 3, 4, 5, 6, 7 ) ] + +[node name="BentStrawPolygon" type="Polygon2D" parent="."] +material = ExtResource( 3 ) +position = Vector2( 6.58748, 0.206984 ) +texture = SubResource( 18 ) +polygon = PoolVector2Array( 1.00644, 12.0961, 1.03124, 8.84688, 2.2466, 7.82995, 4.05723, 5.74649, 5.89266, 5.69688, 7.8273, 5.79609, 8.47219, 6.21775, 8.4375, 7.4375, 5.49581, 9.39255, 4.03242, 12.0465 ) +uv = PoolVector2Array( 0.562501, 11.875, 0.875001, 8.5625, 2.25, 6.375, 4.5, 3.9375, 6.125, 3.1875, 8.25, 3.5, 9.0625, 4.4375, 9.1875, 6.3125, 6.125, 9.25, 4.5625, 11.875 ) +polygons = [ PoolIntArray( 0, 9, 1 ), PoolIntArray( 8, 1, 9 ), PoolIntArray( 8, 2, 1 ), PoolIntArray( 8, 2, 3, 4, 5, 6, 7 ) ] + +[node name="BentStrawInversePolygon" type="Polygon2D" parent="."] +visible = false +material = ExtResource( 3 ) +position = Vector2( 5.15028, 0.0923641 ) +scale = Vector2( -0.807856, 1 ) +texture = SubResource( 9 ) +polygon = PoolVector2Array( 1.00644, 12.0961, 1.03124, 8.84688, 2.2466, 7.82995, 4.05723, 5.74649, 5.89266, 5.69688, 7.8273, 5.79609, 8.47219, 6.21775, 8.4375, 7.4375, 5.49581, 9.39255, 4.03242, 12.0465 ) +uv = PoolVector2Array( 0.562501, 11.875, 0.875001, 8.5625, 2.25, 6.375, 4.5, 3.9375, 6.125, 3.1875, 8.25, 3.5, 9.0625, 4.4375, 9.1875, 6.3125, 6.125, 9.25, 4.5625, 11.875 ) +polygons = [ PoolIntArray( 0, 9, 1 ), PoolIntArray( 8, 1, 9 ), PoolIntArray( 8, 2, 1 ), PoolIntArray( 8, 2, 3, 4, 5, 6, 7 ) ] + +[node name="StraigtStrawPolygon" type="Polygon2D" parent="."] +material = ExtResource( 3 ) +position = Vector2( -0.57621, 0.03125 ) +texture = SubResource( 2 ) +polygon = PoolVector2Array( 4.8599, 12.1162, 4.84375, 7.21094, 4.91575, 2.9375, 5.84277, 2.85904, 5.84375, 1.88281, 6.96094, 1.90625, 6.999, 2.89845, 7.97825, 2.9375, 7.98438, 7.09375, 7.98528, 12.1279 ) +uv = PoolVector2Array( 4.47825, 12.125, 4.35325, 7.25, 4.41575, 2.6875, 5.66575, 2.5625, 5.66575, 1.3125, 7.16575, 1.3125, 7.22825, 2.5625, 8.54075, 2.625, 8.54075, 7.1875, 8.47825, 12.3125 ) +polygons = [ PoolIntArray( 0, 9, 1 ), PoolIntArray( 8, 1, 9 ), PoolIntArray( 8, 2, 1 ), PoolIntArray( 8, 2, 3, 4, 5, 6, 7 ) ] + +[node name="Timer" type="Timer" parent="."] +wait_time = 4.0 +one_shot = true diff --git a/src/Environment/ShaderGrassInverse.gdshader b/src/Environment/ShaderGrassInverse.gdshader new file mode 100644 index 0000000..85f9f29 --- /dev/null +++ b/src/Environment/ShaderGrassInverse.gdshader @@ -0,0 +1,16 @@ +shader_type canvas_item; + +uniform vec2 player_pos = vec2(0); +uniform vec2 world_offset = vec2(0); +uniform float interact_power = 8; +uniform float radius = 30; + +void vertex() { + vec2 world_vert = VERTEX + world_offset; // model space to world space + vec2 direction = world_vert - player_pos; + direction.y = 0.0; + direction = normalize(direction); + float dist = distance(player_pos, world_vert); + float power = smoothstep(radius, 0.0, dist); + VERTEX -= direction * power * interact_power * (1.0 - UV.y); +} \ No newline at end of file diff --git a/src/Levels/TLT Level.tscn b/src/Levels/01 Level.tscn similarity index 99% rename from src/Levels/TLT Level.tscn rename to src/Levels/01 Level.tscn index a3f9661..6d86500 100644 --- a/src/Levels/TLT Level.tscn +++ b/src/Levels/01 Level.tscn @@ -8,7 +8,7 @@ [ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=6] [ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7] [ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=8] -[ext_resource path="res://src/Levels/Enemy Test Level.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/Levels/Grass Test Level.tscn" type="PackedScene" id=9] [ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=10] [sub_resource type="AnimationNodeStateMachinePlayback" id=4] diff --git a/src/Levels/Grass Test Level.tscn b/src/Levels/Grass Test Level.tscn new file mode 100644 index 0000000..2ba8cf7 --- /dev/null +++ b/src/Levels/Grass Test Level.tscn @@ -0,0 +1,333 @@ +[gd_scene load_steps=12 format=2] + +[ext_resource path="res://src/Environment/AlienShipTileSet.tres" type="TileSet" id=1] +[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/Environment/ShaderGrass.tscn" type="PackedScene" id=3] +[ext_resource path="res://src/Contraptions/Triggers/ElevatorButton.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/NeutralObjects/Coin.tscn" type="PackedScene" id=6] +[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=7] +[ext_resource path="res://src/Contraptions/Triggers/ThreeWhyButtons.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/Levels/Enemy Test Level.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/Utilities/GameplaySignalManager.gd" type="Script" id=10] + +[sub_resource type="AnimationNodeStateMachinePlayback" id=4] + +[node name="LevelTemplate" type="Node2D"] +__meta__ = { +"_edit_horizontal_guides_": [ 464.0 ], +"_edit_vertical_guides_": [ 2880.0 ] +} + +[node name="UserInterface" parent="." instance=ExtResource( 7 )] + +[node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] +wait_time = 20.0 + +[node name="PauseScreen" parent="UserInterface" index="1"] +margin_left = 3.15372 +margin_top = 0.456848 +margin_right = 3.15375 +margin_bottom = 0.456848 + +[node name="Blobby" parent="." instance=ExtResource( 2 )] +position = Vector2( 71.0069, 335.293 ) +scale = Vector2( 0.878906, 0.936025 ) + +[node name="AnimationTree" parent="Blobby/BlobbySprite" index="0"] +parameters/playback = SubResource( 4 ) + +[node name="Collectibles" type="Node2D" parent="."] +visible = false + +[node name="Coin" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 336, -60 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin2" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 324, -11 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin3" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 1188, -84 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin4" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 1236, -108 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin5" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 1140, -108 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="Coin6" parent="Collectibles" instance=ExtResource( 6 )] +position = Vector2( 696, -48 ) +scale = Vector2( 0.133, 0.133 ) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +cell_size = Vector2( 24, 24 ) +cell_quadrant_size = 3 +cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 ) +collision_layer = 8 +collision_mask = 8 +format = 1 +tile_data = PoolIntArray( 655360, 2, 0, 655361, 2, 0, 655362, 2, 0, 655363, 2, 0, 655364, 2, 0, 655365, 2, 0, 655366, 2, 0, 655367, 2, 0, 655368, 2, 0, 720896, 2, 0, 720904, 2, 0, 786432, 2, 0, 786440, 2, 0, 851968, 2, 0, 851976, 2, 0, 917504, 2, 0, 917505, 2, 0, 917506, 2, 0, 917507, 2, 0, 917508, 2, 0, 917509, 2, 0, 917510, 2, 0, 917511, 2, 0, 917512, 2, 0 ) + +[node name="TreeWhyButtons" parent="." instance=ExtResource( 8 )] +visible = false +position = Vector2( -108, -7 ) + +[node name="WhyButton1" parent="TreeWhyButtons" index="0"] +position = Vector2( -12, -49 ) +rotation = 1.5708 + +[node name="WhyButton2" parent="TreeWhyButtons" index="1"] +position = Vector2( 444, -17 ) +rotation = 3.14159 + +[node name="WhyButton3" parent="TreeWhyButtons" index="2"] +position = Vector2( 1452, -77 ) +rotation = -1.5708 + +[node name="ElevatorButton" parent="." instance=ExtResource( 4 )] +visible = false +position = Vector2( 1452, -96 ) + +[node name="Portal" parent="ElevatorButton" instance=ExtResource( 5 )] +visible = false +position = Vector2( -1464, 84 ) +monitoring = false +next_scene = ExtResource( 9 ) + +[node name="GameplaySignalManager" type="Node2D" parent="."] +script = ExtResource( 10 ) + +[node name="ShaderGrass" parent="." instance=ExtResource( 3 )] +position = Vector2( 94.3273, 323.897 ) +z_index = -1 + +[node name="ShaderGrass2" parent="." instance=ExtResource( 3 )] +position = Vector2( 97.7583, 323.726 ) + +[node name="ShaderGrass3" parent="." instance=ExtResource( 3 )] +position = Vector2( 103.443, 323.813 ) + +[node name="ShaderGrass4" parent="." instance=ExtResource( 3 )] +position = Vector2( 99.556, 322.393 ) +z_index = -1 + +[node name="ShaderGrass5" parent="." instance=ExtResource( 3 )] +position = Vector2( 107.485, 323.87 ) + +[node name="ShaderGrass6" parent="." instance=ExtResource( 3 )] +position = Vector2( 104.781, 322.084 ) +z_index = -1 + +[node name="ShaderGrass7" parent="." instance=ExtResource( 3 )] +position = Vector2( 118.829, 323.704 ) + +[node name="ShaderGrass8" parent="." instance=ExtResource( 3 )] +position = Vector2( 112.732, 323.918 ) + +[node name="ShaderGrass9" parent="." instance=ExtResource( 3 )] +position = Vector2( 110.33, 321.607 ) +z_index = -1 + +[node name="ShaderGrass10" parent="." instance=ExtResource( 3 )] +position = Vector2( 122.514, 323.848 ) +z_index = -1 + +[node name="ShaderGrass11" parent="." instance=ExtResource( 3 )] +position = Vector2( 125.945, 323.677 ) + +[node name="ShaderGrass12" parent="." instance=ExtResource( 3 )] +position = Vector2( 131.629, 323.764 ) + +[node name="ShaderGrass13" parent="." instance=ExtResource( 3 )] +position = Vector2( 127.742, 322.345 ) +z_index = -1 + +[node name="ShaderGrass14" parent="." instance=ExtResource( 3 )] +position = Vector2( 135.671, 323.821 ) + +[node name="ShaderGrass15" parent="." instance=ExtResource( 3 )] +position = Vector2( 132.967, 322.035 ) +z_index = -1 + +[node name="ShaderGrass16" parent="." instance=ExtResource( 3 )] +position = Vector2( 147.015, 323.655 ) + +[node name="ShaderGrass17" parent="." instance=ExtResource( 3 )] +position = Vector2( 140.918, 323.869 ) + +[node name="ShaderGrass18" parent="." instance=ExtResource( 3 )] +position = Vector2( 138.516, 321.559 ) +z_index = -1 + +[node name="ShaderGrass19" parent="." instance=ExtResource( 3 )] +position = Vector2( 149.723, 323.897 ) +z_index = -1 + +[node name="ShaderGrass20" parent="." instance=ExtResource( 3 )] +position = Vector2( 153.154, 323.726 ) + +[node name="ShaderGrass21" parent="." instance=ExtResource( 3 )] +position = Vector2( 158.839, 323.813 ) + +[node name="ShaderGrass22" parent="." instance=ExtResource( 3 )] +position = Vector2( 154.952, 322.393 ) +z_index = -1 + +[node name="ShaderGrass23" parent="." instance=ExtResource( 3 )] +position = Vector2( 162.881, 323.87 ) + +[node name="ShaderGrass24" parent="." instance=ExtResource( 3 )] +position = Vector2( 160.177, 322.084 ) +z_index = -1 + +[node name="ShaderGrass25" parent="." instance=ExtResource( 3 )] +position = Vector2( 174.225, 323.704 ) + +[node name="ShaderGrass26" parent="." instance=ExtResource( 3 )] +position = Vector2( 168.128, 323.918 ) + +[node name="ShaderGrass27" parent="." instance=ExtResource( 3 )] +position = Vector2( 165.726, 321.607 ) +z_index = -1 + +[node name="ShaderGrass28" parent="." instance=ExtResource( 3 )] +position = Vector2( 64.794, 323.73 ) +z_index = -1 + +[node name="ShaderGrass29" parent="." instance=ExtResource( 3 )] +position = Vector2( 68.225, 323.559 ) + +[node name="ShaderGrass30" parent="." instance=ExtResource( 3 )] +position = Vector2( 73.9096, 323.646 ) + +[node name="ShaderGrass31" parent="." instance=ExtResource( 3 )] +position = Vector2( 70.0227, 322.227 ) +z_index = -1 + +[node name="ShaderGrass32" parent="." instance=ExtResource( 3 )] +position = Vector2( 77.9516, 323.703 ) + +[node name="ShaderGrass33" parent="." instance=ExtResource( 3 )] +position = Vector2( 75.2476, 321.917 ) +z_index = -1 + +[node name="ShaderGrass34" parent="." instance=ExtResource( 3 )] +position = Vector2( 89.2956, 323.538 ) + +[node name="ShaderGrass35" parent="." instance=ExtResource( 3 )] +position = Vector2( 83.1986, 323.751 ) + +[node name="ShaderGrass36" parent="." instance=ExtResource( 3 )] +position = Vector2( 80.7966, 321.441 ) +z_index = -1 + +[node name="ShaderGrass37" parent="." instance=ExtResource( 3 )] +position = Vector2( 39.2652, 323.564 ) +z_index = -1 + +[node name="ShaderGrass38" parent="." instance=ExtResource( 3 )] +position = Vector2( 42.6962, 323.393 ) + +[node name="ShaderGrass39" parent="." instance=ExtResource( 3 )] +position = Vector2( 48.3808, 323.48 ) + +[node name="ShaderGrass40" parent="." instance=ExtResource( 3 )] +position = Vector2( 44.4939, 322.06 ) +z_index = -1 + +[node name="ShaderGrass41" parent="." instance=ExtResource( 3 )] +position = Vector2( 52.4228, 323.537 ) + +[node name="ShaderGrass42" parent="." instance=ExtResource( 3 )] +position = Vector2( 49.7188, 321.751 ) +z_index = -1 + +[node name="ShaderGrass43" parent="." instance=ExtResource( 3 )] +position = Vector2( 63.7668, 323.371 ) + +[node name="ShaderGrass44" parent="." instance=ExtResource( 3 )] +position = Vector2( 57.6698, 323.585 ) + +[node name="ShaderGrass45" parent="." instance=ExtResource( 3 )] +position = Vector2( 55.2678, 321.274 ) +z_index = -1 + +[node name="ShaderGrass46" parent="." instance=ExtResource( 3 )] +position = Vector2( 17.2403, 323.73 ) +z_index = -1 + +[node name="ShaderGrass47" parent="." instance=ExtResource( 3 )] +position = Vector2( 20.6713, 323.559 ) + +[node name="ShaderGrass48" parent="." instance=ExtResource( 3 )] +position = Vector2( 26.3559, 323.646 ) + +[node name="ShaderGrass49" parent="." instance=ExtResource( 3 )] +position = Vector2( 22.469, 322.227 ) +z_index = -1 + +[node name="ShaderGrass50" parent="." instance=ExtResource( 3 )] +position = Vector2( 30.3979, 323.703 ) + +[node name="ShaderGrass51" parent="." instance=ExtResource( 3 )] +position = Vector2( 27.6939, 321.917 ) +z_index = -1 + +[node name="ShaderGrass52" parent="." instance=ExtResource( 3 )] +position = Vector2( 41.7419, 323.538 ) + +[node name="ShaderGrass53" parent="." instance=ExtResource( 3 )] +position = Vector2( 35.6449, 323.751 ) + +[node name="ShaderGrass54" parent="." instance=ExtResource( 3 )] +position = Vector2( 33.2429, 321.441 ) +z_index = -1 + +[node name="ShaderGrass55" parent="." instance=ExtResource( 3 )] +position = Vector2( 166.242, 323.73 ) +z_index = -1 + +[node name="ShaderGrass56" parent="." instance=ExtResource( 3 )] +position = Vector2( 169.673, 323.559 ) + +[node name="ShaderGrass57" parent="." instance=ExtResource( 3 )] +position = Vector2( 175.357, 323.646 ) + +[node name="ShaderGrass58" parent="." instance=ExtResource( 3 )] +position = Vector2( 171.471, 322.227 ) +z_index = -1 + +[node name="ShaderGrass59" parent="." instance=ExtResource( 3 )] +position = Vector2( 179.399, 323.703 ) + +[node name="ShaderGrass60" parent="." instance=ExtResource( 3 )] +position = Vector2( 176.695, 321.917 ) +z_index = -1 + +[node name="ShaderGrass61" parent="." instance=ExtResource( 3 )] +position = Vector2( 190.743, 323.538 ) + +[node name="ShaderGrass62" parent="." instance=ExtResource( 3 )] +position = Vector2( 184.646, 323.751 ) + +[node name="ShaderGrass63" parent="." instance=ExtResource( 3 )] +position = Vector2( 182.244, 321.441 ) +z_index = -1 + +[connection signal="timeout" from="UserInterface/HUD/HUDOverlay/GetBackTimer/Timer" to="GameplaySignalManager" method="_on_Timer_timeout"] +[connection signal="getback_timer_up" from="GameplaySignalManager" to="Blobby" method="_on_GameplaySignalManager_getback_timer_up"] +[connection signal="terminal_activated" from="GameplaySignalManager" to="UserInterface/HUD" method="_on_SignalManager_terminal_activated"] + +[editable path="UserInterface"] +[editable path="UserInterface/HUD"] +[editable path="Blobby"] +[editable path="TreeWhyButtons"] +[editable path="TreeWhyButtons/WhyButton1"] +[editable path="TreeWhyButtons/WhyButton2"] +[editable path="TreeWhyButtons/WhyButton3"] diff --git a/src/UserInterface/Screens/MainScreen.tscn b/src/UserInterface/Screens/MainScreen.tscn index a23dffb..6178eab 100644 --- a/src/UserInterface/Screens/MainScreen.tscn +++ b/src/UserInterface/Screens/MainScreen.tscn @@ -52,7 +52,7 @@ size_flags_horizontal = 3 [node name="PlayButton" parent="MenuContainer/Buttons" instance=ExtResource( 3 )] margin_right = 296.0 margin_bottom = 48.0 -next_scene_path = "res://src/Levels/Enemy Test Level.tscn" +next_scene_path = "res://src/Levels/01 Level.tscn" [node name="QuitButton" parent="MenuContainer/Buttons" instance=ExtResource( 1 )] anchor_left = 0.0