From 7d3a99b284d1b45b35c7c4dc8d0cec849b9ae785 Mon Sep 17 00:00:00 2001 From: Jakob Feldmann Date: Sun, 11 Apr 2021 01:54:59 +0200 Subject: [PATCH] Working jumps and friction --- project.godot | 4 + src/Actor/Actor.gd | 7 +- src/Actor/Blobby.gd | 44 +++++--- src/Actor/Blobby.tscn | 17 ++- src/Actor/Blobby.tscn.tmp | 74 ------------ src/Actor/PlayerStateMachine.gd | 9 +- src/Levels/ApproxLevel.tscn | 124 +++++++++++++++++++++ src/Screens/MainScreen.tscn | 14 +-- start-assets/approx build block.png | Bin 0 -> 607 bytes start-assets/approx build block.png.import | 34 ++++++ start-assets/approx mannequin.png | Bin 0 -> 867 bytes start-assets/approx mannequin.png.import | 34 ++++++ start-assets/new_dynamicfont.tres | 4 +- 13 files changed, 249 insertions(+), 116 deletions(-) delete mode 100644 src/Actor/Blobby.tscn.tmp create mode 100644 src/Levels/ApproxLevel.tscn create mode 100644 start-assets/approx build block.png create mode 100644 start-assets/approx build block.png.import create mode 100644 start-assets/approx mannequin.png create mode 100644 start-assets/approx mannequin.png.import diff --git a/project.godot b/project.godot index 796cc0f..9ed8854 100644 --- a/project.godot +++ b/project.godot @@ -52,6 +52,8 @@ settings/fps/force_fps=144 [display] +window/size/width=848 +window/size/height=480 window/stretch/mode="2d" [input] @@ -95,6 +97,8 @@ pause={ quality/intended_usage/framebuffer_allocation=0 quality/intended_usage/framebuffer_allocation.mobile=0 quality/2d/use_pixel_snap=true +quality/filters/use_nearest_mipmap_filter=true +quality/filters/msaa=1 environment/default_environment="res://default_env.tres" environment/2d/use_nvidia_rect_flicker_workaround=true environment/stretch/aspect="ignore" diff --git a/src/Actor/Actor.gd b/src/Actor/Actor.gd index e108a43..3e28b46 100644 --- a/src/Actor/Actor.gd +++ b/src/Actor/Actor.gd @@ -3,11 +3,12 @@ class_name Actor const FLOOR_NORMAL := Vector2.UP +# TODO Round everyone up whoever still uses this variable and fucking kill them export var speed := Vector2(300, 1000) # newtonmeters is the unit -export var acceleration_force := Vector2(5000, -2000) -export var gravity := 9810.0 +export var acceleration_force := Vector2(3050, 4575) +export var gravity := 4000.0 # Kilograms -export var mass := 5 +export var mass := 6 var _velocity := Vector2.ZERO diff --git a/src/Actor/Blobby.gd b/src/Actor/Blobby.gd index 733bd7a..7953c99 100644 --- a/src/Actor/Blobby.gd +++ b/src/Actor/Blobby.gd @@ -3,7 +3,6 @@ extends Actor export var stomp_impulse := 1000.0 -# TODO Move events to StateMachine func _on_EnemyDetector_area_entered(area: Area2D) -> void: _velocity = calculate_stomp_velocity(_velocity, stomp_impulse) @@ -33,46 +32,63 @@ func calculate_grounded_velocity( linear_velocity: Vector2, delta: float, speed: Vector2, direction: Vector2 ) -> Vector2: var out_vel := linear_velocity - # TODO Comments + var velocity_direction = 1.0 + if _velocity.x < 0: + velocity_direction = -1.0 + if direction.x == 0.0: - var deceleration_force = get_ground_friction() * gravity * mass * delta - var velocity_direction = 1.0 - if _velocity.x < 0: - velocity_direction = -1.0 + var deceleration_force = calculate_deceleration_force(gravity, mass, delta) # Translates velocity back to force and subtracts deceleration force var result_force = ( - (abs(_velocity.x) * mass) / delta + abs(convert_velocity_to_force(_velocity.x, mass, delta)) - deceleration_force ) if result_force <= 0: out_vel.x = 0 else: - out_vel.x = result_force / mass * delta * velocity_direction + out_vel.x = convert_force_to_velocity(result_force, mass, delta) * velocity_direction else: + # When turning the opposite direction, friction is added to the opposite acceleration movement + if is_reverse_horizontal_direction(direction): + out_vel.x -= convert_force_to_velocity(calculate_deceleration_force(gravity, mass, delta), mass, delta) * velocity_direction out_vel.x += (delta * ((acceleration_force.x / mass) * direction.x)) + # TODO Is this the right place to determine this? if is_on_floor(): - var additive_jump_force = -0.1 * abs(_velocity.x) * mass - # The one signals, that I calculated the velocity resulting from 1 second of force applied - out_vel.y = 1 * ((acceleration_force.y + additive_jump_force) / mass) + var additive_jump_force = 0.2 * abs(_velocity.x) * mass + out_vel.y = ( + ((acceleration_force.y + additive_jump_force) / mass) + * direction.y + ) return out_vel +func is_reverse_horizontal_direction(direction: Vector2) -> bool: + return (direction.x > 0 && _velocity.x < 0) || (direction.x < 0 && _velocity.x > 0) + +func convert_velocity_to_force(velocity, mass, delta) -> float: + return (velocity*mass)/delta + +func convert_force_to_velocity(force, mass, delta) -> float: + return (force/mass)*delta func get_ground_friction() -> float: - return 10.0 + return 30.5 +# TODO Comments for parameters +func calculate_deceleration_force(gravity: float, mass: float, delta: float) -> float: + return get_ground_friction() * gravity * mass * delta func calculate_jump_velocity( linear_velocity: Vector2, delta: float, speed: Vector2, direction: Vector2 ) -> Vector2: - linear_velocity.y = gravity * delta + linear_velocity.y += gravity * delta return linear_velocity func calculate_fall_velocity( linear_velocity: Vector2, delta: float, speed: Vector2, direction: Vector2 ) -> Vector2: - linear_velocity.y = gravity * delta + linear_velocity.y += gravity * delta return linear_velocity diff --git a/src/Actor/Blobby.tscn b/src/Actor/Blobby.tscn index 71b1943..8ace383 100644 --- a/src/Actor/Blobby.tscn +++ b/src/Actor/Blobby.tscn @@ -1,28 +1,26 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://start-assets/player.png" type="Texture" id=1] +[ext_resource path="res://start-assets/approx mannequin.png" type="Texture" id=1] [ext_resource path="res://src/Actor/PlayerStateMachine.gd" type="Script" id=2] [ext_resource path="res://src/RayCasters/RayCaster.gd" type="Script" id=3] [ext_resource path="res://src/RayCasters/RayCastDebugLines.gd" type="Script" id=4] [ext_resource path="res://src/Actor/Blobby.gd" type="Script" id=5] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 30.8418, 32 ) +extents = Vector2( 9.78696, 20.3816 ) [sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 30.9321, 24.5597 ) +extents = Vector2( 11.4387, 20.1638 ) [node name="Blobby" type="KinematicBody2D"] collision_mask = 8 script = ExtResource( 5 ) [node name="Player" type="Sprite" parent="."] -position = Vector2( 0, -32 ) scale = Vector2( 0.64, 0.64 ) texture = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( 0, -32.2102 ) shape = SubResource( 1 ) [node name="RayCaster" type="Node2D" parent="CollisionShape2D"] @@ -50,17 +48,16 @@ collision_mask = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyDetector"] modulate = Color( 0.2, 0, 0.494118, 1 ) -position = Vector2( 0, -32.2102 ) shape = SubResource( 2 ) [node name="StateMachine" type="Node" parent="."] script = ExtResource( 2 ) [node name="StateLable" type="Label" parent="."] -margin_left = -31.0 -margin_top = -80.0 -margin_right = 31.0 -margin_bottom = -64.0 +margin_left = -30.7351 +margin_top = -30.3377 +margin_right = 31.2649 +margin_bottom = -14.3377 text = "Coochie" align = 1 valign = 1 diff --git a/src/Actor/Blobby.tscn.tmp b/src/Actor/Blobby.tscn.tmp deleted file mode 100644 index 7e591b5..0000000 --- a/src/Actor/Blobby.tscn.tmp +++ /dev/null @@ -1,74 +0,0 @@ -[gd_scene load_steps=8 format=2] - -[ext_resource path="res://start-assets/player.png" type="Texture" id=1] -[ext_resource path="res://src/Actor/PlayerStateMachine.gd" type="Script" id=2] -[ext_resource path="res://src/RayCasters/RayCaster.gd" type="Script" id=3] -[ext_resource path="res://src/RayCasters/RayCastDebugLines.gd" type="Script" id=4] -[ext_resource path="res://src/Actor/Blobby.gd" type="Script" id=5] - -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 30.8418, 32 ) - -[sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 30.9321, 24.5597 ) - -[node name="Blobby" type="KinematicBody2D"] -collision_mask = 8 -script = ExtResource( 5 ) -speed = null -gravity = null -stomp_impulse = null - -[node name="Player" type="Sprite" parent="."] -position = Vector2( 0, -32 ) -scale = Vector2( 0.64, 0.64 ) -texture = ExtResource( 1 ) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( 0, -32.2102 ) -shape = SubResource( 1 ) - -[node name="RayCaster" type="Node2D" parent="CollisionShape2D"] -script = ExtResource( 3 ) - -[node name="RayCastDebugLines" type="Line2D" parent="CollisionShape2D/RayCaster"] -script = ExtResource( 4 ) - -[node name="Camera2D" type="Camera2D" parent="."] -visible = false -position = Vector2( 0, -181 ) -current = true -limit_left = 0 -limit_top = 0 -limit_smoothed = true -drag_margin_h_enabled = true -drag_margin_v_enabled = true -smoothing_enabled = true -drag_margin_left = 0.0 -drag_margin_right = 0.0 - -[node name="EnemyDetector" type="Area2D" parent="."] -monitorable = false -collision_mask = 2 - -[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyDetector"] -modulate = Color( 0.2, 0, 0.494118, 1 ) -position = Vector2( 0, -32.2102 ) -shape = SubResource( 2 ) - -[node name="StateMachine" type="Node" parent="."] -script = ExtResource( 2 ) - -[node name="StateLable" type="Label" parent="."] -margin_left = -31.0 -margin_top = -80.0 -margin_right = 31.0 -margin_bottom = -64.0 -text = "Coochie" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} -[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/PlayerStateMachine.gd b/src/Actor/PlayerStateMachine.gd index 3f2b733..4573da7 100644 --- a/src/Actor/PlayerStateMachine.gd +++ b/src/Actor/PlayerStateMachine.gd @@ -70,10 +70,13 @@ func get_direction() -> Vector2: func _get_transition(delta): parent.get_node("StateLable").text = self.state var new_state - if ! parent.is_on_floor(): + # TODO Can get stuck in Fall on ledges + if !parent.is_on_floor(): if parent._velocity.y < 0: - new_state = states.jump - if parent._velocity.y > 0: + new_state = states.jump + if parent._velocity.y >= 0: + # if self.state == states.run: + # parent._velocity.y = 0 new_state = states.fall elif parent._velocity.x != 0: new_state = states.run diff --git a/src/Levels/ApproxLevel.tscn b/src/Levels/ApproxLevel.tscn new file mode 100644 index 0000000..186712c --- /dev/null +++ b/src/Levels/ApproxLevel.tscn @@ -0,0 +1,124 @@ +[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/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="ConvexPolygonShape2D" id=2] +points = PoolVector2Array( 0, 0, 0, 32, 32, 32, 32, 0 ) + +[sub_resource type="ConcavePolygonShape2D" id=3] +segments = PoolVector2Array( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +[sub_resource type="TileSet" id=4] +0/name = "approx build block.png 0" +0/texture = ExtResource( 6 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 32, 32 ) +0/tile_mode = 0 +0/occluder_offset = Vector2( 0, 0 ) +0/occluder = SubResource( 1 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape = SubResource( 2 ) +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__ = { +"_edit_horizontal_guides_": [ 464.0 ], +"_edit_vertical_guides_": [ 2880.0 ] +} + +[node name="CanvasLayer" type="CanvasLayer" parent="."] +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 +texture = ExtResource( 4 ) +expand = true +stretch_mode = 1 +__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, -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, -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, 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, 131070, 0, 0, 65536, 0, 0, 65569, 0, 0, 65592, 0, 0, 65593, 0, 0, 65594, 0, 0, 196606, 0, 0, 131072, 0, 0, 131105, 0, 0, 131128, 0, 0, 131130, 0, 0, 262142, 0, 0, 196608, 0, 0, 196642, 0, 0, 196664, 0, 0, 196666, 0, 0, 327678, 0, 0, 262144, 0, 0, 262178, 0, 0, 262200, 0, 0, 262202, 0, 0, 393214, 0, 0, 327680, 0, 0, 327713, 0, 0, 327714, 0, 0, 327736, 0, 0, 327738, 0, 0, 327739, 0, 0, 458750, 0, 0, 393216, 0, 0, 393249, 0, 0, 393272, 0, 0, 393274, 0, 0, 393275, 0, 0, 524286, 0, 0, 458752, 0, 0, 458785, 0, 0, 458808, 0, 0, 458810, 0, 0, 458811, 0, 0, 589822, 0, 0, 524288, 0, 0, 524321, 0, 0, 524344, 0, 0, 524346, 0, 0, 524347, 0, 0, 655358, 0, 0, 589824, 0, 0, 589857, 0, 0, 589880, 0, 0, 589883, 0, 0, 720894, 0, 0, 655360, 0, 0, 655393, 0, 0, 655416, 0, 0, 655418, 0, 0, 655419, 0, 0, 786430, 0, 0, 720896, 0, 0, 720916, 0, 0, 720928, 0, 0, 720952, 0, 0, 720954, 0, 0, 851966, 0, 0, 786432, 0, 0, 786452, 0, 0, 786453, 0, 0, 786464, 0, 0, 786488, 0, 0, 786490, 0, 0, 917501, 0, 0, 917502, 0, 0, 851968, 0, 0, 851985, 0, 0, 851988, 0, 0, 851989, 0, 0, 852000, 0, 0, 852024, 0, 0, 852026, 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, 917562, 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, 1114110, 0, 0, 1048579, 0, 0, 1048580, 0, 0, 1048581, 0, 0, 1048585, 0, 0, 1048586, 0, 0, 1048591, 0, 0, 1048634, 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, 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, 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 ) + +[node name="Blobby" parent="." instance=ExtResource( 1 )] +position = Vector2( 131.28, 398.61 ) + +[node name="Player" parent="Blobby" index="0"] +position = Vector2( 0.279999, 0 ) +scale = Vector2( 1, 1 ) + +[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 = 2826 +limit_bottom = 10000 +smoothing_enabled = false + +[node name="StateLable" parent="Blobby" index="5"] +margin_left = -23.7895 +margin_top = -37.0774 +margin_right = 27.2105 +margin_bottom = -23.0774 +size_flags_horizontal = 0 +size_flags_vertical = 0 +custom_fonts/font = ExtResource( 7 ) +text = "State" + +[editable path="Blobby"] diff --git a/src/Screens/MainScreen.tscn b/src/Screens/MainScreen.tscn index d0a3c2f..8b20d8d 100644 --- a/src/Screens/MainScreen.tscn +++ b/src/Screens/MainScreen.tscn @@ -17,10 +17,6 @@ __meta__ = { [node name="background" type="TextureRect" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = -1.5874 -margin_top = 3.96851 -margin_right = -1.5874 -margin_bottom = 3.96851 texture = ExtResource( 4 ) expand = true stretch_mode = 2 @@ -31,10 +27,10 @@ __meta__ = { [node name="Titel" parent="." instance=ExtResource( 2 )] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -162.5 -margin_top = 104.0 -margin_right = 162.5 -margin_bottom = 189.0 +margin_left = -165.023 +margin_top = 60.2735 +margin_right = 159.977 +margin_bottom = 145.273 grow_horizontal = 2 size_flags_horizontal = 2 size_flags_vertical = 2 @@ -55,7 +51,7 @@ __meta__ = { [node name="PlayButton" parent="MenuContainer" instance=ExtResource( 3 )] margin_right = 146.0 -next_scene_path = "res://src/Levels/Level03.tscn" +next_scene_path = "res://src/Levels/ApproxLevel.tscn" [node name="QuitButton" parent="MenuContainer" instance=ExtResource( 1 )] anchor_left = 0.0 diff --git a/start-assets/approx build block.png b/start-assets/approx build block.png new file mode 100644 index 0000000000000000000000000000000000000000..7f812ba7dc39384f63d9a0a8e3ab9b77cfcbb2b8 GIT binary patch literal 607 zcmV-l0-*hgP)1VIr*Z2SYh8j_`IV=)!V4*_5Z#(a^W-~uK zBehFrH!cY#h@+uXV1+CmQK@;!>~CMJ8nDNQc8R7BUfwtQX=x|qbH{F#Gb=d@s(!oqnb+(zKVAyq61WKvcI3h z40P)C1pX)`U7Hbz?l0PS*1=ZLP0#=dkN^pg00}?|XcRC5h)mEUKt*N&9Uhv9%m5S7 tiCmYd0sRceJCK1VIr*Z2SYh8j_`IV=)!V4*_5Z#(a^W-~uK zBehFrH!cY#h@+uXV1+CmQK@;!>~CMJ&7lK!riRFV5h zO?R#AEi4ct{UQZ0L0X4Ha#saXsQ;DfB2+bzxiFUCy z_wKl2>(ryb)T>sc2yg{OS2UZc0X>a1&`Q=iNQ-f2bMEKyNfvH_NT$OLhNeqom9fQ! zSrO+njh92w0%W~CVcmFF>GnRc_%?JZBN znItoN1p;^dSwQ@1GvE=q12Fq};0R20C12$wc(+?$>z1@qEUvc^Slh6ZStW1w3a_-S zY+Nan8_y^Rtx{EBk8L|FCS9Fdnh@B?JtVImPc{p(9hk7b-l?tb7G--~J>dpAbup1v t6jUl9dqu`C$R~jGt`f1EakJ82{R16Jp$Xa<(CPpH002ovPDHLkV1ju!gG&Ga literal 0 HcmV?d00001 diff --git a/start-assets/approx mannequin.png.import b/start-assets/approx mannequin.png.import new file mode 100644 index 0000000..0247e6c --- /dev/null +++ b/start-assets/approx mannequin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/approx mannequin.png-e4ae377c4dcae927a088d7e01878ef98.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://start-assets/approx mannequin.png" +dest_files=[ "res://.import/approx mannequin.png-e4ae377c4dcae927a088d7e01878ef98.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 diff --git a/start-assets/new_dynamicfont.tres b/start-assets/new_dynamicfont.tres index cb5fa29..dbd1f81 100644 --- a/start-assets/new_dynamicfont.tres +++ b/start-assets/new_dynamicfont.tres @@ -3,7 +3,5 @@ [ext_resource path="res://start-assets/montserrat_extrabold.otf" type="DynamicFontData" id=1] [resource] -size = 36 -use_mipmaps = true -use_filter = true +size = 10 font_data = ExtResource( 1 )