Skip to content

Commit 3606b26

Browse files
authored
Merge pull request #201 from MarianoGnu/master
Update TileSet's tile offset, Fixes #200
2 parents c76125b + f8cb21c commit 3606b26

File tree

3 files changed

+84
-54
lines changed

3 files changed

+84
-54
lines changed

2d/isometric/dungeon.tscn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ collision_mask = 1
2424
occluder_light_mask = 1
2525
format = 1
2626
tile_data = PoolIntArray( -851956, 0, -1200553578, -851955, 0, -1200553578, -851954, 0, -1200553578, -786420, 1, -1200553578, -786419, 0, -1200553578, -786418, 0, -1200553578, -720884, 0, -1200553578, -720883, 0, -1200553578, -720882, 0, -1200553578, -655348, 1, -1200553578, -655347, 0, -1200553578, -655346, 0, -1200553578, -589812, 1, -1200553578, -589811, 0, -1200553578, -589810, 0, -1200553578, -524276, 0, -1200553578, -524275, 1, -1200553578, -524274, 0, -1200553578, -458740, 0, -1200553578, -458739, 0, -1200553578, -458738, 0, -1200553578, -393210, 0, -1200553578, -393209, 0, -1200553578, -393208, 0, -1200553578, -393207, 0, -1200553578, -393206, 0, -1200553578, -393205, 0, -1200553578, -393204, 0, -1200553578, -393203, 0, -1200553578, -393202, 0, -1200553578, -327674, 0, -1200553578, -327673, 0, -1200553578, -327672, 1, -1200553578, -327671, 1, -1200553578, -327670, 1, -1200553578, -327669, 1, -1200553578, -327668, 1, -1200553578, -327667, 0, -1200553578, -327666, 0, -1200553578, -262138, 0, -1200553578, -262137, 0, -1200553578, -262136, 0, -1200553578, -262135, 0, -1200553578, -262134, 0, -1200553578, -262133, 0, -1200553578, -262132, 0, -1200553578, -262131, 0, -1200553578, -262130, 0, -1200553578, -196602, 0, -1200553578, -196601, 0, -1200553578, -196600, 0, -1200553578, -196599, 0, -1200553578, -196598, 0, -1200553578, -196597, 0, -1200553578, -196596, 0, -1200553578, -196595, 0, -1200553578, -196594, 0, -1200553578, -131066, 0, -1200553578, -131065, 0, -1200553578, -131064, 0, -1200553578, -131063, 0, -1200553578, -65530, 0, -1200553578, -65529, 0, -1200553578, -65528, 0, -1200553578, -65527, 0, -1200553578, 6, 0, -1200553578, 7, 1, -1200553578, 8, 0, -1200553578, 9, 0, -1200553578, 65542, 0, -1200553578, 65543, 0, -1200553578, 65544, 0, -1200553578, 65545, 0, -1200553578, 131078, 0, -1200553578, 131079, 0, -1200553578, 131080, 0, -1200553578, 131081, 0, -1200553578, 196614, 0, -1200553578, 196615, 0, -1200553578, 196616, 0, -1200553578 )
27+
_sections_unfolded = [ "Cell" ]
2728

2829
[node name="walls" type="TileMap" parent="." index="1"]
2930

