From dee457a5615c6c5c38dbf96761188fec73cf92d4 Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Thu, 21 May 2020 16:30:22 -0400 Subject: [PATCH] Tweak player movement --- client/Nodes/Tiles/tileset_science_lab.tres | 2 -- client/Scenes/Dev.tscn | 2 +- client/Scripts/Entities/Player.gd | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/client/Nodes/Tiles/tileset_science_lab.tres b/client/Nodes/Tiles/tileset_science_lab.tres index d5b710d..163ff90 100644 --- a/client/Nodes/Tiles/tileset_science_lab.tres +++ b/client/Nodes/Tiles/tileset_science_lab.tres @@ -9,8 +9,6 @@ [ext_resource path="res://Assets/Art/Tiles/metal_tile.png" type="Texture" id=7] [ext_resource path="res://Assets/Art/Tiles/techno_wall_tile.png" type="Texture" id=8] - - [sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) diff --git a/client/Scenes/Dev.tscn b/client/Scenes/Dev.tscn index 9cfc52d..7157399 100644 --- a/client/Scenes/Dev.tscn +++ b/client/Scenes/Dev.tscn @@ -15,7 +15,7 @@ tile_set = ExtResource( 1 ) cell_size = Vector2( 16, 16 ) format = 1 -tile_data = PoolIntArray( 393217, 49, 0, 393218, 49, 0, 393219, 49, 0, 393220, 49, 0, 393221, 49, 0, 524285, 47, 3, 524286, 48, 0, 524287, 47, 3, 458753, 49, 0, 458754, 52, 0, 458755, 52, 2, 458756, 49, 0, 458757, 49, 0, 589821, 47, 65539, 589822, 48, 0, 589823, 47, 65539, 524289, 49, 0, 524290, 52, 65536, 524291, 52, 65538, 524292, 49, 0, 524293, 49, 0, 655357, 47, 131075, 655358, 48, 0, 655359, 47, 131075, 589825, 49, 0, 589826, 52, 65536, 589827, 52, 65538, 589828, 49, 0, 589829, 49, 0, 655361, 49, 0, 655362, 52, 131072, 655363, 52, 131074, 655364, 49, 0, 655365, 49, 0, 786425, 53, 0, 786426, 53, 1, 786427, 53, 1, 786428, 53, 1, 786429, 53, 1, 786430, 53, 1, 786431, 53, 1, 720896, 53, 2, 720897, 47, 0, 720898, 47, 1, 720899, 47, 1, 720900, 47, 1, 720901, 47, 1, 720902, 47, 1, 720903, 47, 1, 720904, 47, 1, 720905, 47, 1, 720906, 47, 1, 720907, 47, 1, 720908, 47, 1, 720909, 47, 1, 720910, 47, 1, 720911, 47, 1, 720912, 47, 1, 720913, 47, 1, 720914, 47, 1, 720915, 47, 1, 720916, 47, 1, 720917, 47, 1, 720918, 47, 1, 720919, 47, 1, 720920, 47, 1, 720921, 47, 1, 720922, 47, 1, 720923, 47, 1, 720924, 47, 1, 720925, 47, 1, 720926, 47, 1, 720927, 47, 2, 851961, 53, 65536, 851962, 53, 65537, 851963, 53, 65537, 851964, 53, 65537, 851965, 53, 65537, 851966, 53, 65537, 851967, 53, 65537, 786432, 53, 65538, 786433, 47, 65536, 786434, 47, 65537, 786435, 47, 65537, 786436, 47, 65537, 786437, 47, 65537, 786438, 47, 65537, 786439, 47, 65537, 786440, 47, 65537, 786441, 47, 65537, 786442, 47, 65537, 786443, 47, 65537, 786444, 47, 65537, 786445, 47, 65537, 786446, 47, 65537, 786447, 47, 65537, 786448, 47, 65537, 786449, 47, 65537, 786450, 47, 65537, 786451, 47, 65537, 786452, 47, 65537, 786453, 47, 65537, 786454, 47, 65537, 786455, 47, 65537, 786456, 47, 65537, 786457, 47, 65537, 786458, 47, 65537, 786459, 47, 65537, 786460, 47, 65537, 786461, 47, 65537, 786462, 47, 65537, 786463, 47, 65538, 917497, 53, 131072, 917498, 53, 131073, 917499, 53, 131073, 917500, 53, 131073, 917501, 53, 131073, 917502, 53, 131073, 917503, 53, 131073, 851968, 53, 131074, 851969, 47, 131072, 851970, 47, 131073, 851971, 47, 131073, 851972, 47, 131073, 851973, 47, 131073, 851974, 47, 131073, 851975, 47, 131073, 851976, 47, 131073, 851977, 47, 131073, 851978, 47, 131073, 851979, 47, 131073, 851980, 47, 131073, 851981, 47, 131073, 851982, 47, 131073, 851983, 47, 131073, 851984, 47, 131073, 851985, 47, 131073, 851986, 47, 131073, 851987, 47, 131073, 851988, 47, 131073, 851989, 47, 131073, 851990, 47, 131073, 851991, 47, 131073, 851992, 47, 131073, 851993, 47, 131073, 851994, 47, 131073, 851995, 47, 131073, 851996, 47, 131073, 851997, 47, 131073, 851998, 47, 131073, 851999, 47, 131074 ) +tile_data = PoolIntArray( 327676, 53, 4, 327677, 53, 196609, 327678, 53, 196609, 327679, 53, 196609, 262144, 53, 7, 393212, 53, 65539, 393213, 52, 0, 393214, 52, 1, 393215, 52, 2, 327680, 53, 65539, 458748, 53, 65539, 458749, 52, 131072, 458750, 52, 131073, 458751, 52, 131074, 393216, 53, 65539, 393217, 49, 0, 393218, 49, 0, 393219, 49, 0, 393220, 49, 0, 393221, 49, 0, 524260, 49, 0, 524261, 49, 0, 524262, 49, 0, 524263, 49, 0, 524264, 49, 0, 524265, 49, 0, 524266, 49, 0, 524267, 49, 0, 524268, 49, 0, 524269, 49, 0, 524270, 49, 0, 524271, 49, 0, 524272, 48, 0, 524273, 49, 0, 524274, 49, 0, 524275, 49, 0, 524276, 49, 0, 524277, 49, 0, 524278, 49, 0, 524279, 49, 0, 524280, 49, 0, 524281, 49, 0, 524282, 49, 0, 524283, 49, 0, 524284, 53, 131075, 524285, 47, 3, 524286, 48, 0, 524287, 47, 3, 458752, 53, 131075, 458753, 49, 0, 458754, 52, 0, 458755, 52, 2, 458756, 49, 0, 458757, 49, 0, 589796, 49, 0, 589797, 49, 0, 589798, 49, 0, 589799, 49, 0, 589800, 49, 0, 589801, 49, 0, 589802, 49, 0, 589803, 49, 0, 589804, 49, 0, 589805, 49, 0, 589806, 49, 0, 589807, 49, 0, 589808, 48, 0, 589809, 49, 0, 589810, 49, 0, 589811, 49, 0, 589812, 49, 0, 589813, 49, 0, 589814, 49, 0, 589815, 49, 0, 589816, 49, 0, 589817, 49, 0, 589818, 49, 0, 589819, 49, 0, 589820, 49, 0, 589821, 47, 65539, 589822, 48, 0, 589823, 47, 65539, 524288, 49, 0, 524289, 49, 0, 524290, 52, 65536, 524291, 52, 65538, 524292, 49, 0, 524293, 49, 0, 655332, 49, 0, 655333, 49, 0, 655334, 49, 0, 655335, 49, 0, 655336, 53, 0, 655337, 53, 2, 655338, 49, 0, 655339, 49, 0, 655340, 49, 0, 655341, 49, 0, 655342, 49, 0, 655343, 49, 0, 655344, 48, 0, 655345, 49, 0, 655346, 49, 0, 655347, 49, 0, 655348, 49, 0, 655349, 49, 0, 655350, 49, 0, 655351, 49, 0, 655352, 49, 0, 655353, 49, 0, 655354, 49, 0, 655355, 49, 0, 655356, 49, 0, 655357, 47, 131075, 655358, 48, 0, 655359, 47, 131075, 589824, 49, 0, 589825, 49, 0, 589826, 52, 65536, 589827, 52, 65538, 589828, 49, 0, 589829, 49, 0, 720868, 49, 0, 720869, 49, 0, 720870, 49, 0, 720871, 49, 0, 720872, 53, 65536, 720873, 53, 65538, 720874, 49, 0, 720875, 49, 0, 720876, 49, 0, 720877, 49, 0, 720878, 49, 0, 720879, 49, 0, 720880, 48, 0, 720881, 49, 0, 720882, 49, 0, 720883, 49, 0, 720884, 49, 0, 720885, 49, 0, 720886, 49, 0, 720887, 49, 0, 720888, 49, 0, 720889, 49, 0, 720890, 49, 0, 720891, 49, 0, 720892, 49, 0, 720893, 49, 0, 720894, 49, 0, 720895, 49, 0, 655360, 49, 0, 655361, 49, 0, 655362, 52, 131072, 655363, 52, 131074, 655364, 49, 0, 655365, 49, 0, 786404, 53, 0, 786405, 53, 1, 786406, 53, 1, 786407, 53, 1, 786408, 53, 131078, 786409, 53, 131077, 786410, 53, 1, 786411, 53, 1, 786412, 53, 1, 786413, 53, 1, 786414, 53, 1, 786415, 53, 1, 786416, 53, 1, 786417, 53, 1, 786418, 53, 1, 786419, 53, 1, 786420, 53, 1, 786421, 53, 1, 786422, 53, 1, 786423, 53, 1, 786424, 53, 1, 786425, 53, 1, 786426, 53, 1, 786427, 53, 1, 786428, 53, 1, 786429, 53, 1, 786430, 53, 1, 786431, 53, 1, 720896, 53, 2, 720897, 47, 0, 720898, 47, 1, 720899, 47, 1, 720900, 47, 1, 720901, 47, 1, 720902, 47, 1, 720903, 47, 1, 720904, 47, 1, 720905, 47, 1, 720906, 47, 1, 720907, 47, 1, 720908, 47, 1, 720909, 47, 1, 720910, 47, 1, 720911, 47, 1, 720912, 47, 1, 720913, 47, 1, 720914, 47, 1, 720915, 47, 1, 720916, 47, 1, 720917, 47, 1, 720918, 47, 1, 720919, 47, 1, 720920, 47, 1, 720921, 47, 1, 720922, 47, 1, 720923, 47, 1, 720924, 47, 1, 720925, 47, 1, 720926, 47, 1, 720927, 47, 2, 851940, 53, 65536, 851941, 53, 65537, 851942, 53, 65537, 851943, 53, 65537, 851944, 53, 65537, 851945, 53, 65537, 851946, 53, 65537, 851947, 53, 65537, 851948, 53, 65537, 851949, 53, 65537, 851950, 53, 65537, 851951, 53, 65537, 851952, 53, 65537, 851953, 53, 65537, 851954, 53, 65537, 851955, 53, 65537, 851956, 53, 65537, 851957, 53, 65537, 851958, 53, 65537, 851959, 53, 65537, 851960, 53, 65537, 851961, 53, 65537, 851962, 53, 65537, 851963, 53, 65537, 851964, 53, 65537, 851965, 53, 65537, 851966, 53, 65537, 851967, 53, 65537, 786432, 53, 65538, 786433, 47, 65536, 786434, 47, 65537, 786435, 47, 65537, 786436, 47, 65537, 786437, 47, 65537, 786438, 47, 65537, 786439, 47, 65537, 786440, 47, 65537, 786441, 47, 65537, 786442, 47, 65537, 786443, 47, 65537, 786444, 47, 65537, 786445, 47, 65537, 786446, 47, 65537, 786447, 47, 65537, 786448, 47, 65537, 786449, 47, 65537, 786450, 47, 65537, 786451, 47, 65537, 786452, 47, 65537, 786453, 47, 65537, 786454, 47, 65537, 786455, 47, 65537, 786456, 47, 65537, 786457, 47, 65537, 786458, 47, 65537, 786459, 47, 65537, 786460, 47, 65537, 786461, 47, 65537, 786462, 47, 65537, 786463, 47, 65538, 917476, 53, 131072, 917477, 53, 131073, 917478, 53, 131073, 917479, 53, 131073, 917480, 53, 131073, 917481, 53, 131073, 917482, 53, 131073, 917483, 53, 131073, 917484, 53, 131073, 917485, 53, 131073, 917486, 53, 131073, 917487, 53, 131073, 917488, 53, 131073, 917489, 53, 131073, 917490, 53, 131073, 917491, 53, 131073, 917492, 53, 131073, 917493, 53, 131073, 917494, 53, 131073, 917495, 53, 131073, 917496, 53, 131073, 917497, 53, 131073, 917498, 53, 131073, 917499, 53, 131073, 917500, 53, 131073, 917501, 53, 131073, 917502, 53, 131073, 917503, 53, 131073, 851968, 53, 131074, 851969, 47, 131072, 851970, 47, 131073, 851971, 47, 131073, 851972, 47, 131073, 851973, 47, 131073, 851974, 47, 131073, 851975, 47, 131073, 851976, 47, 131073, 851977, 47, 131073, 851978, 47, 131073, 851979, 47, 131073, 851980, 47, 131073, 851981, 47, 131073, 851982, 47, 131073, 851983, 47, 131073, 851984, 47, 131073, 851985, 47, 131073, 851986, 47, 131073, 851987, 47, 131073, 851988, 47, 131073, 851989, 47, 131073, 851990, 47, 131073, 851991, 47, 131073, 851992, 47, 131073, 851993, 47, 131073, 851994, 47, 131073, 851995, 47, 131073, 851996, 47, 131073, 851997, 47, 131073, 851998, 47, 131073, 851999, 47, 131074 ) [node name="Soldier" parent="." instance=ExtResource( 8 )] position = Vector2( 111.361, 167.466 ) diff --git a/client/Scripts/Entities/Player.gd b/client/Scripts/Entities/Player.gd index 9302546..7f8da09 100644 --- a/client/Scripts/Entities/Player.gd +++ b/client/Scripts/Entities/Player.gd @@ -7,7 +7,7 @@ var baseGravity : float = 9.8 # Player movment variables var maxMoveVelocity : float = 150 -var moveAcceleration : float = 25 +var moveAcceleration : float = 125 var moveFriction : float = 65 var jumpVelocity : float = -150 var jumped = false @@ -76,9 +76,9 @@ func user_input(): return if(Input.is_action_pressed("ui_left")): - moveMotion -= moveAcceleration + moveMotion = -moveAcceleration if(Input.is_action_pressed("ui_right")): - moveMotion += moveAcceleration + moveMotion = moveAcceleration if(is_on_floor() and Input.is_action_just_pressed("ui_up")): motion.y = jumpVelocity