diff --git a/project.godot b/project.godot index bad7c2b..9397589 100644 --- a/project.godot +++ b/project.godot @@ -52,9 +52,11 @@ settings/fps/force_fps=144 [display] -window/size/width=848 -window/size/height=480 +window/size/width=1920 +window/size/height=1080 window/stretch/mode="2d" +window/stretch/aspect="keep" +window/stretch/shrink=4.5 [input] @@ -102,10 +104,11 @@ boost_move={ quality/intended_usage/framebuffer_allocation=0 quality/intended_usage/framebuffer_allocation.mobile=0 -quality/2d/use_pixel_snap=true +2d/snapping/use_gpu_pixel_snap=true quality/filters/use_nearest_mipmap_filter=true quality/filters/msaa=1 environment/default_environment="res://default_env.tres" +quality/2d/use_pixel_snap=true environment/2d/use_nvidia_rect_flicker_workaround=true environment/stretch/aspect="ignore" environment/intended_usage/framebuffer_allocation.mobile=0 diff --git a/src/Actor/Blobby.gd b/src/Actor/Blobby.gd index c723d7b..bf3774e 100644 --- a/src/Actor/Blobby.gd +++ b/src/Actor/Blobby.gd @@ -1,5 +1,10 @@ extends Player +export var init_boost := false +onready var wall_touch_direction = 0 +onready var left_wall_raycasts = $WallRaycasts/LeftWallRaycast +onready var right_wall_raycasts = $WallRaycasts/RightWallRaycast + func _on_EnemyDetector_area_entered(area: Area2D) -> void: _velocity = calculate_stomp_velocity(_velocity, stomp_feedback) @@ -21,6 +26,10 @@ func handle_fall_movement(delta: float, direction: Vector2) -> Vector2: return calculate_fall_velocity(_velocity, delta, direction) +func handle_wallslide_movement(delta: float, direction: Vector2) -> Vector2: + return calculate_wallslide_velocity(_velocity, delta, direction) + + func calculate_grounded_velocity( linear_velocity: Vector2, delta: float, direction: Vector2, state: String ) -> Vector2: @@ -78,8 +87,12 @@ func calculate_grounded_velocity( out_vel.x = max_velocity[state] * direction.x # TODO Is this the right place to determine this? # Jumping when grounded - if is_on_floor() && Input.is_action_pressed("jump"): - var additive_jump_force = 0.2383 * abs(_velocity.x) * mass + if is_on_floor() && Input.is_action_just_pressed("jump"): + var additive_jump_force = ( + velocity_jump_boost_ratio + * abs(_velocity.x) + * mass + ) out_vel.y = ( ((acceleration_force[state].y + additive_jump_force) / mass) * -1 @@ -96,6 +109,30 @@ func is_reversing_horizontal_movement(direction: Vector2) -> bool: ) +# Returns if the character is touching a wall with its whole body +# Being able to touch a vertical surface over this length also makes it a qualified "wall" +# Also sets wall_touch_direction +# TODO Ugly side effect +func is_touching_wall_completely() -> bool: + for left_raycast in left_wall_raycasts.get_children(): + wall_touch_direction = -1 + if ! left_raycast.is_colliding(): + for right_raycast in right_wall_raycasts.get_children(): + wall_touch_direction = 1 + if ! right_raycast.is_colliding(): + wall_touch_direction = 0 + return false + return true + + +func is_correct_walljump_input(direction: Vector2) -> bool: + return ( + Input.is_action_just_pressed("jump") + && abs(direction.x + wall_touch_direction) < 1 + && abs(direction.x + wall_touch_direction) >= 0 + ) + + func convert_velocity_to_force(velocity, mass, delta) -> float: return (velocity * mass) / delta @@ -104,8 +141,9 @@ func convert_force_to_velocity(force, mass, delta) -> float: return (force / mass) * delta +# TODO Save this static number somewhere else func get_ground_friction() -> float: - return 25.0 + return 22.0 # TODO Comments for parameters @@ -116,7 +154,12 @@ func calculate_deceleration_force(gravity: float, mass: float, delta: float) -> func calculate_jump_velocity( linear_velocity: Vector2, delta: float, direction: Vector2 ) -> Vector2: - linear_velocity.y += gravity * delta + if is_touching_wall_completely() && is_correct_walljump_input(direction): + # The faster you are moving up the farther the walljump goes + linear_velocity.y = (acceleration_force["walljump"].y / mass) * -1 + linear_velocity.x += max_velocity["walljump"] * direction.x + else: + linear_velocity.y += gravity * delta if _velocity.x == 0: linear_velocity.x += inair_velocity * direction.x return linear_velocity @@ -135,6 +178,24 @@ func calculate_fall_velocity( return linear_velocity +func calculate_wallslide_velocity( + linear_velocity: Vector2, delta: float, direction: Vector2 +) -> Vector2: + # Walljump mechanics + if is_correct_walljump_input(direction): + var multiplicator = max(min(1, 1000 / _velocity.y), 0.5) + linear_velocity.y += ( + (acceleration_force["walljump"].y / mass) + * -1 + * multiplicator + ) + linear_velocity.x += max_velocity["walljump"] * direction.x + else: + linear_velocity.y += gravity * delta * 0.4 + # linear_velocity.x += inair_velocity * direction.x + return linear_velocity + + func calculate_stomp_velocity(linear_velocity: Vector2, impulse: float) -> Vector2: var out := linear_velocity out.y = -impulse diff --git a/src/Actor/Blobby.tscn b/src/Actor/Blobby.tscn index 8ace383..d96898d 100644 --- a/src/Actor/Blobby.tscn +++ b/src/Actor/Blobby.tscn @@ -7,17 +7,16 @@ [ext_resource path="res://src/Actor/Blobby.gd" type="Script" id=5] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 9.78696, 20.3816 ) +extents = Vector2( 10.6846, 20.1701 ) [sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 11.4387, 20.1638 ) +extents = Vector2( 11.2458, 19.4685 ) [node name="Blobby" type="KinematicBody2D"] collision_mask = 8 script = ExtResource( 5 ) [node name="Player" type="Sprite" parent="."] -scale = Vector2( 0.64, 0.64 ) texture = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] @@ -30,7 +29,6 @@ script = ExtResource( 3 ) script = ExtResource( 4 ) [node name="Camera2D" type="Camera2D" parent="."] -visible = false position = Vector2( 0, -181 ) current = true limit_left = 0 @@ -54,15 +52,46 @@ shape = SubResource( 2 ) script = ExtResource( 2 ) [node name="StateLable" type="Label" parent="."] -margin_left = -30.7351 -margin_top = -30.3377 -margin_right = 31.2649 -margin_bottom = -14.3377 +margin_left = -25.3386 +margin_top = -34.2836 +margin_right = 25.6614 +margin_bottom = -20.2836 +custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Coochie" align = 1 valign = 1 __meta__ = { "_edit_use_anchors_": false } + +[node name="WallRaycasts" type="Node2D" parent="."] + +[node name="LeftWallRaycast" type="Node2D" parent="WallRaycasts"] + +[node name="Left_Wallcast1" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"] +position = Vector2( -10.706, -8.03844 ) +enabled = true +cast_to = Vector2( -1, 0 ) +collision_mask = 9 + +[node name="Left_Wallcast2" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"] +position = Vector2( -10.706, 14.8466 ) +enabled = true +cast_to = Vector2( -1, 0 ) +collision_mask = 9 + +[node name="RightWallRaycast" type="Node2D" parent="WallRaycasts"] + +[node name="Right_Wallcast1" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"] +position = Vector2( 10.6962, -8.03844 ) +enabled = true +cast_to = Vector2( 1, 0 ) +collision_mask = 9 + +[node name="Right_Wallcast2" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"] +position = Vector2( 10.6962, 14.8466 ) +enabled = true +cast_to = Vector2( 1, 0 ) +collision_mask = 9 [connection signal="area_entered" from="EnemyDetector" to="." method="_on_EnemyDetector_area_entered"] [connection signal="body_entered" from="EnemyDetector" to="." method="_on_EnemyDetector_body_entered"] diff --git a/src/Actor/Player.gd b/src/Actor/Player.gd index 06df6f2..9bbcd33 100644 --- a/src/Actor/Player.gd +++ b/src/Actor/Player.gd @@ -4,16 +4,21 @@ class_name Player const FLOOR_NORMAL := Vector2.UP export var stomp_feedback := 1000.0 -export var init_boost := false -export var inair_velocity := 18.3 -export var max_velocity := {"walk": 183, "run": 305, "fall": 832} +export var inair_velocity := 21 +export var wallslide_threshold := 1000 +export var max_velocity := { + "walk": 130, "run": 180, "fall": 987, "walljump": 150 +} +export var velocity_jump_boost_ratio := 0.4383 # This is added to the acceleration force initially -export var init_acceleration_force := {"walk": 3904, "run": 6506.67} +export var init_acceleration_force := {"walk": 4181, "run": 6765} # newtonmeters is the unit export var acceleration_force := { - "walk": Vector2(2928, 4575), "run": Vector2(2928, 4575) + "walk": Vector2(2584, 2000), + "run": Vector2(2584, 2000), + "walljump": Vector2(2548, 2000) } -export var gravity := 3904.0 +export var gravity := 1667.0 # Kilograms export var mass := 6 diff --git a/src/Actor/PlayerStateMachine.gd b/src/Actor/PlayerStateMachine.gd index 6531b22..9f7be9f 100644 --- a/src/Actor/PlayerStateMachine.gd +++ b/src/Actor/PlayerStateMachine.gd @@ -8,6 +8,7 @@ func _ready(): add_state("walk") add_state("jump") add_state("fall") + add_state("wallslide") print_debug(states) set_state(states.idle) @@ -36,6 +37,8 @@ func _state_logic(delta): handle_input_ref = funcref(self, 'handle_jump_input') "fall": handle_input_ref = funcref(self, 'handle_fall_input') + "wallslide": + handle_input_ref = funcref(self, 'handle_wallslide_input') _: print("don't panik") @@ -66,6 +69,10 @@ func handle_fall_input(delta, direction := get_horizontal_direction()) -> Vector return parent.handle_fall_movement(delta, direction) +func handle_wallslide_input(delta, direction := get_horizontal_direction()) -> Vector2: + return parent.handle_wallslide_movement(delta, direction) + + func get_horizontal_direction() -> Vector2: return Vector2( ( @@ -84,7 +91,6 @@ func _get_transition(delta): + String(round(parent._velocity.x)) ) var new_state - # TODO Can get stuck in Fall on ledges if ! parent.is_on_floor(): if parent._velocity.y < 0: new_state = states.jump @@ -92,11 +98,18 @@ func _get_transition(delta): # if self.state == states.run: # parent._velocity.y = 0 new_state = states.fall + if ( + parent.is_touching_wall_completely() + && parent._velocity.y <= parent.wallslide_threshold + ): + new_state = states.wallslide + elif parent._velocity.x != 0: if Input.is_action_pressed("boost_move"): new_state = states.run else: new_state = states.walk + else: # TODO How does this apply to enviornment induced movement? new_state = states.idle diff --git a/src/Levels/ApproxLevel.tscn b/src/Levels/ApproxLevel.tscn index 5cfb383..e4eaaaa 100644 --- a/src/Levels/ApproxLevel.tscn +++ b/src/Levels/ApproxLevel.tscn @@ -1,62 +1,44 @@ [gd_scene load_steps=9 format=2] [ext_resource path="res://src/Actor/Blobby.tscn" type="PackedScene" id=1] +[ext_resource path="res://start-assets/Basic stone block.png" type="Texture" id=2] [ext_resource path="res://start-assets/background.png" type="Texture" id=4] -[ext_resource path="res://start-assets/approx build block.png" type="Texture" id=6] [ext_resource path="res://start-assets/new_dynamicfont.tres" type="DynamicFont" id=7] -[sub_resource type="OccluderPolygon2D" id=1] -polygon = PoolVector2Array( 32, 32, 0, 32, 0, 0, 32, 0 ) +[sub_resource type="NavigationPolygon" id=1] +vertices = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) +polygons = [ PoolIntArray( 0, 1, 2, 3 ) ] -[sub_resource type="ConvexPolygonShape2D" id=2] -points = PoolVector2Array( 0, 0, 0, 32, 32, 32, 32, 0 ) +[sub_resource type="OccluderPolygon2D" id=2] +polygon = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) -[sub_resource type="ConcavePolygonShape2D" id=3] -segments = PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) +[sub_resource type="ConvexPolygonShape2D" id=3] +points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) [sub_resource type="TileSet" id=4] -0/name = "approx build block.png 0" -0/texture = ExtResource( 6 ) +0/name = "Basic stone block.png 0" +0/texture = ExtResource( 2 ) 0/tex_offset = Vector2( 0, 0 ) 0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 32, 32 ) +0/region = Rect2( 0, 0, 16, 16 ) 0/tile_mode = 0 0/occluder_offset = Vector2( 0, 0 ) -0/occluder = SubResource( 1 ) +0/occluder = SubResource( 2 ) 0/navigation_offset = Vector2( 0, 0 ) +0/navigation = SubResource( 1 ) 0/shape_offset = Vector2( 0, 0 ) 0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape = SubResource( 2 ) +0/shape = SubResource( 3 ) 0/shape_one_way = false 0/shape_one_way_margin = 1.0 0/shapes = [ { "autotile_coord": Vector2( 0, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 2 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 0, 0 ), -"one_way": false, -"one_way_margin": 1.0, "shape": SubResource( 3 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] 0/z_index = 0 -1/name = "approx build block.png 1" -1/texture = ExtResource( 6 ) -1/tex_offset = Vector2( 0, 0 ) -1/modulate = Color( 1, 1, 1, 1 ) -1/region = Rect2( 0, 0, 32, 32 ) -1/tile_mode = 0 -1/occluder_offset = Vector2( 0, 0 ) -1/navigation_offset = Vector2( 0, 0 ) -1/shape_offset = Vector2( 0, 0 ) -1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -1/shape_one_way = false -1/shape_one_way_margin = 0.0 -1/shapes = [ ] -1/z_index = 0 [node name="LevelTemplate" type="Node2D"] __meta__ = { @@ -68,14 +50,8 @@ __meta__ = { layer = -1 [node name="background" type="TextureRect" parent="CanvasLayer"] -anchor_left = 0.002 -anchor_top = -0.062 -anchor_right = 1.021 -anchor_bottom = 1.0 -margin_left = -1.696 -margin_top = 29.76 -margin_right = 158.192 -margin_bottom = 16.0 +margin_right = 426.667 +margin_bottom = 240.0 texture = ExtResource( 4 ) expand = true stretch_mode = 1 @@ -83,42 +59,74 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="TileMap" type="TileMap" parent="."] -tile_set = SubResource( 4 ) -cell_size = Vector2( 32, 32 ) -cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -collision_layer = 8 -collision_mask = 0 -format = 1 -tile_data = PoolIntArray( -196576, 0, 0, -196575, 0, 0, -196574, 0, 0, -196573, 0, 0, -196572, 0, 0, -196571, 0, 0, -196570, 0, 0, -196569, 0, 0, -196544, 0, 0, -196543, 0, 0, -196542, 0, 0, -196541, 0, 0, -196540, 0, 0, -196539, 0, 0, -196538, 0, 0, -196537, 0, 0, -131040, 0, 0, -131032, 0, 0, -131031, 0, 0, -131030, 0, 0, -131029, 0, 0, -131028, 0, 0, -131027, 0, 0, -131026, 0, 0, -131025, 0, 0, -131024, 0, 0, -131023, 0, 0, -131022, 0, 0, -131021, 0, 0, -131020, 0, 0, -131019, 0, 0, -131018, 0, 0, -131017, 0, 0, -131016, 0, 0, -131010, 0, 0, -131009, 0, 0, -131008, 0, 0, -131000, 0, 0, -130999, 0, 0, -130998, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, -65515, 0, 0, -65514, 0, 0, -65513, 0, 0, -65512, 0, 0, -65511, 0, 0, -65510, 0, 0, -65509, 0, 0, -65508, 0, 0, -65507, 0, 0, -65506, 0, 0, -65505, 0, 0, -65504, 0, 0, -65480, 0, 0, -65479, 0, 0, -65478, 0, 0, -65476, 0, 0, -65475, 0, 0, -65474, 0, 0, -65461, 0, 0, 65534, 0, 0, 0, 0, 0, 32, 0, 0, 33, 0, 0, 34, 0, 0, 35, 0, 0, 36, 0, 0, 37, 0, 0, 38, 0, 0, 39, 0, 0, 40, 0, 0, 41, 0, 0, 42, 0, 0, 43, 0, 0, 44, 0, 0, 45, 0, 0, 46, 0, 0, 47, 0, 0, 48, 0, 0, 49, 0, 0, 50, 0, 0, 51, 0, 0, 52, 0, 0, 53, 0, 0, 54, 0, 0, 55, 0, 0, 56, 0, 0, 57, 0, 0, 58, 0, 0, 59, 0, 0, 60, 0, 0, 76, 0, 0, 77, 0, 0, 78, 0, 0, 131070, 0, 0, 65536, 0, 0, 65615, 0, 0, 65616, 0, 0, 65617, 0, 0, 196606, 0, 0, 131072, 0, 0, 131154, 0, 0, 131155, 0, 0, 262142, 0, 0, 196608, 0, 0, 196691, 0, 0, 196692, 0, 0, 327678, 0, 0, 262144, 0, 0, 262228, 0, 0, 262229, 0, 0, 262230, 0, 0, 393214, 0, 0, 327680, 0, 0, 327766, 0, 0, 327767, 0, 0, 327768, 0, 0, 327769, 0, 0, 327770, 0, 0, 327771, 0, 0, 327772, 0, 0, 327773, 0, 0, 327774, 0, 0, 458750, 0, 0, 393216, 0, 0, 393310, 0, 0, 393311, 0, 0, 393312, 0, 0, 524286, 0, 0, 458752, 0, 0, 458821, 0, 0, 458822, 0, 0, 458823, 0, 0, 458824, 0, 0, 458848, 0, 0, 458849, 0, 0, 589822, 0, 0, 524288, 0, 0, 524357, 0, 0, 524360, 0, 0, 524385, 0, 0, 655358, 0, 0, 589824, 0, 0, 589893, 0, 0, 589896, 0, 0, 589897, 0, 0, 589921, 0, 0, 589922, 0, 0, 720894, 0, 0, 655360, 0, 0, 655419, 0, 0, 655420, 0, 0, 655421, 0, 0, 655424, 0, 0, 655425, 0, 0, 655426, 0, 0, 655427, 0, 0, 655429, 0, 0, 655433, 0, 0, 655458, 0, 0, 786430, 0, 0, 720896, 0, 0, 720916, 0, 0, 720951, 0, 0, 720952, 0, 0, 720955, 0, 0, 720958, 0, 0, 720959, 0, 0, 720960, 0, 0, 720963, 0, 0, 720965, 0, 0, 720969, 0, 0, 720970, 0, 0, 720993, 0, 0, 720994, 0, 0, 851966, 0, 0, 786432, 0, 0, 786452, 0, 0, 786453, 0, 0, 786490, 0, 0, 786491, 0, 0, 786499, 0, 0, 786500, 0, 0, 786501, 0, 0, 786505, 0, 0, 786507, 0, 0, 786508, 0, 0, 786529, 0, 0, 917501, 0, 0, 917502, 0, 0, 851968, 0, 0, 851985, 0, 0, 851988, 0, 0, 851989, 0, 0, 852026, 0, 0, 852027, 0, 0, 852035, 0, 0, 852036, 0, 0, 852041, 0, 0, 852042, 0, 0, 852043, 0, 0, 852044, 0, 0, 852045, 0, 0, 852049, 0, 0, 852065, 0, 0, 983037, 0, 0, 983038, 0, 0, 917504, 0, 0, 917505, 0, 0, 917506, 0, 0, 917507, 0, 0, 917508, 0, 0, 917509, 0, 0, 917510, 0, 0, 917511, 0, 0, 917512, 0, 0, 917513, 0, 0, 917517, 0, 0, 917518, 0, 0, 917519, 0, 0, 917520, 0, 0, 917521, 0, 0, 917522, 0, 0, 917523, 0, 0, 917524, 0, 0, 917525, 0, 0, 917526, 0, 0, 917527, 0, 0, 917528, 0, 0, 917529, 0, 0, 917530, 0, 0, 917531, 0, 0, 917532, 0, 0, 917533, 0, 0, 917534, 0, 0, 917535, 0, 0, 917536, 0, 0, 917537, 0, 0, 917538, 0, 0, 917539, 0, 0, 917540, 0, 0, 917541, 0, 0, 917542, 0, 0, 917543, 0, 0, 917544, 0, 0, 917545, 0, 0, 917546, 0, 0, 917547, 0, 0, 917548, 0, 0, 917549, 0, 0, 917550, 0, 0, 917551, 0, 0, 917552, 0, 0, 917553, 0, 0, 917554, 0, 0, 917555, 0, 0, 917556, 0, 0, 917557, 0, 0, 917558, 0, 0, 917559, 0, 0, 917560, 0, 0, 917561, 0, 0, 917562, 0, 0, 917563, 0, 0, 917571, 0, 0, 917572, 0, 0, 917581, 0, 0, 917601, 0, 0, 1048574, 0, 0, 1048575, 0, 0, 983040, 0, 0, 983041, 0, 0, 983045, 0, 0, 983046, 0, 0, 983047, 0, 0, 983048, 0, 0, 983049, 0, 0, 983054, 0, 0, 983098, 0, 0, 983117, 0, 0, 983124, 0, 0, 983125, 0, 0, 983126, 0, 0, 983137, 0, 0, 1114110, 0, 0, 1048579, 0, 0, 1048580, 0, 0, 1048581, 0, 0, 1048585, 0, 0, 1048586, 0, 0, 1048591, 0, 0, 1048634, 0, 0, 1048653, 0, 0, 1048673, 0, 0, 1179646, 0, 0, 1179647, 0, 0, 1114114, 0, 0, 1114115, 0, 0, 1114122, 0, 0, 1114123, 0, 0, 1114127, 0, 0, 1114150, 0, 0, 1114151, 0, 0, 1114152, 0, 0, 1114153, 0, 0, 1114154, 0, 0, 1114155, 0, 0, 1114156, 0, 0, 1114157, 0, 0, 1114158, 0, 0, 1114163, 0, 0, 1114164, 0, 0, 1114165, 0, 0, 1114166, 0, 0, 1114167, 0, 0, 1114169, 0, 0, 1114170, 0, 0, 1114188, 0, 0, 1114189, 0, 0, 1114208, 0, 0, 1114209, 0, 0, 1245183, 0, 0, 1179648, 0, 0, 1179649, 0, 0, 1179650, 0, 0, 1179660, 0, 0, 1179661, 0, 0, 1179662, 0, 0, 1179663, 0, 0, 1179664, 0, 0, 1179665, 0, 0, 1179666, 0, 0, 1179667, 0, 0, 1179668, 0, 0, 1179669, 0, 0, 1179670, 0, 0, 1179671, 0, 0, 1179672, 0, 0, 1179673, 0, 0, 1179674, 0, 0, 1179675, 0, 0, 1179676, 0, 0, 1179677, 0, 0, 1179678, 0, 0, 1179679, 0, 0, 1179680, 0, 0, 1179683, 0, 0, 1179684, 0, 0, 1179685, 0, 0, 1179694, 0, 0, 1179695, 0, 0, 1179697, 0, 0, 1179698, 0, 0, 1179699, 0, 0, 1179704, 0, 0, 1179705, 0, 0, 1179724, 0, 0, 1179736, 0, 0, 1179737, 0, 0, 1179738, 0, 0, 1179744, 0, 0, 1245184, 0, 0, 1245185, 0, 0, 1245216, 0, 0, 1245217, 0, 0, 1245218, 0, 0, 1245219, 0, 0, 1245231, 0, 0, 1245232, 0, 0, 1245233, 0, 0, 1245260, 0, 0, 1245280, 0, 0, 1310796, 0, 0, 1310814, 0, 0, 1310815, 0, 0, 1310816, 0, 0, 1376332, 0, 0, 1376349, 0, 0, 1376350, 0, 0, 1441868, 0, 0, 1441886, 0, 0, 1507404, 0, 0, 1507419, 0, 0, 1507420, 0, 0, 1507421, 0, 0, 1572940, 0, 0, 1572955, 0, 0, 1638476, 0, 0, 1638490, 0, 0, 1638491, 0, 0, 1704012, 0, 0, 1704027, 0, 0, 1769548, 0, 0, 1769549, 0, 0, 1769561, 0, 0, 1769562, 0, 0, 1769563, 0, 0, 1835085, 0, 0, 1835096, 0, 0, 1835097, 0, 0, 1900621, 0, 0, 1900633, 0, 0, 1966157, 0, 0, 1966167, 0, 0, 1966168, 0, 0, 1966169, 0, 0, 2031693, 0, 0, 2031705, 0, 0, 2097229, 0, 0, 2097237, 0, 0, 2097238, 0, 0, 2097239, 0, 0, 2097240, 0, 0, 2097241, 0, 0, 2097242, 0, 0, 2162765, 0, 0, 2162778, 0, 0, 2228301, 0, 0, 2228302, 0, 0, 2228314, 0, 0, 2293838, 0, 0, 2293839, 0, 0, 2293840, 0, 0, 2293841, 0, 0, 2293842, 0, 0, 2293843, 0, 0, 2293844, 0, 0, 2293845, 0, 0, 2293846, 0, 0, 2293847, 0, 0, 2293848, 0, 0, 2293849, 0, 0, 2293850, 0, 0 ) - [node name="Blobby" parent="." instance=ExtResource( 1 )] -position = Vector2( 131.28, 398.61 ) +position = Vector2( 56.3835, 522.122 ) [node name="Player" parent="Blobby" index="0"] position = Vector2( 0.279999, 0 ) -scale = Vector2( 1, 1 ) + +[node name="CollisionShape2D" parent="Blobby" index="1"] +position = Vector2( 0, 0.14032 ) [node name="RayCastDebugLines" parent="Blobby/CollisionShape2D/RayCaster" index="0"] points = PoolVector2Array( -6.10207, -4.13742 ) [node name="Camera2D" parent="Blobby" index="2"] -visible = true position = Vector2( 0, 0 ) -zoom = Vector2( 1, 1.1 ) -limit_top = -32 -limit_right = 5000 -limit_bottom = 10000 +limit_right = 974 +limit_bottom = 638 smoothing_enabled = false +drag_margin_left = 0.3 +drag_margin_top = 0.4 +drag_margin_right = 0.3 +drag_margin_bottom = 0.4 +editor_draw_limits = true + +[node name="CollisionShape2D" parent="Blobby/EnemyDetector" index="0"] +position = Vector2( 0, 0.14032 ) [node name="StateLable" parent="Blobby" index="5"] -margin_left = -23.7895 -margin_top = -37.0774 -margin_right = 27.2105 -margin_bottom = -23.0774 +margin_left = -23.889 +margin_top = -33.9531 +margin_right = 27.111 +margin_bottom = -19.9531 size_flags_horizontal = 0 size_flags_vertical = 0 custom_fonts/font = ExtResource( 7 ) text = "State" +[node name="WallRaycasts" parent="Blobby" index="6"] +position = Vector2( 0, 0.14032 ) + +[node name="LeftWallRaycast" parent="Blobby/WallRaycasts" index="0"] +position = Vector2( -4.56001, -0.982147 ) + +[node name="Left_Wallcast1" parent="Blobby/WallRaycasts/LeftWallRaycast" index="0"] +position = Vector2( -6.16, -3.41351 ) +collision_mask = 8 + +[node name="Left_Wallcast2" parent="Blobby/WallRaycasts/LeftWallRaycast" index="1"] +position = Vector2( -6.16, 17.3041 ) +collision_mask = 8 + +[node name="RightWallRaycast" parent="Blobby/WallRaycasts" index="1"] +position = Vector2( 3.15692, -0.982147 ) + +[node name="Right_Wallcast1" parent="Blobby/WallRaycasts/RightWallRaycast" index="0"] +position = Vector2( 7.57186, -3.41351 ) +collision_mask = 8 + +[node name="Right_Wallcast2" parent="Blobby/WallRaycasts/RightWallRaycast" index="1"] +position = Vector2( 7.57186, 17.3041 ) +collision_mask = 8 + +[node name="TileMap" type="TileMap" parent="."] +tile_set = SubResource( 4 ) +cell_size = Vector2( 16, 16 ) +cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 ) +collision_layer = 8 +collision_mask = 2147483648 +format = 1 +tile_data = PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 22, 0, 0, 23, 0, 0, 24, 0, 0, 25, 0, 0, 26, 0, 0, 27, 0, 0, 28, 0, 0, 29, 0, 0, 30, 0, 0, 31, 0, 0, 32, 0, 0, 33, 0, 0, 34, 0, 0, 35, 0, 0, 36, 0, 0, 37, 0, 0, 38, 0, 0, 39, 0, 0, 40, 0, 0, 41, 0, 0, 42, 0, 0, 43, 0, 0, 44, 0, 0, 45, 0, 0, 46, 0, 0, 47, 0, 0, 48, 0, 0, 49, 0, 0, 50, 0, 0, 51, 0, 0, 52, 0, 0, 53, 0, 0, 54, 0, 0, 55, 0, 0, 56, 0, 0, 57, 0, 0, 58, 0, 0, 59, 0, 0, 60, 0, 0, 65536, 0, 0, 65596, 0, 0, 131072, 0, 0, 131132, 0, 0, 196608, 0, 0, 196668, 0, 0, 262144, 0, 0, 262204, 0, 0, 327680, 0, 0, 327740, 0, 0, 393216, 0, 0, 393276, 0, 0, 458752, 0, 0, 458812, 0, 0, 524288, 0, 0, 524348, 0, 0, 589824, 0, 0, 589884, 0, 0, 655360, 0, 0, 655420, 0, 0, 720896, 0, 0, 720956, 0, 0, 786432, 0, 0, 786492, 0, 0, 851968, 0, 0, 852028, 0, 0, 917504, 0, 0, 917564, 0, 0, 983040, 0, 0, 983100, 0, 0, 1048576, 0, 0, 1048636, 0, 0, 1114112, 0, 0, 1114172, 0, 0, 1179648, 0, 0, 1179708, 0, 0, 1245184, 0, 0, 1245244, 0, 0, 1310720, 0, 0, 1310780, 0, 0, 1376256, 0, 0, 1376316, 0, 0, 1441792, 0, 0, 1441852, 0, 0, 1507328, 0, 0, 1507388, 0, 0, 1572864, 0, 0, 1572865, 0, 0, 1572866, 0, 0, 1572867, 0, 0, 1572924, 0, 0, 1638400, 0, 0, 1638401, 0, 0, 1638402, 0, 0, 1638454, 0, 0, 1638455, 0, 0, 1638460, 0, 0, 1703936, 0, 0, 1703937, 0, 0, 1703938, 0, 0, 1703943, 0, 0, 1703944, 0, 0, 1703996, 0, 0, 1769472, 0, 0, 1769473, 0, 0, 1769474, 0, 0, 1769479, 0, 0, 1769480, 0, 0, 1769481, 0, 0, 1769482, 0, 0, 1769483, 0, 0, 1769487, 0, 0, 1769488, 0, 0, 1769489, 0, 0, 1769495, 0, 0, 1769500, 0, 0, 1769501, 0, 0, 1769502, 0, 0, 1769503, 0, 0, 1769504, 0, 0, 1769532, 0, 0, 1835008, 0, 0, 1835009, 0, 0, 1835044, 0, 0, 1835045, 0, 0, 1835067, 0, 0, 1835068, 0, 0, 1900544, 0, 0, 1900565, 0, 0, 1900566, 0, 0, 1900584, 0, 0, 1900585, 0, 0, 1900586, 0, 0, 1900587, 0, 0, 1900588, 0, 0, 1900603, 0, 0, 1900604, 0, 0, 1966080, 0, 0, 1966138, 0, 0, 1966139, 0, 0, 1966140, 0, 0, 2031616, 0, 0, 2031663, 0, 0, 2031664, 0, 0, 2031665, 0, 0, 2031673, 0, 0, 2031674, 0, 0, 2031675, 0, 0, 2031676, 0, 0, 2097152, 0, 0, 2097208, 0, 0, 2097209, 0, 0, 2097210, 0, 0, 2097211, 0, 0, 2097212, 0, 0, 2162688, 0, 0, 2162744, 0, 0, 2162745, 0, 0, 2162746, 0, 0, 2162747, 0, 0, 2162748, 0, 0, 2228224, 0, 0, 2228277, 0, 0, 2228278, 0, 0, 2228279, 0, 0, 2228280, 0, 0, 2228281, 0, 0, 2228282, 0, 0, 2228283, 0, 0, 2228284, 0, 0, 2293760, 0, 0, 2293775, 0, 0, 2293776, 0, 0, 2293813, 0, 0, 2293814, 0, 0, 2293815, 0, 0, 2293816, 0, 0, 2293817, 0, 0, 2293818, 0, 0, 2293819, 0, 0, 2293820, 0, 0, 2359296, 0, 0, 2359297, 0, 0, 2359298, 0, 0, 2359299, 0, 0, 2359300, 0, 0, 2359301, 0, 0, 2359302, 0, 0, 2359303, 0, 0, 2359304, 0, 0, 2359305, 0, 0, 2359306, 0, 0, 2359307, 0, 0, 2359308, 0, 0, 2359309, 0, 0, 2359310, 0, 0, 2359311, 0, 0, 2359312, 0, 0, 2359313, 0, 0, 2359314, 0, 0, 2359315, 0, 0, 2359316, 0, 0, 2359317, 0, 0, 2359321, 0, 0, 2359322, 0, 0, 2359323, 0, 0, 2359324, 0, 0, 2359325, 0, 0, 2359326, 0, 0, 2359327, 0, 0, 2359328, 0, 0, 2359329, 0, 0, 2359330, 0, 0, 2359331, 0, 0, 2359332, 0, 0, 2359333, 0, 0, 2359334, 0, 0, 2359335, 0, 0, 2359336, 0, 0, 2359342, 0, 0, 2359343, 0, 0, 2359344, 0, 0, 2359345, 0, 0, 2359346, 0, 0, 2359347, 0, 0, 2359348, 0, 0, 2359349, 0, 0, 2359350, 0, 0, 2359351, 0, 0, 2359352, 0, 0, 2359353, 0, 0, 2359354, 0, 0, 2359355, 0, 0, 2359356, 0, 0, 2424832, 0, 0, 2424833, 0, 0, 2424834, 0, 0, 2424835, 0, 0, 2424836, 0, 0, 2424837, 0, 0, 2424838, 0, 0, 2424839, 0, 0, 2424840, 0, 0, 2424841, 0, 0, 2424842, 0, 0, 2424843, 0, 0, 2424844, 0, 0, 2424845, 0, 0, 2424846, 0, 0, 2424847, 0, 0, 2424848, 0, 0, 2424849, 0, 0, 2424850, 0, 0, 2424851, 0, 0, 2424852, 0, 0, 2424853, 0, 0, 2424854, 0, 0, 2424857, 0, 0, 2424858, 0, 0, 2424859, 0, 0, 2424860, 0, 0, 2424861, 0, 0, 2424862, 0, 0, 2424863, 0, 0, 2424864, 0, 0, 2424865, 0, 0, 2424866, 0, 0, 2424867, 0, 0, 2424868, 0, 0, 2424869, 0, 0, 2424870, 0, 0, 2424871, 0, 0, 2424872, 0, 0, 2424873, 0, 0, 2424874, 0, 0, 2424878, 0, 0, 2424879, 0, 0, 2424880, 0, 0, 2424881, 0, 0, 2424882, 0, 0, 2424883, 0, 0, 2424884, 0, 0, 2424885, 0, 0, 2424886, 0, 0, 2424887, 0, 0, 2424888, 0, 0, 2424889, 0, 0, 2424890, 0, 0, 2424891, 0, 0, 2424892, 0, 0, 2490368, 0, 0, 2490369, 0, 0, 2490370, 0, 0, 2490371, 0, 0, 2490372, 0, 0, 2490373, 0, 0, 2490374, 0, 0, 2490375, 0, 0, 2490376, 0, 0, 2490377, 0, 0, 2490378, 0, 0, 2490379, 0, 0, 2490380, 0, 0, 2490381, 0, 0, 2490382, 0, 0, 2490383, 0, 0, 2490384, 0, 0, 2490385, 0, 0, 2490386, 0, 0, 2490387, 0, 0, 2490388, 0, 0, 2490389, 0, 0, 2490390, 0, 0, 2490393, 0, 0, 2490394, 0, 0, 2490395, 0, 0, 2490396, 0, 0, 2490397, 0, 0, 2490398, 0, 0, 2490399, 0, 0, 2490400, 0, 0, 2490401, 0, 0, 2490402, 0, 0, 2490403, 0, 0, 2490404, 0, 0, 2490405, 0, 0, 2490406, 0, 0, 2490407, 0, 0, 2490408, 0, 0, 2490409, 0, 0, 2490410, 0, 0, 2490414, 0, 0, 2490415, 0, 0, 2490416, 0, 0, 2490417, 0, 0, 2490418, 0, 0, 2490419, 0, 0, 2490420, 0, 0, 2490421, 0, 0, 2490422, 0, 0, 2490423, 0, 0, 2490424, 0, 0, 2490425, 0, 0, 2490426, 0, 0, 2490427, 0, 0, 2490428, 0, 0, 2555904, 0, 0, 2555905, 0, 0, 2555906, 0, 0, 2555907, 0, 0, 2555908, 0, 0, 2555909, 0, 0, 2555910, 0, 0, 2555911, 0, 0, 2555912, 0, 0, 2555913, 0, 0, 2555914, 0, 0, 2555915, 0, 0, 2555916, 0, 0, 2555917, 0, 0, 2555918, 0, 0, 2555919, 0, 0, 2555920, 0, 0, 2555921, 0, 0, 2555922, 0, 0, 2555923, 0, 0, 2555924, 0, 0, 2555925, 0, 0, 2555926, 0, 0, 2555927, 0, 0, 2555928, 0, 0, 2555929, 0, 0, 2555930, 0, 0, 2555931, 0, 0, 2555932, 0, 0, 2555933, 0, 0, 2555934, 0, 0, 2555935, 0, 0, 2555936, 0, 0, 2555937, 0, 0, 2555938, 0, 0, 2555939, 0, 0, 2555940, 0, 0, 2555941, 0, 0, 2555942, 0, 0, 2555943, 0, 0, 2555944, 0, 0, 2555945, 0, 0, 2555946, 0, 0, 2555947, 0, 0, 2555948, 0, 0, 2555949, 0, 0, 2555950, 0, 0, 2555951, 0, 0, 2555952, 0, 0, 2555953, 0, 0, 2555954, 0, 0, 2555955, 0, 0, 2555956, 0, 0, 2555957, 0, 0, 2555958, 0, 0, 2555959, 0, 0, 2555960, 0, 0, 2555961, 0, 0, 2555962, 0, 0, 2555963, 0, 0, 2555964, 0, 0 ) + [editable path="Blobby"] diff --git a/src/Levels/Level02.tscn b/src/Levels/Level02.tscn index ff482f2..f6b1bb7 100644 --- a/src/Levels/Level02.tscn +++ b/src/Levels/Level02.tscn @@ -58,7 +58,6 @@ tile_data = PoolIntArray( 0, 0, 0, 65536, 0, 0, 131072, 0, 0, 196608, 0, 0, 2621 [node name="Blobby" parent="." instance=ExtResource( 1 )] position = Vector2( 131, 560 ) -speed = Vector2( 800, 1000 ) gravity = 4000.0 [node name="Camera2D" parent="Blobby" index="2"] @@ -83,5 +82,4 @@ position = Vector2( 0, 3 ) position = Vector2( 749, 274 ) [editable path="Blobby"] - [editable path="Coin"] diff --git a/src/Levels/Level03.tscn b/src/Levels/Level03.tscn index edfab8d..647e384 100644 --- a/src/Levels/Level03.tscn +++ b/src/Levels/Level03.tscn @@ -40,9 +40,6 @@ tile_data = PoolIntArray( -1048576, 0, 0, -1048564, 0, 0, -983040, 0, 0, -983028 [node name="Blobby" parent="." instance=ExtResource( 1 )] position = Vector2( 131, 560 ) -[node name="player" parent="Blobby" index="0"] -position = Vector2( 0, -32 ) - [node name="CollisionShape2D" parent="Blobby" index="1"] position = Vector2( 0.224487, -32.0436 ) diff --git a/src/Levels/Level03.tscn.tmp b/src/Levels/Level03.tscn.tmp deleted file mode 100644 index 6468e0e..0000000 --- a/src/Levels/Level03.tscn.tmp +++ /dev/null @@ -1,82 +0,0 @@ -[gd_scene load_steps=9 format=2] - -[ext_resource path="res://src/Actor/Blobby.tscn" type="PackedScene" id=1] -[ext_resource path="res://start-assets/tileset.tres" type="TileSet" id=2] -[ext_resource path="res://src/Actor/Enemy.tscn" type="PackedScene" id=3] -[ext_resource path="res://start-assets/background.png" type="Texture" id=4] -[ext_resource path="res://src/Objects/Coin.tscn" type="PackedScene" id=5] -[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=6] -[ext_resource path="res://src/UserInterface/EndsScreen.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/Objects/Portal.tscn" type="PackedScene" id=8] - -[node name="Level03" type="Node2D"] - -[node name="UserInterface" type="CanvasLayer" parent="."] - -[node name="UserInterface" parent="UserInterface" instance=ExtResource( 6 )] - -[node name="BackgroundLayer" type="CanvasLayer" parent="."] -layer = -1 - -[node name="background" type="TextureRect" parent="BackgroundLayer"] -anchor_right = 1.016 -anchor_bottom = 1.0 -margin_right = -0.384033 -texture = ExtResource( 4 ) -expand = true -stretch_mode = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="TileMap" type="TileMap" parent="."] -tile_set = ExtResource( 2 ) -cell_size = Vector2( 80, 80 ) -collision_layer = 8 -collision_mask = 0 -format = 1 -tile_data = PoolIntArray( -1048576, 0, 0, -1048564, 0, 0, -983040, 0, 0, -983028, 0, 0, -917504, 0, 0, -917492, 0, 0, -851968, 0, 0, -851956, 0, 0, -786432, 0, 0, -786420, 0, 0, -720896, 0, 0, -720884, 0, 0, -655360, 0, 0, -655348, 0, 0, -589824, 0, 0, -589812, 0, 0, -524288, 0, 0, -524276, 0, 0, -458752, 0, 0, -458740, 0, 0, -393216, 0, 0, -393215, 0, 0, -393214, 0, 0, -393213, 0, 0, -393204, 0, 0, -327680, 0, 0, -327668, 0, 0, -262144, 0, 0, -262132, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196596, 0, 0, -131072, 0, 0, -131060, 0, 0, -65536, 0, 0, -65524, 0, 0, 0, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 12, 0, 0, 65536, 0, 0, 65544, 0, 0, 65548, 0, 0, 131072, 0, 0, 131084, 0, 0, 196608, 0, 0, 196620, 0, 0, 262144, 0, 0, 262149, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 327680, 0, 0, 327681, 0, 0, 327692, 0, 0, 393216, 0, 0, 393228, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0 ) - -[node name="Blobby" parent="." instance=ExtResource( 1 )] -position = Vector2( 300, 560 ) - -[node name="CollisionShape2D" parent="Blobby" index="1"] -position = Vector2( 0.224487, -32.0436 ) - -[node name="Camera2D" parent="Blobby" index="2"] -position = Vector2( 390.714, -75 ) -limit_top = -10000 -limit_right = 1040 -limit_bottom = 700 -drag_margin_h_enabled = false -smoothing_enabled = false -editor_draw_limits = true - -[node name="EnemyDetector" parent="Blobby" index="3"] -position = Vector2( 14.6832, -44.0497 ) - -[node name="CollisionShape2D" parent="Blobby/EnemyDetector" index="0"] -position = Vector2( -14.4587, 12.8269 ) - -[node name="Enemy" parent="." instance=ExtResource( 3 )] -position = Vector2( 715.5, 560 ) - -[node name="Coin" parent="." instance=ExtResource( 5 )] -position = Vector2( 592, 352 ) - -[node name="coin" parent="Coin" index="0"] -position = Vector2( 0, 3 ) - -[node name="CollisionShape2D" parent="Coin" index="1"] -position = Vector2( 0, 3 ) - -[node name="Coin2" parent="." instance=ExtResource( 5 )] -position = Vector2( 749, 274 ) - -[node name="Portal" parent="." instance=ExtResource( 8 )] -position = Vector2( 130.332, -461.479 ) -next_scene = ExtResource( 7 ) - -[editable path="Blobby"] - -[editable path="Coin"] diff --git a/src/Levels/LevelTemplate.tscn b/src/Levels/LevelTemplate.tscn index ab09b54..a0a3ae0 100644 --- a/src/Levels/LevelTemplate.tscn +++ b/src/Levels/LevelTemplate.tscn @@ -1,12 +1,14 @@ -[gd_scene load_steps=10 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://src/Actor/Blobby.tscn" type="PackedScene" id=1] [ext_resource path="res://start-assets/tileset.png" type="Texture" id=2] [ext_resource path="res://src/Actor/Enemy.tscn" type="PackedScene" id=3] [ext_resource path="res://start-assets/background.png" type="Texture" id=4] [ext_resource path="res://src/Objects/Coin.tscn" type="PackedScene" id=5] -[ext_resource path="res://src/Levels/Level03.tscn" type="PackedScene" id=6] +[ext_resource path="res://src/UserInterface/UserInterface.tscn" type="PackedScene" id=6] [ext_resource path="res://src/Objects/Portal.tscn" type="PackedScene" id=7] +[ext_resource path="res://src/UserInterface/EndsScreen.tscn" type="PackedScene" id=8] +[ext_resource path="res://start-assets/tileset.tres" type="TileSet" id=9] [sub_resource type="ConvexPolygonShape2D" id=1] points = PoolVector2Array( 0, 0, 80, 0, 80, 80, 0, 80 ) @@ -34,6 +36,21 @@ points = PoolVector2Array( 0, 0, 80, 0, 80, 80, 0, 80 ) } ] 0/z_index = 0 +[sub_resource type="PackedScene" id=3] +_bundled = { +"conn_count": 0, +"conns": PoolIntArray( ), +"editable_instances": [ NodePath("Blobby"), NodePath("Coin") ], +"names": PoolStringArray( "Level03", "Node2D", "UserInterface", "CanvasLayer", "UserInterface", "BackgroundLayer", "CanvasLayer", "layer", "background", "TextureRect", "anchor_right", "anchor_bottom", "margin_right", "texture", "expand", "stretch_mode", "__meta__", "TileMap", "TileMap", "tile_set", "cell_size", "collision_layer", "collision_mask", "format", "tile_data", "Blobby", "position", "player", "position", "CollisionShape2D", "position", "Camera2D", "position", "limit_top", "limit_right", "limit_bottom", "drag_margin_h_enabled", "smoothing_enabled", "editor_draw_limits", "EnemyDetector", "position", "CollisionShape2D", "position", "Enemy", "position", "Coin", "position", "coin", "position", "CollisionShape2D", "position", "Coin2", "position", "Portal", "position", "next_scene" ), +"node_count": 18, +"node_paths": [ NodePath("."), NodePath("./UserInterface"), NodePath("."), NodePath("./BackgroundLayer"), NodePath("."), NodePath("."), NodePath("./Blobby"), NodePath("./Blobby"), NodePath("./Blobby"), NodePath("./Blobby"), NodePath("./Blobby/EnemyDetector"), NodePath("."), NodePath("."), NodePath("./Coin"), NodePath("./Coin"), NodePath("."), NodePath(".") ], +"nodes": PoolIntArray( -1, -1, 1, 0, -1, 0, 0, 1073741824, 0, 3, 2, -1, 0, 0, 1073741825, 0, 2147483647, 4, 0, 0, 0, 1073741826, 0, 6, 5, -1, 1, 7, 1, 0, 1073741827, 0, 9, 8, -1, 7, 10, 2, 11, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 0, 1073741828, 0, 18, 17, -1, 6, 19, 9, 20, 10, 21, 11, 22, 12, 23, 13, 24, 14, 0, 1073741829, 0, 2147483647, 25, 15, 1, 26, 16, 0, 1073741830, -1, 2147483647, 262171, -1, 1, 28, 17, 0, 1073741831, -1, 2147483647, 524317, -1, 1, 30, 18, 0, 1073741832, -1, 2147483647, 786463, -1, 7, 32, 19, 33, 20, 34, 21, 35, 22, 36, 23, 37, 24, 38, 25, 0, 1073741833, -1, 2147483647, 1048615, -1, 1, 40, 26, 0, 1073741834, -1, 2147483647, 262185, -1, 1, 42, 27, 0, 1073741835, 0, 2147483647, 43, 28, 1, 44, 29, 0, 1073741836, 0, 2147483647, 45, 30, 1, 46, 31, 0, 1073741837, -1, 2147483647, 262191, -1, 1, 48, 32, 0, 1073741838, -1, 2147483647, 524337, -1, 1, 50, 33, 0, 1073741839, 0, 2147483647, 51, 34, 1, 52, 35, 0, 1073741840, 0, 2147483647, 53, 36, 2, 54, 37, 55, 38, 0 ), +"variants": [ ExtResource( 6 ), -1, 1.016, 1.0, -0.384033, ExtResource( 4 ), true, 1, { +"_edit_use_anchors_": false +}, ExtResource( 9 ), Vector2( 80, 80 ), 8, 0, 1, PoolIntArray( -1048576, 0, 0, -1048564, 0, 0, -983040, 0, 0, -983028, 0, 0, -917504, 0, 0, -917492, 0, 0, -851968, 0, 0, -851956, 0, 0, -786432, 0, 0, -786420, 0, 0, -720896, 0, 0, -720884, 0, 0, -655360, 0, 0, -655348, 0, 0, -589824, 0, 0, -589812, 0, 0, -524288, 0, 0, -524276, 0, 0, -458752, 0, 0, -458740, 0, 0, -393216, 0, 0, -393215, 0, 0, -393214, 0, 0, -393213, 0, 0, -393204, 0, 0, -327680, 0, 0, -327668, 0, 0, -262144, 0, 0, -262132, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196596, 0, 0, -131072, 0, 0, -131060, 0, 0, -65536, 0, 0, -65524, 0, 0, 0, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 12, 0, 0, 65536, 0, 0, 65544, 0, 0, 65548, 0, 0, 131072, 0, 0, 131084, 0, 0, 196608, 0, 0, 196620, 0, 0, 262144, 0, 0, 262149, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 327680, 0, 0, 327681, 0, 0, 327692, 0, 0, 393216, 0, 0, 393228, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0 ), ExtResource( 1 ), Vector2( 131, 560 ), Vector2( 0, -32 ), Vector2( 0.224487, -32.0436 ), Vector2( 390.714, -75 ), -10000, 1040, 700, false, false, true, Vector2( 14.6832, -44.0497 ), Vector2( -15.3507, 14.3845 ), ExtResource( 3 ), Vector2( 715.5, 560 ), ExtResource( 5 ), Vector2( 592, 352 ), Vector2( 0, 3 ), Vector2( 0, 3 ), ExtResource( 5 ), Vector2( 749, 274 ), ExtResource( 7 ), Vector2( 130.332, -461.479 ), ExtResource( 8 ) ], +"version": 2 +} + [node name="LevelTemplate" type="Node2D"] __meta__ = { "_edit_horizontal_guides_": [ 464.0 ], @@ -90,7 +107,7 @@ position = Vector2( 445, 199 ) [node name="Portal" parent="." instance=ExtResource( 7 )] position = Vector2( 131, 339 ) -next_scene = ExtResource( 6 ) +next_scene = SubResource( 3 ) [editable path="Blobby"] diff --git a/src/Screens/MainScreen.tscn b/src/Screens/MainScreen.tscn index 8b20d8d..6747312 100644 --- a/src/Screens/MainScreen.tscn +++ b/src/Screens/MainScreen.tscn @@ -9,12 +9,22 @@ [node name="MainScreen" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 +margin_right = -1493.33 +margin_bottom = -840.0 theme = ExtResource( 5 ) __meta__ = { "_edit_use_anchors_": false } -[node name="background" type="TextureRect" parent="."] +[node name="ViewportContainer" type="ViewportContainer" parent="."] +margin_right = 426.667 +margin_bottom = 240.0 +stretch = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="background" type="TextureRect" parent="ViewportContainer"] anchor_right = 1.0 anchor_bottom = 1.0 texture = ExtResource( 4 ) @@ -24,39 +34,38 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="Titel" parent="." instance=ExtResource( 2 )] +[node name="Titel" parent="ViewportContainer" instance=ExtResource( 2 )] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -165.023 -margin_top = 60.2735 -margin_right = 159.977 -margin_bottom = 145.273 +margin_left = -83.3335 +margin_right = 91.6665 +margin_bottom = 85.0 grow_horizontal = 2 size_flags_horizontal = 2 size_flags_vertical = 2 -text = "Wumper" +text = "poá¹£a" -[node name="MenuContainer" type="VBoxContainer" parent="."] +[node name="MenuContainer" type="VBoxContainer" parent="ViewportContainer"] anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -73.0 -margin_top = -80.5 -margin_right = 73.0 -margin_bottom = 80.5 +margin_left = -43.3335 +margin_right = 53.6665 +margin_bottom = 81.0 __meta__ = { "_edit_use_anchors_": false } -[node name="PlayButton" parent="MenuContainer" instance=ExtResource( 3 )] -margin_right = 146.0 +[node name="PlayButton" parent="ViewportContainer/MenuContainer" instance=ExtResource( 3 )] +margin_right = 97.0 +margin_bottom = 38.0 next_scene_path = "res://src/Levels/ApproxLevel.tscn" -[node name="QuitButton" parent="MenuContainer" instance=ExtResource( 1 )] +[node name="QuitButton" parent="ViewportContainer/MenuContainer" instance=ExtResource( 1 )] anchor_left = 0.0 anchor_right = 0.0 margin_left = 0.0 -margin_top = 82.0 -margin_right = 146.0 -margin_bottom = 161.0 +margin_top = 42.0 +margin_right = 97.0 +margin_bottom = 81.0 diff --git a/start-assets/Basic stone block.png b/start-assets/Basic stone block.png new file mode 100644 index 0000000..3248710 Binary files /dev/null and b/start-assets/Basic stone block.png differ diff --git a/start-assets/Basic stone block.png.import b/start-assets/Basic stone block.png.import new file mode 100644 index 0000000..5798104 --- /dev/null +++ b/start-assets/Basic stone block.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Basic stone block.png-cb4ca55f71cbc16699bc7d20b5c1b78f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://start-assets/Basic stone block.png" +dest_files=[ "res://.import/Basic stone block.png-cb4ca55f71cbc16699bc7d20b5c1b78f.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=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0