@@ -43,7 +44,8 @@ collision_layer = 1
4344
collision_mask = 1
4445
occluder_light_mask = 1
4546
format = 1
46-
tile_data = PoolIntArray( -917493, 2, -1200553578, -917492, 2, -1200553578, -917491, 2, -1200553578, -917490, 2, -1200553578, -917489, 2, -1200553578, -851957, 2, -1200553578, -851956, 3, -1200553578, -851954, 3, -1200553578, -851953, 2, -1200553578, -786421, 2, -1200553578, -786420, 3, -1200553578, -786418, 3, -1200553578, -786417, 2, -1200553578, -720885, 2, -1200553578, -720881, 2, -1200553578, -655349, 2, -1200553578, -655348, 2, -1200553578, -655346, 3, -1200553578, -655345, 2, -1200553578, -589813, 2, -1200553578, -589809, 2, -1200553578, -524277, 2, -1200553578, -524273, 2, -1200553578, -458747, 2, -1200553578, -458746, 2, -1200553578, -458745, 2, -1200553578, -458744, 536870916, -1200553578, -458743, 536870916, -1200553578, -458742, 2, -1200553578, -458741, 2, -1200553578, -458740, 2, -1200553578, -458738, 2, -1200553578, -458737, 2, -1200553578, -393211, 2, -1200553578, -393209, 3, -1200553578, -393205, 3, -1200553578, -393201, 2, -1200553578, -327675, 4, -1200553578, -327665, 2, -1200553578, -262139, 4, -1200553578, -262134, 3, -1200553578, -262133, 3, -1200553578, -262129, 2, -1200553578, -196603, 2, -1200553578, -196601, 3, -1200553578, -196593, 2, -1200553578, -131067, 2, -1200553578, -131066, 3, -1200553578, -131062, 2, -1200553578, -131061, 2, -1200553578, -131060, 2, -1200553578, -131059, 2, -1200553578, -131058, 2, -1200553578, -131057, 2, -1200553578, -65531, 2, -1200553578, -65530, 2, -1200553578, -65527, 2, -1200553578, -65526, 2, -1200553578, 5, 2, -1200553578, 10, 2, -1200553578, 65541, 2, -1200553578, 65543, 3, -1200553578, 65546, 2, -1200553578, 131077, 2, -1200553578, 131082, 2, -1200553578, 196613, 2, -1200553578, 196618, 2, -1200553578, 262149, 2, -1200553578, 262150, 2, -1200553578, 262151, 2, -1200553578, 262152, 2, -1200553578, 262153, 2, -1200553578, 262154, 2, -1200553578 )
47+
tile_data = PoolIntArray( -917493, 2, -1200553578, -917492, 2, -1200553578, -917491, 2, -1200553578, -917490, 2, -1200553578, -917489, 2, -1200553578, -851957, 2, -1200553578, -851956, 3, -1200553578, -851954, 3, -1200553578, -851953, 2, -1200553578, -786421, 2, -1200553578, -786420, 3, -1200553578, -786418, 3, -1200553578, -786417, 2, -1200553578, -720885, 2, -1200553578, -720881, 2, -1200553578, -655349, 2, -1200553578, -655348, 2, -1200553578, -655346, 3, -1200553578, -655345, 2, -1200553578, -589813, 2, -1200553578, -589809, 2, -1200553578, -524277, 2, -1200553578, -524273, 2, -1200553578, -458747, 2, -1200553578, -458746, 2, -1200553578, -458745, 2, -1200553578, -458744, 536870916, -1200553578, -458743, 536870916, -1200553578, -458742, 2, -1200553578, -458741, 2, -1200553578, -458740, 2, -1200553578, -458738, 2, -1200553578, -458737, 2, -1200553578, -393211, 2, -1200553578, -393209, 3, -1200553578, -393205, 3, -1200553578, -393201, 2, -1200553578, -327675, 4, -1200553578, -327665, 2, -1200553578, -262139, 4, -1200553578, -262129, 2, -1200553578, -196603, 2, 0, -196601, 3, 0, -196593, 2, -1200553578, -131067, 2, 0, -131062, 2, -1200553578, -131061, 2, -1200553578, -131060, 2, -1200553578, -131059, 2, -1200553578, -131058, 2, -1200553578, -131057, 2, -1200553578, -65531, 2, 0, -65530, 2, 0, -65527, 2, -1200553578, -65526, 2, -1200553578, 5, 2, -1200553578, 10, 2, 0, 65541, 2, -1200553578, 65546, 2, 0, 131077, 2, -1200553578, 131081, 3, 0, 131082, 2, 0, 196613, 2, -1200553578, 196618, 2, 0, 262149, 2, -1200553578, 262150, 2, -1200553578, 262151, 2, -1200553578, 262152, 2, -1200553578, 262153, 2, -1200553578, 262154, 2, -1200553578 )
48+
_sections_unfolded = [ "Cell" ]
4749

