From 375fc092e5617797bff501256c0517eaebfa8930 Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 17 Jul 2020 12:19:51 -0500 Subject: [PATCH 1/2] Test Level --- levels/test.tscn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 levels/test.tscn diff --git a/levels/test.tscn b/levels/test.tscn new file mode 100644 index 0000000..a6d6917 --- /dev/null +++ b/levels/test.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://characters/Player.tscn" type="PackedScene" id=1] +[ext_resource path="res://meta/DungeonTilemap.tscn" type="PackedScene" id=2] + +[node name="Node2D" type="Node2D"] +position = Vector2( -14, 0 ) + +[node name="Player" parent="." instance=ExtResource( 1 )] +position = Vector2( 161, 118 ) + +[node name="TileMap" parent="." instance=ExtResource( 2 )] +tile_data = PoolIntArray( 0, 0, 8, 1, 0, 10, 2, 0, 10, 3, 0, 10, 4, 0, 10, 5, 0, 10, 6, 0, 10, 7, 0, 10, 8, 0, 10, 9, 0, 10, 10, 0, 10, 11, 0, 10, 12, 0, 10, 13, 0, 10, 14, 0, 10, 15, 0, 10, 16, 0, 10, 17, 0, 10, 18, 0, 10, 19, 0, 10, 20, 0, 11, 65536, 0, 65544, 65537, 0, 131078, 65538, 0, 196617, 65539, 0, 196617, 65540, 0, 196617, 65541, 0, 196617, 65542, 0, 196617, 65543, 0, 196617, 65544, 0, 196617, 65545, 0, 196617, 65546, 0, 196617, 65547, 0, 196617, 65548, 0, 196617, 65549, 0, 196617, 65550, 0, 196617, 65551, 0, 196617, 65552, 0, 196617, 65553, 0, 196617, 65554, 0, 196617, 65555, 0, 131077, 65556, 0, 131083, 131072, 0, 65544, 131073, 0, 131083, 131091, 0, 65544, 131092, 0, 131083, 196608, 0, 65544, 196609, 0, 131083, 196627, 0, 65544, 196628, 0, 131083, 262144, 0, 65544, 262145, 0, 131083, 262163, 0, 65544, 262164, 0, 131083, 327680, 0, 65544, 327681, 0, 131083, 327699, 0, 65544, 327700, 0, 131083, 393216, 0, 65544, 393217, 0, 131083, 393235, 0, 65544, 393236, 0, 131083, 458752, 0, 65544, 458753, 0, 131083, 458771, 0, 65544, 458772, 0, 131083, 524288, 0, 65544, 524289, 0, 131083, 524307, 0, 65544, 524308, 0, 131083, 589824, 0, 65544, 589825, 0, 65542, 589826, 0, 10, 589827, 0, 10, 589828, 0, 10, 589829, 0, 10, 589830, 0, 10, 589831, 0, 10, 589832, 0, 10, 589833, 0, 10, 589834, 0, 10, 589835, 0, 10, 589836, 0, 10, 589837, 0, 10, 589838, 0, 10, 589839, 0, 10, 589840, 0, 10, 589841, 0, 10, 589842, 0, 10, 589843, 0, 65541, 589844, 0, 131083, 655360, 0, 196616, 655361, 0, 196617, 655362, 0, 196617, 655363, 0, 196617, 655364, 0, 196617, 655365, 0, 196617, 655366, 0, 196617, 655367, 0, 196617, 655368, 0, 196617, 655369, 0, 196617, 655370, 0, 196617, 655371, 0, 196617, 655372, 0, 196617, 655373, 0, 196617, 655374, 0, 196617, 655375, 0, 196617, 655376, 0, 196617, 655377, 0, 196617, 655378, 0, 196617, 655379, 0, 196617, 655380, 0, 196619 ) From 3610524eabac960e457da24c8086b6b8c8a26ca4 Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 17 Jul 2020 12:38:33 -0500 Subject: [PATCH 2/2] Changed player collision to capsule --- characters/Player.tscn | 9 +++++---- levels/test.tscn | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/characters/Player.tscn b/characters/Player.tscn index 2f9ef45..f6e9737 100644 --- a/characters/Player.tscn +++ b/characters/Player.tscn @@ -8,8 +8,9 @@ [sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( -7, 0, -7, -2, -6, -2, -6, -3, -5, -3, -5, -5, -6, -5, -6, -10, -7, -10, -7, -12, -6, -12, -6, -19, -4, -19, -4, -18, -3, -18, -3, -17, 1, -17, 1, -16, 3, -16, 3, -15, 4, -15, 4, -14, 5, -14, 5, -13, 6, -13, 6, -12, 7, -12, 7, -10, 6, -10, 6, -9, 5, -9, 5, -8, 6, -8, 6, -4, 5, -4, 5, 0, -7, 0 ) -[sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 6, 6 ) +[sub_resource type="CapsuleShape2D" id=6] +radius = 6.0 +height = 2.0 [sub_resource type="Animation" id=3] resource_name = "Idle" @@ -86,8 +87,8 @@ position = Vector2( 0, 12 ) occluder = SubResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( 0, -6 ) -shape = SubResource( 2 ) +position = Vector2( 0, -7 ) +shape = SubResource( 6 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] anims/Idle = SubResource( 3 ) diff --git a/levels/test.tscn b/levels/test.tscn index a6d6917..a1b3268 100644 --- a/levels/test.tscn +++ b/levels/test.tscn @@ -7,7 +7,7 @@ position = Vector2( -14, 0 ) [node name="Player" parent="." instance=ExtResource( 1 )] -position = Vector2( 161, 118 ) +position = Vector2( 169, 166 ) [node name="TileMap" parent="." instance=ExtResource( 2 )] -tile_data = PoolIntArray( 0, 0, 8, 1, 0, 10, 2, 0, 10, 3, 0, 10, 4, 0, 10, 5, 0, 10, 6, 0, 10, 7, 0, 10, 8, 0, 10, 9, 0, 10, 10, 0, 10, 11, 0, 10, 12, 0, 10, 13, 0, 10, 14, 0, 10, 15, 0, 10, 16, 0, 10, 17, 0, 10, 18, 0, 10, 19, 0, 10, 20, 0, 11, 65536, 0, 65544, 65537, 0, 131078, 65538, 0, 196617, 65539, 0, 196617, 65540, 0, 196617, 65541, 0, 196617, 65542, 0, 196617, 65543, 0, 196617, 65544, 0, 196617, 65545, 0, 196617, 65546, 0, 196617, 65547, 0, 196617, 65548, 0, 196617, 65549, 0, 196617, 65550, 0, 196617, 65551, 0, 196617, 65552, 0, 196617, 65553, 0, 196617, 65554, 0, 196617, 65555, 0, 131077, 65556, 0, 131083, 131072, 0, 65544, 131073, 0, 131083, 131091, 0, 65544, 131092, 0, 131083, 196608, 0, 65544, 196609, 0, 131083, 196627, 0, 65544, 196628, 0, 131083, 262144, 0, 65544, 262145, 0, 131083, 262163, 0, 65544, 262164, 0, 131083, 327680, 0, 65544, 327681, 0, 131083, 327699, 0, 65544, 327700, 0, 131083, 393216, 0, 65544, 393217, 0, 131083, 393235, 0, 65544, 393236, 0, 131083, 458752, 0, 65544, 458753, 0, 131083, 458771, 0, 65544, 458772, 0, 131083, 524288, 0, 65544, 524289, 0, 131083, 524307, 0, 65544, 524308, 0, 131083, 589824, 0, 65544, 589825, 0, 65542, 589826, 0, 10, 589827, 0, 10, 589828, 0, 10, 589829, 0, 10, 589830, 0, 10, 589831, 0, 10, 589832, 0, 10, 589833, 0, 10, 589834, 0, 10, 589835, 0, 10, 589836, 0, 10, 589837, 0, 10, 589838, 0, 10, 589839, 0, 10, 589840, 0, 10, 589841, 0, 10, 589842, 0, 10, 589843, 0, 65541, 589844, 0, 131083, 655360, 0, 196616, 655361, 0, 196617, 655362, 0, 196617, 655363, 0, 196617, 655364, 0, 196617, 655365, 0, 196617, 655366, 0, 196617, 655367, 0, 196617, 655368, 0, 196617, 655369, 0, 196617, 655370, 0, 196617, 655371, 0, 196617, 655372, 0, 196617, 655373, 0, 196617, 655374, 0, 196617, 655375, 0, 196617, 655376, 0, 196617, 655377, 0, 196617, 655378, 0, 196617, 655379, 0, 196617, 655380, 0, 196619 ) +tile_data = PoolIntArray( 0, 0, 8, 1, 0, 10, 2, 0, 10, 3, 0, 10, 4, 0, 10, 5, 0, 10, 6, 0, 10, 7, 0, 10, 8, 0, 10, 9, 0, 10, 10, 0, 10, 11, 0, 10, 12, 0, 10, 13, 0, 10, 14, 0, 10, 15, 0, 10, 16, 0, 10, 17, 0, 10, 18, 0, 10, 19, 0, 10, 20, 0, 11, 65536, 0, 65544, 65537, 0, 131078, 65538, 0, 196617, 65539, 0, 196617, 65540, 0, 196617, 65541, 0, 196617, 65542, 0, 196617, 65543, 0, 196617, 65544, 0, 196617, 65545, 0, 196617, 65546, 0, 196617, 65547, 0, 196617, 65548, 0, 196617, 65549, 0, 196617, 65550, 0, 196617, 65551, 0, 196617, 65552, 0, 196617, 65553, 0, 196617, 65554, 0, 196617, 65555, 0, 131077, 65556, 0, 131083, 131072, 0, 65544, 131073, 0, 131083, 131091, 0, 65544, 131092, 0, 131083, 196608, 0, 65544, 196609, 0, 131083, 196627, 0, 65544, 196628, 0, 131083, 262144, 0, 65544, 262145, 0, 131083, 262163, 0, 65544, 262164, 0, 131083, 327680, 0, 65544, 327681, 0, 131083, 327699, 0, 65544, 327700, 0, 131083, 393216, 0, 65544, 393217, 0, 131083, 393235, 0, 65544, 393236, 0, 131083, 458752, 0, 65544, 458753, 0, 131083, 458771, 0, 65544, 458772, 0, 131083, 524288, 0, 65544, 524289, 0, 131083, 524307, 0, 65544, 524308, 0, 131083, 589824, 0, 65544, 589825, 0, 131083, 589830, 0, 0, 589843, 0, 65544, 589844, 0, 131083, 655360, 0, 65544, 655361, 0, 131083, 655366, 0, 65536, 655379, 0, 65544, 655380, 0, 131083, 720896, 0, 65544, 720897, 0, 65542, 720898, 0, 10, 720899, 0, 10, 720900, 0, 10, 720901, 0, 10, 720902, 0, 9, 720903, 0, 10, 720904, 0, 10, 720905, 0, 10, 720906, 0, 10, 720907, 0, 10, 720908, 0, 10, 720909, 0, 10, 720910, 0, 10, 720911, 0, 10, 720912, 0, 10, 720913, 0, 10, 720914, 0, 10, 720915, 0, 65541, 720916, 0, 131083, 786432, 0, 196616, 786433, 0, 196617, 786434, 0, 196617, 786435, 0, 196617, 786436, 0, 196617, 786437, 0, 196617, 786438, 0, 196617, 786439, 0, 196617, 786440, 0, 196617, 786441, 0, 196617, 786442, 0, 196617, 786443, 0, 196617, 786444, 0, 196617, 786445, 0, 196617, 786446, 0, 196617, 786447, 0, 196617, 786448, 0, 196617, 786449, 0, 196617, 786450, 0, 196617, 786451, 0, 196617, 786452, 0, 196619 )