diff --git a/assets/blobby/fall/neu-blobby-falllose_altitude.aseprite b/assets/blobby/fall/neu-blobby-falllose_altitude.aseprite deleted file mode 100644 index deb32b1..0000000 Binary files a/assets/blobby/fall/neu-blobby-falllose_altitude.aseprite and /dev/null differ diff --git a/assets/blobby/fall/neu-blobby-falllose_altitude.aseprite.import b/assets/blobby/fall/neu-blobby-falllose_altitude.aseprite.import deleted file mode 100644 index 074eac3..0000000 --- a/assets/blobby/fall/neu-blobby-falllose_altitude.aseprite.import +++ /dev/null @@ -1,26 +0,0 @@ -[remap] - -importer="aseprite.wizard.plugin" -type="SpriteFrames" -path="res://.import/neu-blobby-falllose_altitude.aseprite-5026cd44477475935af029c69cb83a32.res" - -[deps] - -source_file="res://assets/blobby/fall/neu-blobby-falllose_altitude.aseprite" -dest_files=[ "res://.import/neu-blobby-falllose_altitude.aseprite-5026cd44477475935af029c69cb83a32.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/blobby/jump/neu-blobby-jumpgain_altitude.aseprite b/assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite deleted file mode 100644 index fd690af..0000000 Binary files a/assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite and /dev/null differ diff --git a/assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite.import b/assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite.import deleted file mode 100644 index 0266efb..0000000 --- a/assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite.import +++ /dev/null @@ -1,26 +0,0 @@ -[remap] - -importer="aseprite.wizard.plugin" -type="SpriteFrames" -path="res://.import/neu-blobby-jumpgain_altitude.aseprite-d3e743388ba919f7b0dd56646d0f0fe2.res" - -[deps] - -source_file="res://assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite" -dest_files=[ "res://.import/neu-blobby-jumpgain_altitude.aseprite-d3e743388ba919f7b0dd56646d0f0fe2.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/enemy/froshler.png b/assets/enemy/froshler.png new file mode 100644 index 0000000..1ff518f Binary files /dev/null and b/assets/enemy/froshler.png differ diff --git a/assets/enemy/froshler.png.import b/assets/enemy/froshler.png.import new file mode 100644 index 0000000..cfcdd35 --- /dev/null +++ b/assets/enemy/froshler.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/froshler.png-b5007c288ea8ddd41007b585e714e1e2.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/enemy/froshler.png" +dest_files=[ "res://.import/froshler.png-b5007c288ea8ddd41007b585e714e1e2.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/blocks/Empty-Navigation-Tile.png b/assets/environment/blocks/Empty-Navigation-Tile.png new file mode 100644 index 0000000..f00a0a7 Binary files /dev/null and b/assets/environment/blocks/Empty-Navigation-Tile.png differ diff --git a/assets/environment/blocks/Empty-Navigation-Tile.png.import b/assets/environment/blocks/Empty-Navigation-Tile.png.import new file mode 100644 index 0000000..871119f --- /dev/null +++ b/assets/environment/blocks/Empty-Navigation-Tile.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Empty-Navigation-Tile.png-0cba4cda892195959da33a13ae3d0b57.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/environment/blocks/Empty-Navigation-Tile.png" +dest_files=[ "res://.import/Empty-Navigation-Tile.png-0cba4cda892195959da33a13ae3d0b57.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/Actors/Blobby/Blobby.tscn b/src/Actors/Blobby/Blobby.tscn index 4401f7f..ed4fc2a 100644 --- a/src/Actors/Blobby/Blobby.tscn +++ b/src/Actors/Blobby/Blobby.tscn @@ -285,7 +285,7 @@ states/wallsliding/node = SubResource( 96 ) states/wallsliding/position = Vector2( 1795.54, 493.009 ) transitions = [ "falling", "wallsliding", SubResource( 138 ), "wallsliding", "idling", SubResource( 139 ), "wallsliding", "wallslideToJump", SubResource( 140 ), "wallslideToJump", "jumping", SubResource( 141 ), "idling", "jumping", SubResource( 147 ), "runToJump", "jumping", SubResource( 148 ), "ducking", "jumping", SubResource( 149 ), "jumping", "jumpToFall", SubResource( 150 ), "jumpToFall", "falling", SubResource( 151 ), "ducking", "duckTurn", SubResource( 152 ), "duckTurn", "ducking", SubResource( 153 ), "falling", "ducking", SubResource( 154 ), "ducking", "falling", SubResource( 155 ), "ducking", "walking", SubResource( 156 ), "walking", "ducking", SubResource( 157 ), "idling", "ducking", SubResource( 158 ), "ducking", "idling", SubResource( 159 ), "ducking", "running", SubResource( 160 ), "running", "ducking", SubResource( 161 ), "running", "falling", SubResource( 162 ), "falling", "running", SubResource( 163 ), "walking", "falling", SubResource( 164 ), "falling", "walking", SubResource( 165 ), "falling", "idling", SubResource( 166 ), "idling", "walking", SubResource( 167 ), "walking", "idling", SubResource( 168 ), "walking", "turnToRun", SubResource( 169 ), "turnToRun", "walking", SubResource( 170 ), "running", "turnToRun", SubResource( 171 ), "turnToRun", "running", SubResource( 172 ), "idling", "idleTurn", SubResource( 173 ), "walking", "idleTurn", SubResource( 174 ), "idleTurn", "walking", SubResource( 175 ), "idling", "turnToRun", SubResource( 176 ), "turnToRun", "idling", SubResource( 177 ), "running", "runToJump", SubResource( 178 ), "wallsliding", "falling", SubResource( 137 ), "jumping", "wallsliding", SubResource( 189 ) ] start_node = "idling" -graph_offset = Vector2( 995.54, 69.009 ) +graph_offset = Vector2( 1100.54, -208.991 ) [sub_resource type="AnimationNodeStateMachinePlayback" id=48] @@ -4482,6 +4482,20 @@ __meta__ = { "_edit_vertical_guides_": [ -22.4902 ] } +[node name="StateLabel" type="Label" parent="."] +visible = false +show_behind_parent = true +margin_left = -37.0 +margin_top = -44.0 +margin_right = 36.0 +margin_bottom = -30.0 +custom_colors/font_color = Color( 1, 1, 1, 1 ) +custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 ) +custom_fonts/font = ExtResource( 5 ) +text = "Ihre Werbung" +align = 1 +valign = 1 + [node name="BlobbySkin" type="Area2D" parent="." groups=["player"]] process_priority = -1 collision_mask = 254 @@ -4589,19 +4603,6 @@ one_shot = true wait_time = 0.067 one_shot = true -[node name="StateLabel" type="Label" parent="."] -show_behind_parent = true -margin_left = -37.0 -margin_top = -44.0 -margin_right = 36.0 -margin_bottom = -30.0 -custom_colors/font_color = Color( 1, 1, 1, 1 ) -custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 ) -custom_fonts/font = ExtResource( 5 ) -text = "Ihre Werbung" -align = 1 -valign = 1 - [node name="WallRaycasts" type="Node2D" parent="."] position = Vector2( 0, -1 ) diff --git a/src/Actors/Blobby/BlobbyStateMachine.gd b/src/Actors/Blobby/BlobbyStateMachine.gd index dfdda10..b785b33 100644 --- a/src/Actors/Blobby/BlobbyStateMachine.gd +++ b/src/Actors/Blobby/BlobbyStateMachine.gd @@ -127,10 +127,10 @@ func get_horizontal_direction() -> Vector2: func _get_transition(_delta): parent.get_node("StateLabel").text = ( self.state - + " x vel:" - + String(round(parent.velocity.x)) - + " y vel/10:" - + String(round(parent.velocity.y / 10)) + # + " x vel:" + # + String(round(parent.velocity.x)) + # + " y vel/10:" + # + String(round(parent.velocity.y / 10)) ) var new_state if !parent.is_on_floor(): diff --git a/src/Actors/BlobbyCam.gd b/src/Actors/BlobbyCam.gd index 29862d1..86d0de5 100644 --- a/src/Actors/BlobbyCam.gd +++ b/src/Actors/BlobbyCam.gd @@ -38,7 +38,7 @@ func _ready(): image.create(128, 2, false, Image.FORMAT_RGBAH) _update_lighting_shader() # TODO Trigger when needed - get_node("LightAnimationPlayer").play("Pulsing") + # get_node("LightAnimationPlayer").play("Pulsing") func _physics_process(delta: float) -> void: if(!GlobalState.is_dead): @@ -66,7 +66,7 @@ func _physics_process(delta: float) -> void: func _set_boundaries(): # This is ok, because it only happens on initialization # But it is also quite fickle - var tilemap = get_node("../TileMap") + var tilemap = get_node("../%TileMap") # TODO: This goes wrong when overwriting old tiles with new sprites # New pngs -> completely new tiles and rebuild map var rect = tilemap.get_used_rect() diff --git a/src/Actors/BlobbyCam.tscn b/src/Actors/BlobbyCam.tscn index 5b5761a..2a96746 100644 --- a/src/Actors/BlobbyCam.tscn +++ b/src/Actors/BlobbyCam.tscn @@ -314,7 +314,7 @@ tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.6 ), -"transitions": PoolRealArray( 1, 0.5 ), +"transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ Vector2( 0, 0 ), Vector2( 0, 0 ) ] } @@ -326,7 +326,7 @@ tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { "times": PoolRealArray( 0, 0.6 ), -"transitions": PoolRealArray( 1, 1.2 ), +"transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ -10000000, -10000000 ] } @@ -338,7 +338,7 @@ tracks/2/imported = false tracks/2/enabled = true tracks/2/keys = { "times": PoolRealArray( 0, 0.6 ), -"transitions": PoolRealArray( 1, 1.2 ), +"transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ -10000000, -10000000 ] } @@ -350,7 +350,7 @@ tracks/3/imported = false tracks/3/enabled = true tracks/3/keys = { "times": PoolRealArray( 0, 0.6 ), -"transitions": PoolRealArray( 1, 1.2 ), +"transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ 10000000, 10000000 ] } @@ -362,7 +362,7 @@ tracks/4/imported = false tracks/4/enabled = true tracks/4/keys = { "times": PoolRealArray( 0, 0.6 ), -"transitions": PoolRealArray( 1, 1.2 ), +"transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ 10000000, 10000000 ] } @@ -569,7 +569,6 @@ z_index = -1 texture = ExtResource( 3 ) [node name="ParallaxLayer3" type="ParallaxLayer" parent="ParallaxBackground"] -visible = false z_index = -1 motion_scale = Vector2( 0.001, 0.001 ) @@ -578,7 +577,6 @@ z_index = -1 texture = ExtResource( 2 ) [node name="ParallaxLayer4" type="ParallaxLayer" parent="ParallaxBackground"] -visible = false motion_scale = Vector2( 0.01, 0.01 ) [node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer4"] @@ -587,18 +585,21 @@ z_index = -1 texture = ExtResource( 5 ) [node name="Emitter3" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]] +visible = false position = Vector2( -154, 14 ) texture = ExtResource( 40 ) script = ExtResource( 39 ) color = Color( 1, 0, 0, 0.615686 ) [node name="Emitter4" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]] +visible = false position = Vector2( 1, 14 ) texture = ExtResource( 40 ) script = ExtResource( 39 ) color = Color( 1, 0, 0, 0.615686 ) [node name="Emitter5" type="Sprite" parent="ParallaxBackground/ParallaxLayer4" groups=["light"]] +visible = false position = Vector2( 154, 14 ) texture = ExtResource( 40 ) script = ExtResource( 39 ) @@ -632,10 +633,10 @@ texture = ExtResource( 8 ) [node name="AnimatedSprite" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"] visible = false frames = SubResource( 7 ) -frame = 6 +frame = 10 playing = true [node name="AnimatedSprite2" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer5"] frames = SubResource( 8 ) -frame = 11 +frame = 1 playing = true diff --git a/src/Actors/Enemies/Beings/ChasingFlyer.tscn b/src/Actors/Enemies/Beings/ChasingFlyer.tscn new file mode 100644 index 0000000..8a5f5ab --- /dev/null +++ b/src/Actors/Enemies/Beings/ChasingFlyer.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/blobby/idle/blobby1.png" type="Texture" id=1] + +[node name="ChasingFlyer" type="Node2D"] + +[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."] +navigation_layers = 8 + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) diff --git a/src/Actors/Enemies/Beings/Flyer.gd b/src/Actors/Enemies/Beings/Flyer.gd new file mode 100644 index 0000000..4f0c105 --- /dev/null +++ b/src/Actors/Enemies/Beings/Flyer.gd @@ -0,0 +1,401 @@ +extends Player +const PhysicsFunc = preload("res://src/Utilities/Physic/PhysicsFunc.gd") + +onready var players = get_tree().get_nodes_in_group("player") + +onready var vision_raycast: RayCast2D = $VisionRayCast +onready var orientation: RayCast2D = $Orientation +onready var feeler_raycast: RayCast2D = $FeelerRayCast +onready var tilemap: TileMap = $"../%TileMap" +onready var jump_timer: Timer +onready var target_lost_timer: Timer +onready var rng = RandomNumberGenerator.new() + +export var score := 100 +# Is given in blocks +export var vision_distance := 6.0 +# Jump distance in blocks +export var default_jump_distance := 3.0 +export var default_jump_angle := 70.0 +export var jump_time_search := 0.7 +export var jump_time_hunt := 0.3 +export var jump_time_standard_deviation := 0.1 + + +# Also in blocks +var movement_radius: float +var anchor: Node2D +var is_bound := false +var was_restricted := false +var has_reversed := false + +var target: Object = null + +var start_x := 0.0 +var in_air := false +var is_hurt := false +var stored_x_vel = 0.0 + +var current_delta = 0.0 + +var reversing_possible_searching := true + +# TODO Make parameters tunable!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1111!! +func _ready(): + default_jump_distance = default_jump_distance * tilemap.cell_size.x + jump_timer = Timer.new() + jump_timer.set_one_shot(true) + jump_timer.connect("timeout", self, "jump") + target_lost_timer = Timer.new() + target_lost_timer.set_one_shot(true) + target_lost_timer.connect("timeout", self, "lose_target") + add_child(jump_timer) + add_child(target_lost_timer) + + +func bind_to_anchor(anchor_node: Node2D, radius: float ) -> void: + anchor = anchor_node + movement_radius = radius * 24 + is_bound = true + + +func _on_StompDetector_body_entered(body: Node) -> void: + if body.global_position.y > get_node("StompDetector").global_position.y: + return + if body.is_in_group("player"): + remove_from_group("harmful") + is_hurt = true + + +func execute_movement(delta: float) -> void: + # Navigation2DServer.map_get_path() + current_delta = delta + velocity.y += _gravity * delta + if(is_bound): + var next_position = global_position + velocity * current_delta + var current_distance = global_position.distance_to(anchor.global_position) + var new_distance = next_position.distance_to(anchor.global_position) + # TODO Fix this in respects to x and y distances and movement dampening + # Maybe use mathemathematics or something idfc + if(current_distance >= movement_radius && new_distance > current_distance): + velocity.x = velocity.x * 0.8 + velocity.y = velocity.y * 0.8 + was_restricted = true + velocity = move_and_slide(velocity, FLOOR_NORMAL, false, 4, 0.785398,false) + if(is_on_floor()): + velocity = Vector2(0,0) + # Reverse direction when hitting limit + + +func die() -> void: + GlobalState.score += score + queue_free() + + +func _on_EnemySkin_area_entered(area:Area2D) -> void: + if area.is_in_group("harmful"): + get_node("EnemyBody").disabled = true + die() + + +func searching() -> Vector2: + detect_player() + + if(is_on_floor()): + if(jump_timer.is_stopped()): + jump_timer.start(rng.randfn(jump_time_search, jump_time_standard_deviation)) + if(in_air): + in_air = false + else: + if(!in_air): + start_x = global_position.x + reversing_possible_searching = true + jump_timer.stop() + in_air = true + + return velocity + + +func hunting() -> Vector2: + detect_player() + + if(is_on_floor()): + if(jump_timer.is_stopped()): + jump_timer.start(rng.randfn(jump_time_hunt, jump_time_standard_deviation)) + if(in_air): + in_air = false + else: + if(!in_air): + start_x = global_position.x + reversing_possible_searching = true + jump_timer.stop() + in_air = true + + return velocity + + +func detect_player() -> void: + var player + if(players.empty()): + print("no player found") + return + player = players[0] + vision_raycast.cast_to = (player.global_position - global_position).normalized() * 24 * vision_distance + var ray_angle_to_facing = vision_raycast.cast_to.angle_to(orientation.cast_to) + vision_raycast.force_raycast_update() + var collider = vision_raycast.get_collider() + if(target == null && abs(ray_angle_to_facing) < PI/4 && collider != null && collider.is_in_group("player")): + target_lost_timer.stop() + target = collider + print("target found") + elif(target != null && target_lost_timer.is_stopped()): + target_lost_timer.start(3.0) + + +func sleeping() -> Vector2: + jump_timer.stop() + detect_player() + return velocity + + +func lose_target() -> void: + print("target lost") + target = null + + +func jump(): + # print("jump calculation initiated") + # Can only reverse once per jump calculation + has_reversed = false + var zero_vector = Vector2(0,0) + var v: Vector2 = velocity_for_jump_distance(default_jump_distance, deg2rad(default_jump_angle)) + v = correct_jump_direction(v) + + if(is_bound): + var next_position = global_position + v * current_delta + var current_distance = global_position.distance_to(anchor.global_position) + var new_distance = next_position.distance_to(anchor.global_position) + # print(current_distance) + # print(new_distance) + if((new_distance >= movement_radius && new_distance > current_distance) || (new_distance > current_distance && was_restricted)): + if can_reverse_facing_direction(): + reverse_facing_direction() + was_restricted = false + + if (get_facing_direction() < 0 && $Left_Wallcast.is_colliding()): + v = zero_vector + if (get_facing_direction() > 0 && $Right_Wallcast.is_colliding()): + v = zero_vector + if ($Right_Wallcast.is_colliding() && $Left_Wallcast.is_colliding()): + print("help this is a really tight space :(") + return velocity + + v = correct_jump_direction(v) + if(v != zero_vector): + v = consider_jump_headspace(v) + if(v != zero_vector): + v = consider_jump_landing_space(v) + if(v == zero_vector): + # TODO fix that you could call jump from jumping on top + # and let it fail if the top is dangerous for jump height or not safe + v = consider_jumping_on_top() + if(v == zero_vector && can_reverse_facing_direction()): + reverse_facing_direction() + jump() + velocity = v + + +func correct_jump_direction(v: Vector2) -> Vector2: + if sign(v.x) != get_facing_direction(): + v.x *= -1 + return v + + +# Cast a ray to the highest point of the jump +# Check the highest point for collision +# Calculate safe jump height and then a safe jump velocity +func consider_jump_headspace(v: Vector2) -> Vector2: + var height = calculate_jump_height(v) + var distance = calculate_jump_distance(v) + # Half distance is an estimate of the jumps apex() + var height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-height)), Vector2(0,-9)) + if(height_collider != null): + # check half jump height + var half_height_v = jump_height_to_velocity(height/3, v) + var half_height = calculate_jump_height(half_height_v) + height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-half_height)), Vector2(0,-9)) + if(height_collider != null && can_reverse_facing_direction()): + print("no safe height for frog jump") + return Vector2(0,0) + else: + var collision_point = feeler_raycast.get_collision_point() + #TODO Consider sprite size for height + var target_height = collision_point.y - (feeler_raycast.global_position.y - 9) + v = jump_height_to_velocity(abs(target_height), v) + return v + + +# Check the block in jump distance for danger or height +# If danger check neighboring blocks: if still danger, then jump closer (or jump over) +# If height move to distance which allows 1 block high jump +func consider_jump_landing_space(v: Vector2) -> Vector2: + var jump_distance = calculate_jump_distance(v) + var jump_height = calculate_jump_height(v) + var collider = check_feeler(Vector2(jump_distance * get_facing_direction(), - jump_height/2)) + # TODO Unpacked loop, make function or something? + # Shortens the jump in steps to make it more safe + if(!is_jump_path_safe(v, global_position) || collider != null): + jump_distance = calculate_jump_distance(v) - 24 + v = change_jump_distance(jump_distance, v) + jump_height = calculate_jump_height(v) + v = correct_jump_direction(v) + collider = check_feeler(Vector2(jump_distance * get_facing_direction(), - jump_height/2)) + if(!is_jump_path_safe(v, global_position) || collider != null): + jump_distance = calculate_jump_distance(v) - 12 + v = change_jump_distance(jump_distance, v) + jump_height = calculate_jump_height(v) + v = correct_jump_direction(v) + collider = check_feeler(Vector2(jump_distance * get_facing_direction(), - jump_height/2)) + if((!is_jump_path_safe(v, global_position) || collider != null) && can_reverse_facing_direction()): + return Vector2(0,0) + return v + + +# Tries to shorten the jump, so that it lands in a tiles center +func jump_to_tile_center(v: Vector2) -> Vector2: + var distance = stepify(calculate_jump_distance(v), 0.01) + if !is_equal_approx(fmod(abs(global_position.x + distance * get_facing_direction()), 24), 12): + # print(distance) + # print(global_position.x + distance) + # print(fmod((global_position.x + distance), 24)) + var new_distance = distance + if(get_facing_direction() < 0): + new_distance = fmod((global_position.x + distance), 24) - 12 + distance + else: + new_distance = distance + 12 - fmod((global_position.x + distance), 24) + # print("centering distance") + # print(new_distance) + v = change_jump_distance(abs(new_distance), v) + v = correct_jump_direction(v) + return v + + +# TODO Depends on Frog Shape and Tile Shape +func is_jump_path_safe(v: Vector2, pos: Vector2) -> bool: + var v0 = v.length() + var angle = v.angle() + var jump_distance = calculate_jump_distance(v) + var harmful_nodes = get_tree().get_nodes_in_group("harmful") + for node in harmful_nodes: + var node_pos = node.global_position + if abs(node_pos.x - pos.x) > abs(jump_distance) * 3 || abs(node_pos.x - pos.x) < 1: + continue + var node_y = node_pos.y - 12 + var initial_throw_height = node_y - (global_position.y + 9) + var term1 = (pow(v0, 2) * sin(2 * angle)) / (2 * _gravity) + var term2 = ((v0 * cos(angle))/_gravity) * sqrt(pow(v0, 2) * pow(sin(angle), 2) + 2 * _gravity * initial_throw_height) + var distance = abs(term1) + abs(term2) + # print("distance to next spike") + # print(pos.x + sign(v.x) * distance - node_pos.x) + var safe_distance = 12 + if (sign(initial_throw_height) < 0): + safe_distance = 24 + if(abs(pos.x + sign(v.x) * distance - node_pos.x) < safe_distance): + return false + return true + + +func calculate_jump_height(v: Vector2) -> float: + return abs((pow(v.length(), 2) * pow(sin(v.angle()), 2))/(2*_gravity)) + + +func consider_jumping_on_top() -> Vector2: + var collider = check_feeler(Vector2(36 * get_facing_direction(),0)) + var facing = 0 if get_facing_direction() >= 0 else - 1 + if (collider == null): + return Vector2(0,0) + var local_position = tilemap.to_local(feeler_raycast.get_collision_point()) + var map_position = tilemap.world_to_map(local_position) + var tile_position = Vector2(map_position.x + facing, map_position.y) + # print(tile_position) + # TODO Here the climb height of frog is limited to one constantly + if (tilemap.get_cell(tile_position.x, tile_position.y - 1) != -1): + # print("wall is more than one high") + return Vector2(0,0) + # print("wall is only one high") + var tile_upper_left_corner = tilemap.to_global(tilemap.map_to_world(tile_position)) + var tile_upper_right_corner = Vector2(tile_upper_left_corner.x + tilemap.cell_size.x, tile_upper_left_corner.y) + + var jump_angle = 0 + if(facing < 0): + var frog_bottom_left_corner = Vector2($EnemyBody.global_position.x - $EnemyBody.shape.extents.x, + $EnemyBody.global_position.y + $EnemyBody.shape.extents.y) + jump_angle = frog_bottom_left_corner.angle_to_point(tile_upper_right_corner) + else: + var frog_bottom_right_corner = Vector2($EnemyBody.global_position.x + $EnemyBody.shape.extents.x, + $EnemyBody.global_position.y + $EnemyBody.shape.extents.y) + jump_angle = frog_bottom_right_corner.angle_to_point(tile_upper_left_corner) - PI + # print(rad2deg(jump_angle)) + + # if(abs(rad2deg(jump_angle)) < default_jump_angle): + # return correct_jump_direction(velocity_for_jump_distance(default_jump_distance/2, abs(deg2rad(default_jump_angle)))) + if(abs(rad2deg(jump_angle)) < 78): + return correct_jump_direction(velocity_for_jump_distance(default_jump_distance/2, abs(deg2rad(80)))) + else: + return velocity_for_jump_distance(8, abs(deg2rad(45))) * -1 * facing + + return Vector2(0,0) + # Check if there is another obstacle above the block or do a regular jump with adjusted parameters instead(for checking) + # Cast from bottom corner to upper tile corner + # Check the angle of the raycast + # Return small jump backwards if the angle is too steep + # Make the angle 1 deg steeper + # Return a jump along the angled raycast + + +# Only works for jumps on straight ground +func calculate_jump_distance(v: Vector2) -> float: + return abs((pow(v.length(), 2) * sin(-1 * 2 * v.angle()))/(_gravity)) + + +func jump_height_to_velocity(target_height: float, v: Vector2) -> Vector2: + var initial_height = calculate_jump_height(v) + return v.normalized() * sqrt(pow(v.length(),2)/(initial_height/target_height)) + + +# Changes a Vector for a jump to the targeted distance, keeping the angle +func change_jump_distance(target_distance: float, v: Vector2) -> Vector2: + var initial_distance = calculate_jump_distance(v) + return v.normalized() * sqrt(pow(v.length(),2)/(initial_distance/target_distance)) + +# Takes an angle and a distance to calculate a jump launching at that angle and covering the distance +func velocity_for_jump_distance(distance: float = 3*24, angle: float = deg2rad(65)) -> Vector2: + var abs_velocity = sqrt((distance * _gravity)/sin(2*angle)) + return Vector2(abs_velocity,0).rotated(-1*angle) + + +func can_reverse_facing_direction() -> bool: + if(is_on_floor() && !has_reversed): + return true + return false + + +# Checks the feeler ray for collisions and returns collision or null +func check_feeler(v: Vector2, _offset = Vector2(0,0)) -> Object: + var prev_position = feeler_raycast.position + feeler_raycast.position += _offset + feeler_raycast.cast_to = v + feeler_raycast.force_raycast_update() + feeler_raycast.position = prev_position + return feeler_raycast.get_collider() + + +func reverse_facing_direction() -> void: + has_reversed = true + print("reversing direction") + orientation.cast_to.x *= -1 + pass + + +func get_facing_direction() -> float: + return orientation.cast_to.x diff --git a/src/Actors/Enemies/Beings/Flyer.tscn b/src/Actors/Enemies/Beings/Flyer.tscn new file mode 100644 index 0000000..1a4a0a2 --- /dev/null +++ b/src/Actors/Enemies/Beings/Flyer.tscn @@ -0,0 +1,97 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.gd" type="Script" id=1] +[ext_resource path="res://src/Actors/Enemies/Beings/FlyerStateMachine.gd" type="Script" id=2] +[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=3] +[ext_resource path="res://assets/enemy/enemy.png" type="Texture" id=4] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 12, 7 ) + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 15, 5.12039 ) + +[sub_resource type="RectangleShape2D" id=3] +extents = Vector2( 18.2143, 14.3338 ) + +[node name="Flyer" type="KinematicBody2D" groups=["harmful"]] +collision_layer = 2 +collision_mask = 9 +collision/safe_margin = 0.001 +script = ExtResource( 1 ) + +[node name="Statemachine" type="Node2D" parent="."] +script = ExtResource( 2 ) + +[node name="StateLabel" type="Label" parent="."] +show_behind_parent = true +margin_left = -36.0 +margin_top = -30.0 +margin_right = 37.0 +margin_bottom = -16.0 +custom_colors/font_color = Color( 1, 1, 1, 1 ) +custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 ) +custom_fonts/font = ExtResource( 3 ) +text = "Ihre Werbung" +align = 1 +valign = 1 + +[node name="FlyerSprite" type="Sprite" parent="."] +position = Vector2( 0, -1.90735e-06 ) +scale = Vector2( 0.201, 0.193 ) +texture = ExtResource( 4 ) + +[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."] +position = Vector2( 954, 0 ) +scale = Vector2( 10.84, 0.899 ) +rect = Rect2( -89, -10, 2, 20 ) +process_parent = true +physics_process_parent = true + +[node name="FeelerRayCast" type="RayCast2D" parent="."] +enabled = true +cast_to = Vector2( 0, -1 ) +collision_mask = 56 +collide_with_areas = true + +[node name="Orientation" type="RayCast2D" parent="."] +cast_to = Vector2( -1, 0 ) +collision_mask = 0 +collide_with_bodies = false + +[node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]] +position = Vector2( 0, 4.5 ) +shape = SubResource( 1 ) + +[node name="cshape" type="Node2D" parent="."] +position = Vector2( 0, -3.8147e-06 ) +scale = Vector2( 0.1, 0.1 ) + +[node name="pjoint" type="PinJoint2D" parent="cshape"] +scale = Vector2( 0.3, 0.3 ) +bias = 0.108 +softness = 0.1 + +[node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]] +modulate = Color( 0, 0.0392157, 1, 1 ) +position = Vector2( 0, -6.44095 ) +scale = Vector2( 0.7, 0.7 ) +collision_layer = 2 +input_pickable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"] +position = Vector2( -4.76837e-07, 1.56134 ) +shape = SubResource( 2 ) + +[node name="EnemySkin" type="Area2D" parent="." groups=["player"]] +process_priority = -1 +scale = Vector2( 0.7, 0.7 ) +collision_layer = 2 +collision_mask = 126 + +[node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"] +position = Vector2( 0, 2.85714 ) +shape = SubResource( 3 ) + +[connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"] +[connection signal="area_entered" from="EnemySkin" to="." method="_on_EnemySkin_area_entered"] diff --git a/src/Actors/Enemies/Beings/FlyerStateMachine.gd b/src/Actors/Enemies/Beings/FlyerStateMachine.gd new file mode 100644 index 0000000..d3dd627 --- /dev/null +++ b/src/Actors/Enemies/Beings/FlyerStateMachine.gd @@ -0,0 +1,46 @@ +extends StateMachine + + +func _ready() -> void: + add_state("searching") + add_state("hunting") + add_state("fleeing") + add_state("sleeping") + state = states.searching + set_state(states.searching) + print(self.state) + for state in states: + if state_matching_method_exists(state): + continue + else: + printerr("StateMachine -> State: " + state + " has no matching method in parent.") + push_error("StateMachine -> State: " + state + " has no matching method in parent.") + + +# Game logic consequences of state +func _state_logic(delta): + var state_action_ref = funcref(parent, self.state) + parent.velocity = state_action_ref.call_func() + parent.execute_movement(delta) + + +func _get_transition(_delta): + parent.get_node("StateLabel").text = self.state + var new_state + if parent.target == null: + new_state = states.searching + if parent.target != null: + new_state = states.hunting + if parent.is_hurt: + new_state = states.sleeping + if new_state != self.state: + return new_state + return null + + +func _enter_state(_new_state, _previous_state): + pass + + +func _exit_state(_previous_state, _new_state): + pass diff --git a/src/Actors/Enemies/Beings/WhatAreFrog.gd b/src/Actors/Enemies/Beings/WhatAreFrog.gd index 756570c..3e8b7c3 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrog.gd +++ b/src/Actors/Enemies/Beings/WhatAreFrog.gd @@ -68,6 +68,7 @@ func _on_StompDetector_body_entered(body: Node) -> void: func execute_movement(delta: float) -> void: + # Navigation2DServer.map_get_path() current_delta = delta velocity.y += _gravity * delta if(is_bound): @@ -83,6 +84,7 @@ func execute_movement(delta: float) -> void: velocity = move_and_slide(velocity, FLOOR_NORMAL, false, 4, 0.785398,false) if(is_on_floor()): velocity = Vector2(0,0) + # Reverse direction when hitting limit @@ -174,8 +176,8 @@ func jump(): var next_position = global_position + v * current_delta var current_distance = global_position.distance_to(anchor.global_position) var new_distance = next_position.distance_to(anchor.global_position) - print(current_distance) - print(new_distance) + # print(current_distance) + # print(new_distance) if((new_distance >= movement_radius && new_distance > current_distance) || (new_distance > current_distance && was_restricted)): if can_reverse_facing_direction(): reverse_facing_direction() @@ -217,12 +219,12 @@ func consider_jump_headspace(v: Vector2) -> Vector2: var height = calculate_jump_height(v) var distance = calculate_jump_distance(v) # Half distance is an estimate of the jumps apex() - var height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-height)), Vector2(0,-9)) + var height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-height)), Vector2(0,-20)) if(height_collider != null): # check half jump height var half_height_v = jump_height_to_velocity(height/3, v) var half_height = calculate_jump_height(half_height_v) - height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-half_height)), Vector2(0,-9)) + height_collider = check_feeler(Vector2(get_facing_direction()*(distance/2), (-half_height)), Vector2(0,-20)) if(height_collider != null && can_reverse_facing_direction()): print("no safe height for frog jump") return Vector2(0,0) @@ -264,16 +266,16 @@ func consider_jump_landing_space(v: Vector2) -> Vector2: func jump_to_tile_center(v: Vector2) -> Vector2: var distance = stepify(calculate_jump_distance(v), 0.01) if !is_equal_approx(fmod(abs(global_position.x + distance * get_facing_direction()), 24), 12): - print(distance) - print(global_position.x + distance) - print(fmod((global_position.x + distance), 24)) + # print(distance) + # print(global_position.x + distance) + # print(fmod((global_position.x + distance), 24)) var new_distance = distance if(get_facing_direction() < 0): new_distance = fmod((global_position.x + distance), 24) - 12 + distance else: new_distance = distance + 12 - fmod((global_position.x + distance), 24) - print("centering distance") - print(new_distance) + # print("centering distance") + # print(new_distance) v = change_jump_distance(abs(new_distance), v) v = correct_jump_direction(v) return v @@ -316,12 +318,12 @@ func consider_jumping_on_top() -> Vector2: var local_position = tilemap.to_local(feeler_raycast.get_collision_point()) var map_position = tilemap.world_to_map(local_position) var tile_position = Vector2(map_position.x + facing, map_position.y) - print(tile_position) + # print(tile_position) # TODO Here the climb height of frog is limited to one constantly if (tilemap.get_cell(tile_position.x, tile_position.y - 1) != -1): - print("wall is more than one high") + # print("wall is more than one high") return Vector2(0,0) - print("wall is only one high") + # print("wall is only one high") var tile_upper_left_corner = tilemap.to_global(tilemap.map_to_world(tile_position)) var tile_upper_right_corner = Vector2(tile_upper_left_corner.x + tilemap.cell_size.x, tile_upper_left_corner.y) @@ -334,7 +336,7 @@ func consider_jumping_on_top() -> Vector2: var frog_bottom_right_corner = Vector2($EnemyBody.global_position.x + $EnemyBody.shape.extents.x, $EnemyBody.global_position.y + $EnemyBody.shape.extents.y) jump_angle = frog_bottom_right_corner.angle_to_point(tile_upper_left_corner) - PI - print(rad2deg(jump_angle)) + # print(rad2deg(jump_angle)) # if(abs(rad2deg(jump_angle)) < default_jump_angle): # return correct_jump_direction(velocity_for_jump_distance(default_jump_distance/2, abs(deg2rad(default_jump_angle)))) diff --git a/src/Actors/Enemies/Beings/WhatAreFrog.tscn b/src/Actors/Enemies/Beings/WhatAreFrog.tscn index e3ff1d8..29bd6b1 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrog.tscn +++ b/src/Actors/Enemies/Beings/WhatAreFrog.tscn @@ -1,18 +1,352 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=37 format=2] -[ext_resource path="res://assets/enemy/enemy.png" type="Texture" id=1] +[ext_resource path="res://assets/enemy/froshler.png" type="Texture" id=1] [ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrog.gd" type="Script" id=2] [ext_resource path="res://src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd" type="Script" id=3] [ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=4] +[sub_resource type="Animation" id=5] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0 ] +} + +[sub_resource type="Animation" id=4] +resource_name = "idleHappy" +length = 1.62 +loop = true +step = 0.01 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.54 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 0, 1 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ) ] +} + +[sub_resource type="Animation" id=6] +resource_name = "idleHappyLeft" +length = 1.62 +loop = true +step = 0.01 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.54 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 0, 1 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ Vector2( -1, 1 ) ] +} + +[sub_resource type="Animation" id=12] +resource_name = "idleMean" +length = 1.62 +loop = true +step = 0.01 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0.01, 0.54 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 2, 3 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ) ] +} + +[sub_resource type="Animation" id=13] +resource_name = "idleMeanLeft" +length = 1.62 +loop = true +step = 0.01 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.54 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 2, 3 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( -1, 1 ) ] +} + +[sub_resource type="Animation" id=14] +resource_name = "liftOff" +length = 0.042 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 4 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ Vector2( 1, 1 ) ] +} + +[sub_resource type="Animation" id=15] +resource_name = "liftOffLeft" +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 4 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ Vector2( -1, 1 ) ] +} + +[sub_resource type="Animation" id=16] +resource_name = "midJumping" +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 6 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ Vector2( 1, 1 ) ] +} + +[sub_resource type="Animation" id=17] +resource_name = "midJumpingLeft" +length = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 6 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath(".:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ Vector2( -1, 1 ) ] +} + +[sub_resource type="AnimationNodeAnimation" id=7] +animation = "idleHappyLeft" + +[sub_resource type="AnimationNodeAnimation" id=8] +animation = "idleHappy" + +[sub_resource type="AnimationNodeBlendSpace1D" id=9] +blend_point_0/node = SubResource( 7 ) +blend_point_0/pos = -1.0 +blend_point_1/node = SubResource( 8 ) +blend_point_1/pos = 1.0 +min_space = -2.0 +max_space = 2.0 +snap = 1.0 + +[sub_resource type="AnimationNodeAnimation" id=18] +animation = "idleMeanLeft" + +[sub_resource type="AnimationNodeAnimation" id=19] +animation = "idleMean" + +[sub_resource type="AnimationNodeBlendSpace1D" id=20] +blend_point_0/node = SubResource( 18 ) +blend_point_0/pos = -1.0 +blend_point_1/node = SubResource( 19 ) +blend_point_1/pos = 1.0 +min_space = -2.0 +max_space = 2.0 +snap = 1.0 + +[sub_resource type="AnimationNodeAnimation" id=21] +animation = "liftOffLeft" + +[sub_resource type="AnimationNodeAnimation" id=22] +animation = "liftOff" + +[sub_resource type="AnimationNodeBlendSpace1D" id=23] +blend_point_0/node = SubResource( 21 ) +blend_point_0/pos = -1.0 +blend_point_1/node = SubResource( 22 ) +blend_point_1/pos = 1.0 + +[sub_resource type="AnimationNodeAnimation" id=24] +animation = "midJumpingLeft" + +[sub_resource type="AnimationNodeAnimation" id=25] +animation = "midJumping" + +[sub_resource type="AnimationNodeBlendSpace1D" id=26] +blend_point_0/node = SubResource( 24 ) +blend_point_0/pos = -1.0 +blend_point_1/node = SubResource( 25 ) +blend_point_1/pos = 1.0 + +[sub_resource type="AnimationNodeStateMachineTransition" id=27] + +[sub_resource type="AnimationNodeStateMachineTransition" id=28] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=29] + +[sub_resource type="AnimationNodeStateMachineTransition" id=30] + +[sub_resource type="AnimationNodeStateMachineTransition" id=31] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachineTransition" id=32] +switch_mode = 2 +auto_advance = true + +[sub_resource type="AnimationNodeStateMachine" id=10] +states/idleHappy/node = SubResource( 9 ) +states/idleHappy/position = Vector2( -54, 98 ) +states/idleMean/node = SubResource( 20 ) +states/idleMean/position = Vector2( 451, 98 ) +states/liftOff/node = SubResource( 23 ) +states/liftOff/position = Vector2( 184, -12 ) +states/midJumping/node = SubResource( 26 ) +states/midJumping/position = Vector2( 184, -141 ) +transitions = [ "idleHappy", "liftOff", SubResource( 27 ), "liftOff", "midJumping", SubResource( 28 ), "idleMean", "liftOff", SubResource( 29 ), "midJumping", "liftOff", SubResource( 30 ), "liftOff", "idleMean", SubResource( 31 ), "liftOff", "idleHappy", SubResource( 32 ) ] +start_node = "idleHappy" +graph_offset = Vector2( -317, -204 ) + +[sub_resource type="AnimationNodeStateMachinePlayback" id=11] + [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 11, 4.5 ) +extents = Vector2( 12, 7 ) [sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 13, 5.12039 ) +extents = Vector2( 15, 5.12039 ) [sub_resource type="RectangleShape2D" id=3] -extents = Vector2( 15.534, 10.0962 ) +extents = Vector2( 18.2143, 14.3338 ) [node name="WhatAreFrog" type="KinematicBody2D" groups=["harmful"]] collision_layer = 2 @@ -24,6 +358,7 @@ script = ExtResource( 2 ) script = ExtResource( 3 ) [node name="StateLabel" type="Label" parent="."] +visible = false show_behind_parent = true margin_left = -36.0 margin_top = -30.0 @@ -38,9 +373,32 @@ valign = 1 [node name="FrogSprite" type="Sprite" parent="."] unique_name_in_owner = true -position = Vector2( 0, -1.90735e-06 ) -scale = Vector2( 0.201, 0.193 ) +position = Vector2( 0, -7 ) texture = ExtResource( 1 ) +hframes = 2 +vframes = 4 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="FrogSprite"] +anims/RESET = SubResource( 5 ) +anims/idleHappy = SubResource( 4 ) +anims/idleHappyLeft = SubResource( 6 ) +anims/idleMean = SubResource( 12 ) +anims/idleMeanLeft = SubResource( 13 ) +anims/liftOff = SubResource( 14 ) +anims/liftOffLeft = SubResource( 15 ) +anims/midJumping = SubResource( 16 ) +anims/midJumpingLeft = SubResource( 17 ) + +[node name="AnimationTree" type="AnimationTree" parent="FrogSprite"] +tree_root = SubResource( 10 ) +anim_player = NodePath("../AnimationPlayer") +active = true +root_motion_track = NodePath(".:frame") +parameters/playback = SubResource( 11 ) +parameters/idleHappy/blend_position = 1.0 +parameters/idleMean/blend_position = 1.0 +parameters/liftOff/blend_position = 1.0 +parameters/midJumping/blend_position = 1.0 [node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."] position = Vector2( 954, 0 ) @@ -81,7 +439,7 @@ collision_mask = 9 collide_with_areas = true [node name="EnemyBody" type="CollisionShape2D" parent="." groups=["harmful"]] -position = Vector2( 0, 4.5 ) +position = Vector2( 0, 2 ) shape = SubResource( 1 ) [node name="cshape" type="Node2D" parent="."] @@ -95,13 +453,14 @@ softness = 0.1 [node name="StompDetector" type="Area2D" parent="." groups=["weakpoint"]] modulate = Color( 0, 0.0392157, 1, 1 ) -position = Vector2( 0, -6.44095 ) +position = Vector2( 0, -10 ) scale = Vector2( 0.7, 0.7 ) collision_layer = 2 input_pickable = false [node name="CollisionShape2D" type="CollisionShape2D" parent="StompDetector"] -position = Vector2( -4.76837e-07, 1.56134 ) +position = Vector2( 0.714287, 1.56134 ) +scale = Vector2( 1, 1 ) shape = SubResource( 2 ) [node name="EnemySkin" type="Area2D" parent="." groups=["player"]] @@ -111,7 +470,8 @@ collision_layer = 2 collision_mask = 126 [node name="CollisionPolygon2D" type="CollisionShape2D" parent="EnemySkin"] -position = Vector2( 0, 2.85714 ) +position = Vector2( -0.357144, -1.42857 ) +scale = Vector2( 1, 1 ) shape = SubResource( 3 ) [connection signal="body_entered" from="StompDetector" to="." method="_on_StompDetector_body_entered"] diff --git a/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd b/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd index 46a0f5f..3a891f7 100644 --- a/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd +++ b/src/Actors/Enemies/Beings/WhatAreFrogStateMachine.gd @@ -1,10 +1,12 @@ extends StateMachine +onready var anim_tree = $"../FrogSprite/AnimationTree" +onready var anim_state_playback = $"../FrogSprite/AnimationTree".get("parameters/playback") + func _ready() -> void: add_state("searching") add_state("hunting") - add_state("fleeing") add_state("sleeping") state = states.searching set_state(states.searching) @@ -25,13 +27,8 @@ func _state_logic(delta): func _get_transition(_delta): - parent.get_node("StateLabel").text = ( - self.state - # + " x vel:" - # + String(round(parent.velocity.x)) - # + " y vel/10:" - # + String(round(parent.velocity.y / 10)) - ) + parent.get_node("StateLabel").text = self.state + _animation_logic() var new_state if parent.target == null: new_state = states.searching @@ -50,3 +47,21 @@ func _enter_state(_new_state, _previous_state): func _exit_state(_previous_state, _new_state): pass + +func _animation_logic(): + _set_blendspaces_direction() + if parent.is_on_floor(): + if (parent.is_bound): + anim_state_playback.travel("idleMean") + else: + anim_state_playback.travel("idleHappy") + else: + anim_state_playback.travel("midJumping") + + +func _set_blendspaces_direction(): + var value = parent.get_facing_direction() + anim_tree.set("parameters/idleHappy/blend_position", value) + anim_tree.set("parameters/idleMean/blend_position", value) + anim_tree.set("parameters/liftOff/blend_position", value) + anim_tree.set("parameters/midJumping/blend_position", value) diff --git a/src/Environment/AlienShipTileSet.tres b/src/Environment/AlienShipTileSet.tres index ed24cb3..a97fea0 100644 --- a/src/Environment/AlienShipTileSet.tres +++ b/src/Environment/AlienShipTileSet.tres @@ -1,4 +1,4 @@ -[gd_resource type="TileSet" load_steps=16 format=2] +[gd_resource type="TileSet" load_steps=24 format=2] [ext_resource path="res://assets/environment/blocks/Slope-45.png" type="Texture" id=1] [ext_resource path="res://assets/environment/blocks/Alien-Ship-Ground-Inner.png" type="Texture" id=2] @@ -8,13 +8,26 @@ [ext_resource path="res://assets/environment/blocks/Slope-22,5.png" type="Texture" id=6] [ext_resource path="res://assets/environment/blocks/alienShipSeethroughPipeEdgeOuter/alienShipSeethroughPipeEdgeOuter.tres" type="Texture" id=7] [ext_resource path="res://assets/environment/blocks/Alien-Ship-Ground-Edge-Outer.png" type="Texture" id=8] +[ext_resource path="res://assets/environment/blocks/Empty-Navigation-Tile.png" type="Texture" id=9] + +[sub_resource type="OccluderPolygon2D" id=16] +polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) [sub_resource type="ConvexPolygonShape2D" id=7] points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) +[sub_resource type="OccluderPolygon2D" id=18] +polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) + +[sub_resource type="OccluderPolygon2D" id=20] +polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) + [sub_resource type="ConvexPolygonShape2D" id=8] points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) +[sub_resource type="OccluderPolygon2D" id=22] +polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) + [sub_resource type="ConvexPolygonShape2D" id=9] points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) @@ -24,12 +37,23 @@ points = PoolVector2Array( 24, 0, 24, 0, 24, 24, 0, 24 ) [sub_resource type="ConvexPolygonShape2D" id=12] points = PoolVector2Array( 24, 12, 48, 0, 48, 24, 0, 24 ) +[sub_resource type="OccluderPolygon2D" id=24] +polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) + [sub_resource type="ConvexPolygonShape2D" id=13] points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) +[sub_resource type="OccluderPolygon2D" id=26] +polygon = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) + [sub_resource type="ConvexPolygonShape2D" id=14] points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) +[sub_resource type="NavigationPolygon" id=27] +vertices = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) +polygons = [ PoolIntArray( 0, 1, 2, 3 ) ] +outlines = [ PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) ] + [resource] 0/name = "alienShip1EdgePartTile.tres 0" 0/texture = ExtResource( 3 ) @@ -38,6 +62,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) 0/region = Rect2( 0, 0, 24, 24 ) 0/tile_mode = 0 0/occluder_offset = Vector2( 0, 0 ) +0/occluder = SubResource( 16 ) 0/navigation_offset = Vector2( 0, 0 ) 0/shape_offset = Vector2( 0, 0 ) 0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) @@ -59,6 +84,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) 1/region = Rect2( 0, 0, 24, 24 ) 1/tile_mode = 0 1/occluder_offset = Vector2( 0, 0 ) +1/occluder = SubResource( 18 ) 1/navigation_offset = Vector2( 0, 0 ) 1/shape_offset = Vector2( 0, 0 ) 1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) @@ -73,6 +99,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) 2/region = Rect2( 0, 0, 24, 24 ) 2/tile_mode = 0 2/occluder_offset = Vector2( 0, 0 ) +2/occluder = SubResource( 20 ) 2/navigation_offset = Vector2( 0, 0 ) 2/shape_offset = Vector2( 0, 0 ) 2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) @@ -94,6 +121,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) 3/region = Rect2( 0, 0, 24, 24 ) 3/tile_mode = 0 3/occluder_offset = Vector2( 0, 0 ) +3/occluder = SubResource( 22 ) 3/navigation_offset = Vector2( 0, 0 ) 3/shape_offset = Vector2( 0, 0 ) 3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) @@ -157,6 +185,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) 7/region = Rect2( 0, 0, 24, 24 ) 7/tile_mode = 0 7/occluder_offset = Vector2( 0, 0 ) +7/occluder = SubResource( 24 ) 7/navigation_offset = Vector2( 0, 0 ) 7/shape_offset = Vector2( 0, 0 ) 7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) @@ -178,6 +207,7 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) 8/region = Rect2( 0, 0, 24, 24 ) 8/tile_mode = 0 8/occluder_offset = Vector2( 0, 0 ) +8/occluder = SubResource( 26 ) 8/navigation_offset = Vector2( 0, 0 ) 8/shape_offset = Vector2( 0, 0 ) 8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) @@ -192,3 +222,18 @@ points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 ) "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] 8/z_index = 0 +9/name = "Empty-Navigation-Tile.png 9" +9/texture = ExtResource( 9 ) +9/tex_offset = Vector2( 0, 0 ) +9/modulate = Color( 1, 1, 1, 1 ) +9/region = Rect2( 0, 0, 24, 24 ) +9/tile_mode = 0 +9/occluder_offset = Vector2( 0, 0 ) +9/navigation_offset = Vector2( 0, 0 ) +9/navigation = SubResource( 27 ) +9/shape_offset = Vector2( 0, 0 ) +9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +9/shape_one_way = false +9/shape_one_way_margin = 0.0 +9/shapes = [ ] +9/z_index = 0 diff --git a/src/Levels/01 Level.tscn b/src/Levels/01 Level.tscn index bc8a9ee..c47cc6b 100644 --- a/src/Levels/01 Level.tscn +++ b/src/Levels/01 Level.tscn @@ -26,8 +26,11 @@ wait_time = 20.0 [node name="BlobbyCam" parent="." instance=ExtResource( 12 )] +[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] +frame = 0 + [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 12 +frame = 8 [node name="Blobby" parent="." instance=ExtResource( 2 )] unique_name_in_owner = true @@ -88,12 +91,14 @@ position = Vector2( 696, -48 ) scale = Vector2( 0.133, 0.133 ) [node name="TileMap" type="TileMap" parent="."] +unique_name_in_owner = true 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 +bake_navigation = true format = 1 tile_data = PoolIntArray( -851975, 3, 0, -851974, 3, 0, -851973, 3, 0, -851972, 3, 0, -851971, 3, 0, -851970, 3, 0, -851969, 3, 0, -917504, 3, 0, -917503, 3, 0, -917502, 3, 0, -917501, 3, 0, -917500, 3, 0, -917499, 3, 0, -917498, 3, 0, -917497, 3, 0, -917496, 3, 0, -917495, 3, 0, -917494, 3, 0, -917493, 3, 0, -917492, 3, 0, -917491, 3, 0, -917490, 3, 0, -917489, 3, 0, -917488, 3, 0, -917487, 3, 0, -917486, 3, 0, -917485, 3, 0, -917484, 3, 0, -917483, 3, 0, -917482, 3, 0, -917481, 3, 0, -917480, 3, 0, -917479, 3, 0, -917478, 3, 0, -917477, 3, 0, -917476, 3, 0, -917475, 3, 0, -917474, 3, 0, -917473, 3, 0, -917472, 3, 0, -917471, 3, 0, -917470, 3, 0, -917469, 3, 0, -917468, 3, 0, -917467, 3, 0, -917466, 3, 0, -917465, 3, 0, -917464, 3, 0, -917463, 3, 0, -917462, 3, 0, -917461, 3, 0, -917460, 3, 0, -917459, 3, 0, -917458, 3, 0, -917457, 3, 0, -917456, 3, 0, -917455, 3, 0, -917454, 3, 0, -917453, 3, 0, -917452, 3, 0, -917451, 3, 0, -917450, 3, 0, -917449, 3, 0, -917448, 3, 0, -917447, 3, 0, -917446, 3, 0, -917445, 3, 0, -917444, 3, 0, -917443, 3, 0, -917442, 3, 0, -917441, 1073741827, 0, -917440, 1073741827, 0, -786439, 3, 0, -786438, 1610612739, 0, -786437, 1610612738, 0, -786436, 1610612738, 0, -786435, 1610612736, 0, -786434, 1610612738, 0, -786433, 1610612738, 0, -851968, 1610612738, 0, -851967, 1610612738, 0, -851966, 1610612738, 0, -851965, 1610612736, 0, -851964, 1610612738, 0, -851963, 1610612738, 0, -851962, 1610612738, 0, -851961, 1610612738, 0, -851960, 1610612738, 0, -851959, 1610612736, 0, -851958, 1610612738, 0, -851957, 1610612738, 0, -851956, 1610612738, 0, -851955, 1610612738, 0, -851954, 1610612738, 0, -851953, 1610612736, 0, -851952, 1610612738, 0, -851951, 1610612738, 0, -851950, 1610612738, 0, -851949, 1610612738, 0, -851948, 1610612738, 0, -851947, 1610612736, 0, -851946, 1610612738, 0, -851945, 1610612738, 0, -851944, 1610612738, 0, -851943, 1610612738, 0, -851942, 1610612738, 0, -851941, 1610612736, 0, -851940, 1610612738, 0, -851939, 1610612738, 0, -851938, 1610612738, 0, -851937, 1610612738, 0, -851936, 1610612738, 0, -851935, 1610612738, 0, -851934, 1610612738, 0, -851933, 1610612738, 0, -851932, 1610612736, 0, -851931, 1610612738, 0, -851930, 1610612738, 0, -851929, 1610612738, 0, -851928, 1610612738, 0, -851927, 1610612738, 0, -851926, 1610612736, 0, -851925, 1610612738, 0, -851924, 1610612738, 0, -851923, 1610612738, 0, -851922, 1610612738, 0, -851921, 1610612738, 0, -851920, 1610612736, 0, -851919, 1610612738, 0, -851918, 1610612738, 0, -851917, 1610612738, 0, -851916, 1610612738, 0, -851915, 1610612738, 0, -851914, 1610612736, 0, -851913, 1610612738, 0, -851912, 1610612738, 0, -851911, 1610612738, 0, -851910, 1610612738, 0, -851909, 1610612738, 0, -851908, 1610612736, 0, -851907, 3, 0, -851906, 3, 0, -851905, 1073741827, 0, -851904, 1073741827, 0, -720903, -536870909, 0, -720902, -1610612734, 0, -786371, -1073741822, 0, -786370, -2147483645, 0, -786369, -536870909, 0, -786368, 1073741827, 0, -655367, -536870909, 0, -655366, -1610612734, 0, -720835, -1073741822, 0, -720834, -2147483645, 0, -720833, -536870909, 0, -720832, 1073741827, 0, -589831, -536870909, 0, -589830, -1610612734, 0, -655299, -1073741822, 0, -655298, -2147483645, 0, -655297, -536870909, 0, -655296, 1073741827, 0, -524295, -536870909, 0, -524294, -1610612734, 0, -589763, -1073741822, 0, -589762, -2147483645, 0, -589761, -536870909, 0, -589760, 1073741827, 0, -458759, -536870909, 0, -458758, -1610612734, 0, -524227, -1073741822, 0, -524226, -2147483645, 0, -524225, -536870909, 0, -524224, 1073741827, 0, -393223, -536870909, 0, -393222, -1610612734, 0, -458691, 1073741831, 0, -458690, 1073741826, 0, -458689, 1073741826, 0, -458688, 1610612739, 0, -327687, -536870909, 0, -327686, -1610612734, 0, -393152, -2147483646, 0, -262151, -536870909, 0, -262150, -1610612734, 0, -327616, -2147483646, 0, -196615, -536870909, 0, -196614, -1610612734, 0, -262088, 8, 0, -262087, 2, 0, -262086, 2, 0, -262085, 2, 0, -262084, 2, 0, -262083, 2, 0, -262082, 536870914, 0, -262081, 536870914, 0, -262080, 1610612739, 0, -131079, -536870909, 0, -131078, -1610612734, 0, -196595, 7, 0, -196594, 1610612743, 0, -196568, 8, 0, -196567, 2, 0, -196566, 2, 0, -196565, 2, 0, -196564, 2, 0, -196563, 2, 0, -196562, 536870920, 0, -196559, 2, 0, -196556, 7, 0, -196555, 2, 0, -196554, 2, 0, -196553, 2, 0, -196552, 1610612739, 0, -196551, 1610612739, 0, -196550, 1610612739, 0, -196549, 536870915, 0, -196548, 1610612739, 0, -196547, 3, 0, -196546, 3, 0, -196545, 536870915, 0, -196544, 536870915, 0, -65543, -536870909, 0, -65542, -1610612734, 0, -131064, 8, 0, -131063, -1610612729, 0, -131054, 7, 0, -131053, 2, 0, -131052, 0, 0, -131051, 536870919, 0, -131034, 7, 0, -131033, 2, 0, -131032, 1610612739, 0, -131031, 1610612739, 0, -131030, 1610612739, 0, -131029, 1610612739, 0, -131028, 1610612739, 0, -131027, 1610612739, 0, -131026, 1610612739, 0, -131020, 1610612739, 0, -131019, 1610612739, 0, -131018, 1610612739, 0, -131017, 1610612739, 0, -131016, 3, 0, -131015, 1610612739, 0, -131014, 1610612739, 0, -131013, 536870915, 0, -131012, 1610612739, 0, -131011, 3, 0, -131010, 3, 0, -131009, 536870915, 0, -131008, 536870915, 0, -7, -536870909, 0, -6, -1610612734, 0, -65532, 7, 0, -65531, 2, 0, -65530, 2, 0, -65529, 2, 0, -65528, 1610612739, 0, -65527, 1610612739, 0, -65526, -1610612729, 0, -65519, 7, 0, -65518, 1610612739, 0, -65517, 1610612739, 0, -65516, 1610612739, 0, -65515, -1610612734, 0, -65514, 4, 0, -65500, 7, 0, -65499, 2, 0, -65498, 3, 0, -65497, 3, 0, -65496, 3, 0, -65495, 1610612739, 0, -65494, 1610612739, 0, -65493, 3, 0, -65492, 1610612739, 0, -65491, 1610612739, 0, -65490, 3, 0, -65489, 2, 0, -65488, 2, 0, -65487, 2, 0, -65486, 2, 0, -65485, 2, 0, -65484, 1610612739, 0, -65483, 536870915, 0, -65482, 1610612739, 0, -65481, 1610612739, 0, -65480, 1610612739, 0, -65479, 1610612739, 0, -65478, 1610612739, 0, -65477, 1610612739, 0, -65476, 1610612739, 0, -65475, 3, 0, -65474, 3, 0, -65473, 536870915, 0, -65472, 536870915, 0, 65529, 3, 0, 65530, 3, 0, 65531, 2, 0, 65532, 0, 0, 65533, 2, 0, 65534, 2, 0, 65535, 2, 0, 0, 2, 0, 1, 2, 0, 2, 0, 0, 3, 2, 0, 4, 1610612739, 0, 5, 1610612739, 0, 6, 1610612739, 0, 7, 1610612739, 0, 8, 3, 0, 9, 1610612739, 0, 10, 1610612739, 0, 11, 2, 0, 12, 2, 0, 13, 2, 0, 14, 0, 0, 15, 2, 0, 16, 2, 0, 17, 1610612739, 0, 18, 1610612739, 0, 19, 1610612739, 0, 20, 3, 0, 21, 3, 0, 22, 2, 0, 23, 2, 0, 24, 2, 0, 25, 2, 0, 26, 0, 0, 27, 536870919, 0, 30, 7, 0, 31, 2, 0, 32, 2, 0, 33, 2, 0, 34, 0, 0, 35, 2, 0, 36, 1610612739, 0, 37, 1610612739, 0, 38, 1610612739, 0, 39, 1610612739, 0, 40, 1610612739, 0, 41, 1610612739, 0, 42, 1610612739, 0, 43, 1610612739, 0, 44, 1610612739, 0, 45, 1610612739, 0, 46, 1610612739, 0, 47, 1610612739, 0, 48, 1610612739, 0, 49, 1610612739, 0, 50, 1610612739, 0, 51, 1610612739, 0, 52, 1610612739, 0, 53, 1610612739, 0, 54, 1610612739, 0, 55, 1610612739, 0, 56, 1, 0, 57, 1610612739, 0, 58, 1610612739, 0, 59, 536870915, 0, 60, 1610612739, 0, 61, 1610612739, 0, 62, 536870913, 0, 63, 536870915, 0, 64, 536870915, 0, 131065, 3, 0, 131066, 3, 0, 131067, 3, 0, 131068, 3, 0, 131069, 3, 0, 131070, 3, 0, 131071, 3, 0, 65536, 3, 0, 65537, 3, 0, 65538, 3, 0, 65539, 3, 0, 65540, 3, 0, 65541, 3, 0, 65542, 3, 0, 65543, 3, 0, 65544, 1, 0, 65545, 3, 0, 65546, 3, 0, 65547, 3, 0, 65548, 3, 0, 65549, 3, 0, 65550, 3, 0, 65551, 3, 0, 65552, 3, 0, 65553, 3, 0, 65554, 3, 0, 65555, 3, 0, 65556, 1, 0, 65557, 3, 0, 65558, 3, 0, 65559, 3, 0, 65560, 3, 0, 65561, 3, 0, 65562, 3, 0, 65563, 3, 0, 65564, 2, 0, 65565, 2, 0, 65566, 3, 0, 65567, 3, 0, 65568, 3, 0, 65569, 3, 0, 65570, 3, 0, 65571, 3, 0, 65572, 3, 0, 65573, 3, 0, 65574, 3, 0, 65575, 3, 0, 65576, 1, 0, 65577, 3, 0, 65578, 3, 0, 65579, 3, 0, 65580, 3, 0, 65581, 3, 0, 65582, 1, 0, 65583, 3, 0, 65584, 3, 0, 65585, 3, 0, 65586, 3, 0, 65587, 3, 0, 65588, 3, 0, 65589, 3, 0, 65590, 3, 0, 65591, 3, 0, 65592, 3, 0, 65593, 3, 0, 65594, 3, 0, 65595, 3, 0, 65596, 3, 0, 65597, 3, 0, 65598, 3, 0, 65599, 536870915, 0, 65600, 536870915, 0 ) diff --git a/src/Levels/02 Level.tscn b/src/Levels/02 Level.tscn index 7f92186..884599a 100644 --- a/src/Levels/02 Level.tscn +++ b/src/Levels/02 Level.tscn @@ -80,10 +80,10 @@ wait_time = 20.0 [node name="BlobbyCam" parent="." instance=ExtResource( 12 )] [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 0 +frame = 9 [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 5 +frame = 0 [node name="Blobby" parent="." instance=ExtResource( 2 )] unique_name_in_owner = true diff --git a/src/Levels/03 Level.tscn b/src/Levels/03 Level.tscn index 19e7328..749fc90 100644 --- a/src/Levels/03 Level.tscn +++ b/src/Levels/03 Level.tscn @@ -127,10 +127,11 @@ shape = SubResource( 3 ) position = Vector2( 0, 1.5 ) z_index = -1 frames = SubResource( 5 ) -frame = 21 +frame = 10 playing = true [node name="TileMap" type="TileMap" parent="."] +unique_name_in_owner = true tile_set = ExtResource( 2 ) cell_size = Vector2( 24, 24 ) cell_quadrant_size = 3 diff --git a/src/Levels/Froggy Test Level.tscn b/src/Levels/Froggy Test Level.tscn index 6f82af4..3207b9b 100644 --- a/src/Levels/Froggy Test Level.tscn +++ b/src/Levels/Froggy Test Level.tscn @@ -34,18 +34,18 @@ rect_pivot_offset = Vector2( 389, 267 ) unique_name_in_owner = true tile_set = ExtResource( 1 ) cell_size = Vector2( 24, 24 ) -cell_quadrant_size = 4 cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 ) collision_layer = 8 collision_mask = 8 +bake_navigation = true format = 1 -tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, -1610612734, 0, 0, 2, 0, 51, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, -1610612734, 0, 65587, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, -1610612734, 0, 131123, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, -1610612734, 0, 196659, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, -1610612734, 0, 262195, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, -1610612734, 0, 327731, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, -1610612734, 0, 393267, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, -1610612734, 0, 458803, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, -1610612734, 0, 524339, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, -1610612734, 0, 589875, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, -1610612734, 0, 655411, -1073741822, 0, 786424, 2, 0, 786427, 2, 0, 786428, 2, 0, 786429, 2, 0, 786430, 2, 0, 786431, 2, 0, 720896, 2, 0, 720897, 2, 0, 720898, 2, 0, 720899, 2, 0, 720900, 1610612738, 0, 720901, 2, 0, 720902, 2, 0, 720903, -1610612734, 0, 720904, -1610612734, 0, 720905, -1610612734, 0, 720906, -1610612734, 0, 720907, -1610612734, 0, 720908, -1610612734, 0, 720909, -1610612734, 0, 720910, -1610612734, 0, 720911, -1610612734, 0, 720912, -1610612734, 0, 720913, -1610612734, 0, 720914, -1610612734, 0, 720947, -1073741822, 0, 851960, 2, 0, 786450, -1610612729, 0, 786451, -1610612729, 0, 786462, 2, 0, 786463, -1610612729, 0, 786464, -1610612729, 0, 786465, -1610612729, 0, 786466, -1610612729, 0, 786467, -1610612729, 0, 786483, -1073741822, 0, 917496, 2, 0, 851986, -1610612729, 0, 851987, -1610612729, 0, 851988, 2, 0, 851989, 2, 0, 851997, -1610612729, 0, 851998, 2, 0, 851999, -1610612729, 0, 852000, -1610612729, 0, 852001, -1610612729, 0, 852002, -1610612729, 0, 852003, -1610612729, 0, 852019, -1073741822, 0, 983032, 2, 0, 983034, 2, 0, 983035, 2, 0, 983036, 2, 0, 983037, 2, 0, 917510, 2, 0, 917511, 1610612738, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, -1610612729, 0, 917526, 2, 0, 917527, 2, 0, 917529, 2, 0, 917530, -1610612729, 0, 917531, 2, 0, 917533, 2, 0, 917534, 2, 0, 917535, 2, 0, 917536, 2, 0, 917537, 2, 0, 917538, 2, 0, 917539, 2, 0, 917540, 2, 0, 917541, 2, 0, 917542, 2, 0, 917543, 2, 0, 917544, 2, 0, 917545, 2, 0, 917546, 2, 0, 917547, 2, 0, 917548, 2, 0, 917549, 2, 0, 917550, 2, 0, 917551, 2, 0, 917552, 2, 0, 917553, 2, 0, 917554, 2, 0, 917555, 2, 0, 1048568, 2, 0, 1048569, 2, 0, 1048570, 2, 0, 1048571, 2, 0, 1048572, 2, 0, 1048573, 2, 0, 1048574, 2, 0, 983046, 2, 0, 983047, 1610612738, 0, 983048, 2, 0, 983049, 2, 0, 983050, 2, 0, 983051, 2, 0, 983052, 2, 0, 983053, 2, 0, 983054, 2, 0, 983055, 2, 0, 983056, 2, 0, 983057, 2, 0, 983058, 2, 0, 983059, 2, 0, 983060, 2, 0, 983061, 2, 0, 983062, 2, 0, 983063, 2, 0, 983064, 2, 0, 983065, 2, 0, 983066, 2, 0, 983067, 2, 0, 983068, 2, 0, 983069, 2, 0, 983070, 2, 0, 983071, 2, 0, 983072, 2, 0, 983073, 2, 0, 983074, 2, 0, 983075, 2, 0, 983076, 2, 0, 983077, 2, 0, 983078, 2, 0, 983079, 2, 0, 983080, 2, 0, 983081, 2, 0, 983082, 2, 0, 983083, 2, 0, 983084, 2, 0, 983085, 2, 0, 983086, 2, 0, 983087, 2, 0, 983088, 2, 0, 983089, 2, 0, 983090, 2, 0, 983091, 2, 0, 1114104, 2, 0, 1114105, 2, 0, 1114106, 2, 0, 1114107, 2, 0, 1114108, 2, 0, 1114109, 2, 0, 1114110, 2, 0, 1114111, 2, 0, 1048576, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, 2, 0, 1048588, 2, 0, 1048589, 2, 0, 1048590, 2, 0, 1048591, 2, 0, 1048592, 2, 0, 1048593, 2, 0, 1048594, 2, 0, 1048595, 2, 0, 1048596, 2, 0, 1048597, 2, 0, 1048598, 2, 0, 1048599, 2, 0, 1048600, 2, 0, 1048601, 2, 0, 1048602, 2, 0, 1048603, 2, 0, 1048604, 2, 0, 1048605, 2, 0, 1048606, 2, 0, 1048607, 2, 0, 1048608, 2, 0, 1048609, 2, 0, 1048610, 2, 0, 1048611, 2, 0, 1048612, 2, 0, 1048613, 2, 0, 1048614, 2, 0, 1048615, 2, 0, 1048616, 2, 0, 1048617, 2, 0, 1048618, 2, 0, 1048619, 2, 0, 1048620, 2, 0, 1048621, 2, 0, 1048622, 2, 0, 1048623, 2, 0, 1048624, 2, 0, 1048625, 2, 0, 1048626, 2, 0, 1048627, 2, 0, 1179640, 2, 0, 1179641, 2, 0, 1179642, 2, 0, 1179643, 2, 0, 1179644, 2, 0, 1179645, 2, 0, 1179646, 2, 0, 1179647, 2, 0, 1114112, 2, 0, 1114113, 2, 0, 1114114, 2, 0, 1114115, 2, 0, 1114116, 2, 0, 1114117, 2, 0, 1114118, 2, 0, 1114119, 2, 0, 1114120, 2, 0, 1114121, 2, 0, 1114122, 2, 0, 1114123, 2, 0, 1114124, 2, 0, 1114125, 2, 0, 1114126, 2, 0, 1114127, 2, 0, 1114128, 2, 0, 1114129, 2, 0, 1114130, 2, 0, 1114131, 2, 0, 1114132, 2, 0, 1114133, 2, 0, 1114134, 2, 0, 1114135, 2, 0, 1114136, 2, 0, 1114137, 2, 0, 1114138, 2, 0, 1114139, 2, 0, 1114140, 2, 0, 1114141, 2, 0, 1114142, 2, 0, 1114143, 2, 0, 1114144, 2, 0, 1114145, 2, 0, 1114146, 2, 0, 1114147, 2, 0, 1114148, 2, 0, 1114149, 2, 0, 1114150, 2, 0, 1114151, 2, 0, 1114152, 2, 0, 1114153, 2, 0, 1114154, 2, 0, 1114155, 2, 0, 1114156, 2, 0, 1114157, 2, 0, 1114158, 2, 0, 1114159, 2, 0, 1114160, 2, 0, 1114161, 2, 0, 1114162, 2, 0, 1114163, 2, 0 ) +tile_data = PoolIntArray( 65528, 2, 0, 65529, 2, 0, 65530, 2, 0, 65531, -1610612734, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 5, 9, 0, 6, 9, 0, 7, 9, 0, 8, 9, 0, 9, 9, 0, 10, 9, 0, 11, 9, 0, 12, 9, 0, 13, 9, 0, 14, 9, 0, 15, 9, 0, 16, 9, 0, 17, 9, 0, 18, 9, 0, 19, 9, 0, 20, 9, 0, 21, 9, 0, 22, 9, 0, 23, 9, 0, 24, 9, 0, 25, 9, 0, 26, 9, 0, 27, 9, 0, 28, 9, 0, 29, 9, 0, 30, 9, 0, 31, 9, 0, 32, 9, 0, 33, 9, 0, 34, 9, 0, 35, 9, 0, 36, 9, 0, 37, 9, 0, 38, 9, 0, 39, 9, 0, 40, 9, 0, 41, 9, 0, 42, 9, 0, 43, 9, 0, 44, 9, 0, 45, 9, 0, 46, 9, 0, 47, 9, 0, 48, 9, 0, 49, 9, 0, 50, 9, 0, 51, -1073741822, 0, 131064, 2, 0, 131065, 2, 0, 131066, 2, 0, 131067, -1610612734, 0, 131068, 9, 0, 131069, 9, 0, 131070, 9, 0, 131071, 9, 0, 65536, 9, 0, 65537, 9, 0, 65538, 9, 0, 65539, 9, 0, 65540, 9, 0, 65541, 9, 0, 65542, 9, 0, 65543, 9, 0, 65544, 9, 0, 65545, 9, 0, 65546, 9, 0, 65547, 9, 0, 65548, 9, 0, 65549, 9, 0, 65550, 9, 0, 65551, 9, 0, 65552, 9, 0, 65553, 9, 0, 65554, 9, 0, 65555, 9, 0, 65556, 9, 0, 65557, 9, 0, 65558, 9, 0, 65559, 9, 0, 65560, 9, 0, 65561, 9, 0, 65562, 9, 0, 65563, 9, 0, 65564, 9, 0, 65565, 9, 0, 65566, 9, 0, 65567, 9, 0, 65568, 9, 0, 65569, 9, 0, 65570, 9, 0, 65571, 9, 0, 65572, 9, 0, 65573, 9, 0, 65574, 9, 0, 65575, 9, 0, 65576, 9, 0, 65577, 9, 0, 65578, 9, 0, 65579, 9, 0, 65580, 9, 0, 65581, 9, 0, 65582, 9, 0, 65583, 9, 0, 65584, 9, 0, 65585, 9, 0, 65586, 9, 0, 65587, -1073741822, 0, 196600, 2, 0, 196601, 2, 0, 196602, 2, 0, 196603, -1610612734, 0, 196604, 9, 0, 196605, 9, 0, 196606, 9, 0, 196607, 9, 0, 131072, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 131076, 9, 0, 131077, 9, 0, 131078, 9, 0, 131079, 9, 0, 131080, 9, 0, 131081, 9, 0, 131082, 9, 0, 131083, 9, 0, 131084, 9, 0, 131085, 9, 0, 131086, 9, 0, 131087, 9, 0, 131088, 9, 0, 131089, 9, 0, 131090, 9, 0, 131091, 9, 0, 131092, 9, 0, 131093, 9, 0, 131094, 9, 0, 131095, 9, 0, 131096, 9, 0, 131097, 9, 0, 131098, 9, 0, 131099, 9, 0, 131100, 9, 0, 131101, 9, 0, 131102, 9, 0, 131103, 9, 0, 131104, 9, 0, 131105, 9, 0, 131106, 9, 0, 131107, 9, 0, 131108, 9, 0, 131109, 9, 0, 131110, 9, 0, 131111, 9, 0, 131112, 9, 0, 131113, 9, 0, 131114, 9, 0, 131115, 9, 0, 131116, 9, 0, 131117, 9, 0, 131118, 9, 0, 131119, 9, 0, 131120, 9, 0, 131121, 9, 0, 131122, 9, 0, 131123, -1073741822, 0, 262136, 2, 0, 262137, 2, 0, 262138, 2, 0, 262139, -1610612734, 0, 262140, 9, 0, 262141, 9, 0, 262142, 9, 0, 262143, 9, 0, 196608, 9, 0, 196609, 9, 0, 196610, 9, 0, 196611, 9, 0, 196612, 9, 0, 196613, 9, 0, 196614, 9, 0, 196615, 9, 0, 196616, 9, 0, 196617, 9, 0, 196618, 9, 0, 196619, 9, 0, 196620, 9, 0, 196621, 9, 0, 196622, 9, 0, 196623, 9, 0, 196624, 9, 0, 196625, 9, 0, 196626, 9, 0, 196627, 9, 0, 196628, 9, 0, 196629, 9, 0, 196630, 9, 0, 196631, 9, 0, 196632, 9, 0, 196633, 9, 0, 196634, 9, 0, 196635, 9, 0, 196636, 9, 0, 196637, 9, 0, 196638, 9, 0, 196639, 9, 0, 196640, 9, 0, 196641, 9, 0, 196642, 9, 0, 196643, 9, 0, 196644, 9, 0, 196645, 9, 0, 196646, 9, 0, 196647, 9, 0, 196648, 9, 0, 196649, 9, 0, 196650, 9, 0, 196651, 9, 0, 196652, 9, 0, 196653, 9, 0, 196654, 9, 0, 196655, 9, 0, 196656, 9, 0, 196657, 9, 0, 196658, 9, 0, 196659, -1073741822, 0, 327672, 2, 0, 327673, 2, 0, 327674, 2, 0, 327675, -1610612734, 0, 327676, 9, 0, 327677, 9, 0, 327678, 9, 0, 327679, 9, 0, 262144, 9, 0, 262145, 9, 0, 262146, 9, 0, 262147, 9, 0, 262148, 9, 0, 262149, 9, 0, 262150, 9, 0, 262151, 9, 0, 262152, 9, 0, 262153, 9, 0, 262154, 9, 0, 262155, 9, 0, 262156, 9, 0, 262157, 9, 0, 262158, 9, 0, 262159, 9, 0, 262160, 9, 0, 262161, 9, 0, 262162, 9, 0, 262163, 9, 0, 262164, 9, 0, 262165, 9, 0, 262166, 9, 0, 262167, 9, 0, 262168, 9, 0, 262169, 9, 0, 262170, 9, 0, 262171, 9, 0, 262172, 9, 0, 262173, 9, 0, 262174, 9, 0, 262175, 9, 0, 262176, 9, 0, 262177, 9, 0, 262178, 9, 0, 262179, 9, 0, 262180, 9, 0, 262181, 9, 0, 262182, 9, 0, 262183, 9, 0, 262184, 9, 0, 262185, 9, 0, 262186, 9, 0, 262187, 9, 0, 262188, 9, 0, 262189, 9, 0, 262190, 9, 0, 262191, 9, 0, 262192, 9, 0, 262193, 9, 0, 262194, 9, 0, 262195, -1073741822, 0, 393208, 2, 0, 393209, 2, 0, 393210, 2, 0, 393211, -1610612734, 0, 393212, 9, 0, 393213, 9, 0, 393214, 9, 0, 393215, 9, 0, 327680, 9, 0, 327681, 9, 0, 327682, 9, 0, 327683, 9, 0, 327684, 9, 0, 327685, 9, 0, 327686, 9, 0, 327687, 9, 0, 327688, 9, 0, 327689, 9, 0, 327690, 9, 0, 327691, 9, 0, 327692, 9, 0, 327693, 9, 0, 327694, 9, 0, 327695, 9, 0, 327696, 9, 0, 327697, 9, 0, 327698, 9, 0, 327699, 9, 0, 327700, 9, 0, 327701, 9, 0, 327702, 9, 0, 327703, 9, 0, 327704, 9, 0, 327705, 9, 0, 327706, 9, 0, 327707, 9, 0, 327708, 9, 0, 327709, 9, 0, 327710, 9, 0, 327711, 9, 0, 327712, 9, 0, 327713, 9, 0, 327714, 9, 0, 327715, 9, 0, 327716, 9, 0, 327717, 9, 0, 327718, 9, 0, 327719, 9, 0, 327720, 9, 0, 327721, 9, 0, 327722, 9, 0, 327723, 9, 0, 327724, 9, 0, 327725, 9, 0, 327726, 9, 0, 327727, 9, 0, 327728, 9, 0, 327729, 9, 0, 327730, 9, 0, 327731, -1073741822, 0, 458744, 2, 0, 458745, 2, 0, 458746, 2, 0, 458747, -1610612734, 0, 458748, 9, 0, 458749, 9, 0, 458750, 9, 0, 458751, 9, 0, 393216, 9, 0, 393217, 9, 0, 393218, 9, 0, 393219, 9, 0, 393220, 9, 0, 393221, 9, 0, 393222, 9, 0, 393223, 9, 0, 393224, 9, 0, 393225, 9, 0, 393226, 9, 0, 393227, 9, 0, 393228, 9, 0, 393229, 9, 0, 393230, 9, 0, 393231, 9, 0, 393232, 9, 0, 393233, 9, 0, 393234, 9, 0, 393235, 9, 0, 393236, 9, 0, 393237, 9, 0, 393238, 9, 0, 393239, 9, 0, 393240, 9, 0, 393241, 9, 0, 393242, 9, 0, 393243, 9, 0, 393244, 9, 0, 393245, 9, 0, 393246, 9, 0, 393247, 9, 0, 393248, 9, 0, 393249, 9, 0, 393250, 9, 0, 393251, 9, 0, 393252, 9, 0, 393253, 9, 0, 393254, 9, 0, 393255, 9, 0, 393256, 9, 0, 393257, 9, 0, 393258, 9, 0, 393259, 9, 0, 393260, 9, 0, 393261, 9, 0, 393262, 9, 0, 393263, 9, 0, 393264, 9, 0, 393265, 9, 0, 393266, 9, 0, 393267, -1073741822, 0, 524280, 2, 0, 524281, 2, 0, 524282, 2, 0, 524283, -1610612734, 0, 524284, 9, 0, 524285, 9, 0, 524286, 9, 0, 524287, 9, 0, 458752, 9, 0, 458753, 9, 0, 458754, 9, 0, 458755, 9, 0, 458756, 9, 0, 458757, 9, 0, 458758, 9, 0, 458759, 9, 0, 458760, 9, 0, 458761, 9, 0, 458762, 9, 0, 458763, 9, 0, 458764, 9, 0, 458765, 9, 0, 458766, 9, 0, 458767, 9, 0, 458768, 9, 0, 458769, 9, 0, 458770, 9, 0, 458771, 9, 0, 458772, 9, 0, 458773, 9, 0, 458774, 9, 0, 458775, 9, 0, 458776, 9, 0, 458777, 9, 0, 458778, 9, 0, 458779, 9, 0, 458780, 9, 0, 458781, 9, 0, 458782, 9, 0, 458783, 9, 0, 458784, 9, 0, 458785, 9, 0, 458786, 9, 0, 458787, 9, 0, 458788, 9, 0, 458789, 9, 0, 458790, 9, 0, 458791, 9, 0, 458792, 9, 0, 458793, 9, 0, 458794, 9, 0, 458795, 9, 0, 458796, 9, 0, 458797, 9, 0, 458798, 9, 0, 458799, 9, 0, 458800, 9, 0, 458801, 9, 0, 458802, 9, 0, 458803, -1073741822, 0, 589816, 2, 0, 589817, 2, 0, 589818, 2, 0, 589819, -1610612734, 0, 589820, 9, 0, 589821, 9, 0, 589822, 9, 0, 589823, 9, 0, 524288, 9, 0, 524289, 9, 0, 524290, 9, 0, 524291, 9, 0, 524292, 9, 0, 524293, 9, 0, 524294, 9, 0, 524295, 9, 0, 524296, 9, 0, 524297, 9, 0, 524298, 9, 0, 524299, 9, 0, 524300, 9, 0, 524301, 9, 0, 524302, 9, 0, 524303, 9, 0, 524304, 9, 0, 524305, 9, 0, 524306, 9, 0, 524307, 9, 0, 524308, 9, 0, 524309, 9, 0, 524310, 9, 0, 524311, 9, 0, 524312, 9, 0, 524313, 9, 0, 524314, 9, 0, 524315, 9, 0, 524316, 9, 0, 524317, 9, 0, 524318, 9, 0, 524319, 9, 0, 524320, 9, 0, 524321, 9, 0, 524322, 9, 0, 524323, 9, 0, 524324, 9, 0, 524325, 9, 0, 524326, 9, 0, 524327, 9, 0, 524328, 9, 0, 524329, 9, 0, 524330, 9, 0, 524331, 9, 0, 524332, 9, 0, 524333, 9, 0, 524334, 9, 0, 524335, 9, 0, 524336, 9, 0, 524337, 9, 0, 524338, 9, 0, 524339, -1073741822, 0, 655352, 2, 0, 655353, 2, 0, 655354, 2, 0, 655355, -1610612734, 0, 655356, 9, 0, 655357, 9, 0, 655358, 9, 0, 655359, 9, 0, 589824, 9, 0, 589825, 9, 0, 589826, 9, 0, 589827, 9, 0, 589828, 9, 0, 589829, 9, 0, 589830, 9, 0, 589831, 9, 0, 589832, 9, 0, 589833, 9, 0, 589834, 9, 0, 589835, 9, 0, 589836, 9, 0, 589837, 9, 0, 589838, 9, 0, 589839, 9, 0, 589840, 9, 0, 589841, 9, 0, 589842, 9, 0, 589843, 9, 0, 589844, 9, 0, 589845, 9, 0, 589846, 9, 0, 589847, 9, 0, 589848, 9, 0, 589849, 9, 0, 589850, 9, 0, 589851, 9, 0, 589852, 9, 0, 589853, 9, 0, 589854, 9, 0, 589855, 9, 0, 589856, 9, 0, 589857, 9, 0, 589858, 9, 0, 589859, 9, 0, 589860, 9, 0, 589861, 9, 0, 589862, 9, 0, 589863, 9, 0, 589864, 9, 0, 589865, 9, 0, 589866, 9, 0, 589867, 9, 0, 589868, 9, 0, 589869, 9, 0, 589870, 9, 0, 589871, 9, 0, 589872, 9, 0, 589873, 9, 0, 589874, 9, 0, 589875, -1073741822, 0, 720888, 2, 0, 720889, 2, 0, 720890, 2, 0, 720891, -1610612734, 0, 720892, 9, 0, 720893, 9, 0, 720894, 9, 0, 720895, 9, 0, 655360, 9, 0, 655361, 9, 0, 655362, 9, 0, 655363, 9, 0, 655364, 9, 0, 655365, 9, 0, 655366, 9, 0, 655367, 9, 0, 655368, 9, 0, 655369, 9, 0, 655370, 9, 0, 655371, 9, 0, 655372, 9, 0, 655373, 9, 0, 655374, 9, 0, 655375, 9, 0, 655376, 9, 0, 655377, 9, 0, 655378, 9, 0, 655379, 9, 0, 655380, 9, 0, 655381, 9, 0, 655382, 9, 0, 655383, 9, 0, 655384, 9, 0, 655385, 9, 0, 655386, 9, 0, 655387, 9, 0, 655388, 9, 0, 655389, 9, 0, 655390, 9, 0, 655391, 9, 0, 655392, 9, 0, 655393, 9, 0, 655394, 9, 0, 655395, 9, 0, 655396, 9, 0, 655397, 9, 0, 655398, 9, 0, 655399, 9, 0, 655400, 9, 0, 655401, 9, 0, 655402, 9, 0, 655403, 9, 0, 655404, 9, 0, 655405, 9, 0, 655406, 9, 0, 655407, 9, 0, 655408, 9, 0, 655409, 9, 0, 655410, 9, 0, 655411, -1073741822, 0, 786424, 2, 0, 786425, 9, 0, 786426, 9, 0, 786427, 2, 0, 786428, 2, 0, 786429, 2, 0, 786430, 2, 0, 786431, 2, 0, 720896, 2, 0, 720897, 2, 0, 720898, 2, 0, 720899, 2, 0, 720900, 1610612738, 0, 720901, 2, 0, 720902, 2, 0, 720903, -1610612734, 0, 720904, -1610612734, 0, 720905, -1610612734, 0, 720906, -1610612734, 0, 720907, -1610612734, 0, 720908, -1610612734, 0, 720909, -1610612734, 0, 720910, -1610612734, 0, 720911, -1610612734, 0, 720912, -1610612734, 0, 720913, -1610612734, 0, 720914, -1610612734, 0, 720915, 9, 0, 720916, 9, 0, 720917, 9, 0, 720918, 9, 0, 720919, 9, 0, 720920, 9, 0, 720921, 9, 0, 720922, 9, 0, 720923, 9, 0, 720924, 9, 0, 720925, 9, 0, 720926, 9, 0, 720927, 9, 0, 720928, 9, 0, 720929, 9, 0, 720930, 9, 0, 720931, 9, 0, 720932, 9, 0, 720933, 9, 0, 720934, 9, 0, 720935, 9, 0, 720936, 9, 0, 720937, 9, 0, 720938, 9, 0, 720939, 9, 0, 720940, 9, 0, 720941, 9, 0, 720942, 9, 0, 720943, 9, 0, 720944, 9, 0, 720945, 9, 0, 720946, 9, 0, 720947, -1073741822, 0, 851960, 2, 0, 851961, 9, 0, 851962, 9, 0, 851963, 9, 0, 851964, 9, 0, 851965, 9, 0, 851966, 9, 0, 851967, 9, 0, 786432, 9, 0, 786433, 9, 0, 786434, 9, 0, 786435, 9, 0, 786436, 9, 0, 786437, 9, 0, 786438, 9, 0, 786439, 9, 0, 786440, 9, 0, 786441, 9, 0, 786442, 9, 0, 786443, 9, 0, 786444, 9, 0, 786445, 9, 0, 786446, 9, 0, 786447, 9, 0, 786448, 9, 0, 786449, 9, 0, 786450, -1610612729, 0, 786451, -1610612729, 0, 786452, 9, 0, 786453, 9, 0, 786454, 9, 0, 786455, 9, 0, 786456, 9, 0, 786457, 9, 0, 786458, 9, 0, 786459, 9, 0, 786460, 9, 0, 786461, 9, 0, 786462, 2, 0, 786463, -1610612729, 0, 786464, -1610612729, 0, 786465, -1610612729, 0, 786466, -1610612729, 0, 786467, -1610612729, 0, 786468, 9, 0, 786469, 9, 0, 786470, 9, 0, 786471, 9, 0, 786472, 9, 0, 786473, 9, 0, 786474, 9, 0, 786475, 9, 0, 786476, 9, 0, 786477, 9, 0, 786478, 9, 0, 786479, 9, 0, 786480, 9, 0, 786481, 9, 0, 786482, 9, 0, 786483, -1073741822, 0, 917496, 2, 0, 917497, 9, 0, 917498, 9, 0, 917499, 9, 0, 917500, 9, 0, 917501, 9, 0, 917502, 9, 0, 917503, 9, 0, 851968, 9, 0, 851969, 9, 0, 851970, 9, 0, 851971, 9, 0, 851972, 9, 0, 851973, 9, 0, 851974, 9, 0, 851975, 9, 0, 851976, 9, 0, 851977, 9, 0, 851978, 9, 0, 851979, 9, 0, 851980, 9, 0, 851981, 9, 0, 851982, 9, 0, 851983, 9, 0, 851984, 9, 0, 851985, 9, 0, 851986, -1610612729, 0, 851987, -1610612729, 0, 851988, 2, 0, 851989, 2, 0, 851990, 9, 0, 851991, 9, 0, 851992, 9, 0, 851993, 9, 0, 851994, 9, 0, 851995, 9, 0, 851996, 9, 0, 851997, -1610612729, 0, 851998, 2, 0, 851999, -1610612729, 0, 852000, -1610612729, 0, 852001, -1610612729, 0, 852002, -1610612729, 0, 852003, -1610612729, 0, 852004, 9, 0, 852005, 9, 0, 852006, 9, 0, 852007, 9, 0, 852008, 9, 0, 852009, 9, 0, 852010, 9, 0, 852011, 9, 0, 852012, 9, 0, 852013, 9, 0, 852014, 9, 0, 852015, 9, 0, 852016, 9, 0, 852017, 9, 0, 852018, 9, 0, 852019, -1073741822, 0, 983032, 2, 0, 983034, 2, 0, 983035, 2, 0, 983036, 2, 0, 983037, 2, 0, 983038, 9, 0, 983039, 9, 0, 917504, 9, 0, 917505, 9, 0, 917506, 9, 0, 917507, 9, 0, 917508, 9, 0, 917509, 9, 0, 917510, 2, 0, 917511, 1610612738, 0, 917512, 2, 0, 917513, 2, 0, 917514, 2, 0, 917515, 2, 0, 917516, 2, 0, 917518, 2, 0, 917519, 2, 0, 917520, 2, 0, 917521, 2, 0, 917522, 2, 0, 917523, 2, 0, 917524, 2, 0, 917525, -1610612729, 0, 917526, 2, 0, 917527, 2, 0, 917529, 2, 0, 917530, -1610612729, 0, 917531, 2, 0, 917533, 2, 0, 917534, 2, 0, 917535, 2, 0, 917536, 2, 0, 917537, 2, 0, 917538, 2, 0, 917539, 2, 0, 917540, 2, 0, 917541, 2, 0, 917542, 2, 0, 917543, 2, 0, 917544, 2, 0, 917545, 2, 0, 917546, 2, 0, 917547, 2, 0, 917548, 2, 0, 917549, 2, 0, 917550, 2, 0, 917551, 2, 0, 917552, 2, 0, 917553, 2, 0, 917554, 2, 0, 917555, 2, 0, 1048568, 2, 0, 1048569, 2, 0, 1048570, 2, 0, 1048571, 2, 0, 1048572, 2, 0, 1048573, 2, 0, 1048574, 2, 0, 1048575, 9, 0, 983040, 9, 0, 983041, 9, 0, 983042, 9, 0, 983043, 9, 0, 983044, 9, 0, 983045, 9, 0, 983046, 2, 0, 983047, 1610612738, 0, 983048, 2, 0, 983049, 2, 0, 983050, 2, 0, 983051, 2, 0, 983052, 2, 0, 983053, 2, 0, 983054, 2, 0, 983055, 2, 0, 983056, 2, 0, 983057, 2, 0, 983058, 2, 0, 983059, 2, 0, 983060, 2, 0, 983061, 2, 0, 983062, 2, 0, 983063, 2, 0, 983064, 2, 0, 983065, 2, 0, 983066, 2, 0, 983067, 2, 0, 983068, 2, 0, 983069, 2, 0, 983070, 2, 0, 983071, 2, 0, 983072, 2, 0, 983073, 2, 0, 983074, 2, 0, 983075, 2, 0, 983076, 2, 0, 983077, 2, 0, 983078, 2, 0, 983079, 2, 0, 983080, 2, 0, 983081, 2, 0, 983082, 2, 0, 983083, 2, 0, 983084, 2, 0, 983085, 2, 0, 983086, 2, 0, 983087, 2, 0, 983088, 2, 0, 983089, 2, 0, 983090, 2, 0, 983091, 2, 0, 1114104, 2, 0, 1114105, 2, 0, 1114106, 2, 0, 1114107, 2, 0, 1114108, 2, 0, 1114109, 2, 0, 1114110, 2, 0, 1114111, 2, 0, 1048576, 2, 0, 1048578, 2, 0, 1048579, 2, 0, 1048582, 2, 0, 1048583, 2, 0, 1048584, 2, 0, 1048585, 2, 0, 1048586, 2, 0, 1048587, 2, 0, 1048588, 2, 0, 1048589, 2, 0, 1048590, 2, 0, 1048591, 2, 0, 1048592, 2, 0, 1048593, 2, 0, 1048594, 2, 0, 1048595, 2, 0, 1048596, 2, 0, 1048597, 2, 0, 1048598, 2, 0, 1048599, 2, 0, 1048600, 2, 0, 1048601, 2, 0, 1048602, 2, 0, 1048603, 2, 0, 1048604, 2, 0, 1048605, 2, 0, 1048606, 2, 0, 1048607, 2, 0, 1048608, 2, 0, 1048609, 2, 0, 1048610, 2, 0, 1048611, 2, 0, 1048612, 2, 0, 1048613, 2, 0, 1048614, 2, 0, 1048615, 2, 0, 1048616, 2, 0, 1048617, 2, 0, 1048618, 2, 0, 1048619, 2, 0, 1048620, 2, 0, 1048621, 2, 0, 1048622, 2, 0, 1048623, 2, 0, 1048624, 2, 0, 1048625, 2, 0, 1048626, 2, 0, 1048627, 2, 0, 1179640, 2, 0, 1179641, 2, 0, 1179642, 2, 0, 1179643, 2, 0, 1179644, 2, 0, 1179645, 2, 0, 1179646, 2, 0, 1179647, 2, 0, 1114112, 2, 0, 1114113, 2, 0, 1114114, 2, 0, 1114115, 2, 0, 1114116, 2, 0, 1114117, 2, 0, 1114118, 2, 0, 1114119, 2, 0, 1114120, 2, 0, 1114121, 2, 0, 1114122, 2, 0, 1114123, 2, 0, 1114124, 2, 0, 1114125, 2, 0, 1114126, 2, 0, 1114127, 2, 0, 1114128, 2, 0, 1114129, 2, 0, 1114130, 2, 0, 1114131, 2, 0, 1114132, 2, 0, 1114133, 2, 0, 1114134, 2, 0, 1114135, 2, 0, 1114136, 2, 0, 1114137, 2, 0, 1114138, 2, 0, 1114139, 2, 0, 1114140, 2, 0, 1114141, 2, 0, 1114142, 2, 0, 1114143, 2, 0, 1114144, 2, 0, 1114145, 2, 0, 1114146, 2, 0, 1114147, 2, 0, 1114148, 2, 0, 1114149, 2, 0, 1114150, 2, 0, 1114151, 2, 0, 1114152, 2, 0, 1114153, 2, 0, 1114154, 2, 0, 1114155, 2, 0, 1114156, 2, 0, 1114157, 2, 0, 1114158, 2, 0, 1114159, 2, 0, 1114160, 2, 0, 1114161, 2, 0, 1114162, 2, 0, 1114163, 2, 0 ) [node name="Spikes" parent="." instance=ExtResource( 11 )] position = Vector2( 36, 396 ) [node name="AnimatedSprite" parent="Spikes" index="1"] -frame = 17 +frame = 5 [node name="Spikes2" parent="." instance=ExtResource( 11 )] position = Vector2( 132, 396 ) @@ -66,7 +66,7 @@ position = Vector2( 684, 348 ) position = Vector2( 324, 348 ) [node name="WhatAreFrog" parent="." instance=ExtResource( 8 )] -position = Vector2( 396, 325 ) +position = Vector2( 396, 327 ) [node name="BlobbyCam" parent="." instance=ExtResource( 4 )] diff --git a/src/Levels/Grass Test Level.tscn b/src/Levels/Grass Test Level.tscn index f7886a2..1fc1bc5 100644 --- a/src/Levels/Grass Test Level.tscn +++ b/src/Levels/Grass Test Level.tscn @@ -28,6 +28,7 @@ margin_right = 3.15375 margin_bottom = 0.456848 [node name="TileMap" type="TileMap" parent="."] +unique_name_in_owner = true position = Vector2( -16, 10 ) tile_set = ExtResource( 1 ) cell_size = Vector2( 24, 24 ) @@ -212,10 +213,10 @@ position = Vector2( 210, -15 ) [node name="BlobbyCam" parent="." instance=ExtResource( 11 )] [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 10 +frame = 0 [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 1 +frame = 5 [node name="Blobby" parent="." instance=ExtResource( 10 )] unique_name_in_owner = true