4850
[node name="troll" parent="walls" index="0" instance=ExtResource( 2 )]
4951

2d/isometric/tileset.tres

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,82 @@
1-
[gd_resource type="TileSet" load_steps=6 format=2]
1+
[gd_resource type="TileSet" load_steps=5 format=2]
22

33
[ext_resource path="res://isotiles.png" type="Texture" id=1]
44

55
[sub_resource type="ConvexPolygonShape2D" id=1]
66

77
custom_solver_bias = 0.0
8-
points = PoolVector2Array( -68, 2, -4, -30, 60, 2, -4, 34 )
8+
points = PoolVector2Array( -4, -30, 60, 2, -4, 34, -68, 2 )
99

1010
[sub_resource type="ConvexPolygonShape2D" id=2]
1111

1212
custom_solver_bias = 0.0
13-
points = PoolVector2Array( -20, -6, -4, -22, 12, -22, 4, 10, -4, 10 )
13+
points = PoolVector2Array( -4, -22, 12, -22, 28, -6, 4, 10, -4, 10, -20, -6 )
1414

1515
[sub_resource type="ConvexPolygonShape2D" id=3]
1616

1717
custom_solver_bias = 0.0
18-
points = PoolVector2Array( 28, -6, 4, 10, 12, -22 )
19-
20-
[sub_resource type="ConvexPolygonShape2D" id=4]
21-
22-
custom_solver_bias = 0.0
23-
points = PoolVector2Array( 66.095, -0.62516, -5.90501, 31.3748, -21.905, 23.3748, 50.095, -8.62516 )
18+
points = PoolVector2Array( -21.905, 23.3748, 50.095, -8.62516, 66.095, -0.62516, -5.90501, 31.3748 )
2419

2520
[resource]
2621

2722
0/name = "base"
2823
0/texture = ExtResource( 1 )
29-
0/tex_offset = Vector2( -4, 6 )
24+
0/tex_offset = Vector2( -66, -42 )
3025
0/modulate = Color( 1, 1, 1, 1 )
3126
0/region = Rect2( 28, 92, 132, 84 )
32-
0/occluder_offset = Vector2( 66, 42 )
33-
0/navigation_offset = Vector2( 66, 42 )
34-
0/shape_offset = Vector2( 0, 0 )
27+
0/is_autotile = false
28+
0/occluder_offset = Vector2( 0, 0 )
29+
0/navigation_offset = Vector2( 0, 0 )
3530
0/shapes = [ ]
3631
1/name = "base2"
3732
1/texture = ExtResource( 1 )
38-
1/tex_offset = Vector2( -4, 6 )
33+
1/tex_offset = Vector2( -66, -42 )
3934
1/modulate = Color( 1, 1, 1, 1 )
4035
1/region = Rect2( 220, 92, 132, 84 )
41-
1/occluder_offset = Vector2( 66, 42 )
42-
1/navigation_offset = Vector2( 66, 42 )
43-
1/shape_offset = Vector2( 0, 0 )
36+
1/is_autotile = false
37+
1/occluder_offset = Vector2( 0, 0 )
38+
1/navigation_offset = Vector2( 0, 0 )
4439
1/shapes = [ ]
4540
2/name = "wall"
4641
2/texture = ExtResource( 1 )
47-
2/tex_offset = Vector2( -4, -32 )
42+
2/tex_offset = Vector2( -69.3109, -99.8051 )
4843
2/modulate = Color( 1, 1, 1, 1 )
4944
2/region = Rect2( 28, 220, 132, 136 )
50-
2/occluder_offset = Vector2( 66, 68 )
51-
2/navigation_offset = Vector2( 66, 68 )
52-
2/shape_offset = Vector2( 66, 68 )
53-
2/shapes = [ SubResource( 1 ) ]
45+
2/is_autotile = false
46+
2/occluder_offset = Vector2( 0, 0 )
47+
2/navigation_offset = Vector2( 0, 0 )
48+
2/shapes = [ {
49+
"autotile_coord": Vector2( 0, 0 ),
50+
"one_way": false,
51+
"shape": SubResource( 1 ),
52+
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
53+
} ]
5454
3/name = "column"
5555
3/texture = ExtResource( 1 )
56-
3/tex_offset = Vector2( -2, -32 )
56+
3/tex_offset = Vector2( -69.5632, -100.446 )
5757
3/modulate = Color( 1, 1, 1, 1 )
5858
3/region = Rect2( 220, 220, 132, 136 )
59-
3/occluder_offset = Vector2( 66, 68 )
60-
3/navigation_offset = Vector2( 66, 68 )
61-
3/shape_offset = Vector2( 66, 68 )
62-
3/shapes = [ SubResource( 2 ), SubResource( 3 ) ]
59+
3/is_autotile = false
60+
3/occluder_offset = Vector2( 0, 0 )
61+
3/navigation_offset = Vector2( 0, 0 )
62+
3/shapes = [ {
63+
"autotile_coord": Vector2( 0, 0 ),
64+
"one_way": false,
65+
"shape": SubResource( 2 ),
66+
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
67+
} ]
6368
4/name = "door1"
6469
4/texture = ExtResource( 1 )
65-
4/tex_offset = Vector2( 16, -22 )
70+
4/tex_offset = Vector2( -50.3623, -90.8164 )
6671
4/modulate = Color( 1, 1, 1, 1 )
6772
4/region = Rect2( 24, 408, 132, 136 )
68-
4/occluder_offset = Vector2( 66, 68 )
69-
4/navigation_offset = Vector2( 66, 68 )
70-
4/shape_offset = Vector2( 66, 68 )
71-
4/shapes = [ SubResource( 4 ) ]
73+
4/is_autotile = false
74+
4/occluder_offset = Vector2( 0, 0 )
75+
4/navigation_offset = Vector2( 0, 0 )
76+
4/shapes = [ {
77+
"autotile_coord": Vector2( 0, 0 ),
78+
"one_way": false,
79+
"shape": SubResource( 3 ),
80+
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
81+
} ]
7282

2d/isometric/tileset_edit.tscn

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,37 @@
44

55
[node name="Node2D" type="Node2D"]
66

7-
[node name="base" type="Sprite" parent="."]
7+
[node name="base" type="Sprite" parent="." index="0"]
88

9-
position = Vector2( 87.5658, 0.113792 )
9+
position = Vector2( 150.049, 61.1264 )
1010
texture = ExtResource( 1 )
11-
offset = Vector2( -4, 6 )
11+
centered = false
12+
offset = Vector2( -66, -42 )
13+
region_enabled = true
1214
region_rect = Rect2( 28, 92, 132, 84 )
15+
_sections_unfolded = [ "Offset", "Region" ]
1316

14-
[node name="base2" type="Sprite" parent="."]
17+
[node name="base2" type="Sprite" parent="." index="1"]
1518

16-
position = Vector2( 196, 44 )
19+
position = Vector2( 257.013, 124.86 )
1720
texture = ExtResource( 1 )
18-
offset = Vector2( -4, 6 )
21+
centered = false
22+
offset = Vector2( -66, -42 )
23+
region_enabled = true
1924
region_rect = Rect2( 220, 92, 132, 84 )
25+
_sections_unfolded = [ "Offset", "Region" ]
2026

21-
[node name="wall" type="Sprite" parent="."]
27+
[node name="wall" type="Sprite" parent="." index="2"]
2228

23-
position = Vector2( 356, 70 )
29+
position = Vector2( 421.311, 137.805 )
2430
texture = ExtResource( 1 )
25-
offset = Vector2( -4, -32 )
31+
centered = false
32+
offset = Vector2( -69.3109, -99.8051 )
33+
region_enabled = true
2634
region_rect = Rect2( 28, 220, 132, 136 )
35+
_sections_unfolded = [ "Offset", "Region" ]
2736

28-
[node name="StaticBody2D" type="StaticBody2D" parent="wall"]
37+
[node name="StaticBody2D" type="StaticBody2D" parent="wall" index="0"]
2938

3039
input_pickable = false
3140
collision_layer = 1
@@ -34,20 +43,24 @@ constant_linear_velocity = Vector2( 0, 0 )
3443
constant_angular_velocity = 0.0
3544
friction = 1.0
3645
bounce = 0.0
46+
_sections_unfolded = [ "Transform" ]
3747

38-
[node name="collision" type="CollisionPolygon2D" parent="wall/StaticBody2D"]
48+
[node name="collision" type="CollisionPolygon2D" parent="wall/StaticBody2D" index="0"]
3949

4050
build_mode = 0
4151
polygon = PoolVector2Array( -68, 2, -4, 34, 60, 2, -4, -30 )
4252

43-
[node name="column" type="Sprite" parent="."]
53+
[node name="column" type="Sprite" parent="." index="3"]
4454

45-
position = Vector2( 292, 198 )
55+
position = Vector2( 359.563, 266.446 )
4656
texture = ExtResource( 1 )
47-
offset = Vector2( -2, -32 )
57+
centered = false
58+
offset = Vector2( -69.5632, -100.446 )
59+
region_enabled = true
4860
region_rect = Rect2( 220, 220, 132, 136 )
61+
_sections_unfolded = [ "Offset", "Region" ]
4962

50-
[node name="StaticBody" type="StaticBody2D" parent="column"]
63+
[node name="StaticBody" type="StaticBody2D" parent="column" index="0"]
5164

5265
input_pickable = false
5366
collision_layer = 1
@@ -56,20 +69,24 @@ constant_linear_velocity = Vector2( 0, 0 )
5669
constant_angular_velocity = 0.0
5770
friction = 1.0
5871
bounce = 0.0
72+
_sections_unfolded = [ "Transform" ]
5973

60-
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="column/StaticBody"]
74+
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="column/StaticBody" index="0"]
6175

6276
build_mode = 0
6377
polygon = PoolVector2Array( -20, -6, -4, 10, 4, 10, 28, -6, 12, -22, -4, -22 )
6478

65-
[node name="door1" type="Sprite" parent="."]
79+
[node name="door1" type="Sprite" parent="." index="4"]
6680

67-
position = Vector2( 85.905, 0.62516 )
81+
position = Vector2( -24.1548, 142.216 )
6882
texture = ExtResource( 1 )
69-
offset = Vector2( 16, -22 )
83+
centered = false
84+
offset = Vector2( -50.3623, -90.8164 )
85+
region_enabled = true
7086
region_rect = Rect2( 24, 408, 132, 136 )
87+
_sections_unfolded = [ "Offset", "Region" ]
7188

72-
[node name="StaticBody2D" type="StaticBody2D" parent="door1"]
89+
[node name="StaticBody2D" type="StaticBody2D" parent="door1" index="0"]
7390

7491
input_pickable = false
7592
collision_layer = 1
@@ -78,8 +95,9 @@ constant_linear_velocity = Vector2( 0, 0 )
7895
constant_angular_velocity = 0.0
7996
friction = 1.0
8097
bounce = 0.0
98+
_sections_unfolded = [ "Transform" ]
8199

82-
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="door1/StaticBody2D"]
100+
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="door1/StaticBody2D" index="0"]
83101

84102
build_mode = 0
85103
polygon = PoolVector2Array( -5.90501, 31.3748, 66.095, -0.62516, 50.095, -8.62516, -21.905, 23.3748 )

0 commit comments

Comments
 (0)