les tiles ca pue la merde

This commit is contained in:
Hurlu 2020-04-04 22:17:51 +02:00
parent 03666f269b
commit 23ac32ec34
7 changed files with 399 additions and 24 deletions

318
Assets/Tiling/Tileset.tres Normal file
View File

@ -0,0 +1,318 @@
[gd_resource type="TileSet" load_steps=6 format=2]
[ext_resource path="res://Assets/Tiling/tileset.png" type="Texture" id=1]
[sub_resource type="ConvexPolygonShape2D" id=5]
points = PoolVector2Array( 0.257217, 0.262283, 7.93196, 0.262283, 7.93196, 31.659, 0.257217, 31.659 )
[sub_resource type="ConvexPolygonShape2D" id=6]
points = PoolVector2Array( 0.0246506, 0.894691, 7.93196, 0.894691, 7.93196, 31.5937, 0.0246506, 31.5937 )
[sub_resource type="ConvexPolygonShape2D" id=7]
points = PoolVector2Array( 32, 32, 24.2623, 32, 24.4949, 0, 32, 0 )
[sub_resource type="ConvexPolygonShape2D" id=8]
points = PoolVector2Array( 32, 31.0414, 24.0297, 31.0414, 24.0297, 0, 32, 0 )
[resource]
0/name = "All ground tiles random"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 23, 303, 256, 96 )
0/tile_mode = 1
0/autotile/bitmask_mode = 0
0/autotile/bitmask_flags = [ Vector2( 0, 0 ), 325, Vector2( 0, 1 ), 325, Vector2( 0, 2 ), 325, Vector2( 1, 0 ), 325, Vector2( 1, 1 ), 325, Vector2( 1, 2 ), 325, Vector2( 2, 0 ), 325, Vector2( 2, 1 ), 325, Vector2( 2, 2 ), 325, Vector2( 3, 0 ), 325, Vector2( 3, 1 ), 325, Vector2( 3, 2 ), 325, Vector2( 4, 0 ), 325, Vector2( 4, 1 ), 325, Vector2( 4, 2 ), 325, Vector2( 5, 0 ), 325, Vector2( 5, 1 ), 325, Vector2( 5, 2 ), 325, Vector2( 6, 0 ), 325, Vector2( 6, 1 ), 325, Vector2( 6, 2 ), 325, Vector2( 7, 0 ), 325, Vector2( 7, 1 ), 325, Vector2( 7, 2 ), 325 ]
0/autotile/icon_coordinate = Vector2( 0, 0 )
0/autotile/tile_size = Vector2( 32, 32 )
0/autotile/spacing = 0
0/autotile/occluder_map = [ ]
0/autotile/navpoly_map = [ ]
0/autotile/priority_map = [ ]
0/autotile/z_index_map = [ ]
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape_one_way = false
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
1/name = "Simple ground rand"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 23, 303, 128, 64 )
1/tile_mode = 1
1/autotile/bitmask_mode = 0
1/autotile/bitmask_flags = [ Vector2( 0, 0 ), 325, Vector2( 0, 1 ), 325, Vector2( 1, 0 ), 325, Vector2( 1, 1 ), 325, Vector2( 2, 0 ), 325, Vector2( 2, 1 ), 325, Vector2( 3, 0 ), 325, Vector2( 3, 1 ), 325 ]
1/autotile/icon_coordinate = Vector2( 0, 0 )
1/autotile/tile_size = Vector2( 32, 32 )
1/autotile/spacing = 0
1/autotile/occluder_map = [ ]
1/autotile/navpoly_map = [ ]
1/autotile/priority_map = [ ]
1/autotile/z_index_map = [ ]
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
2/name = "Complex ground rand"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 23, 367, 256, 32 )
2/tile_mode = 1
2/autotile/bitmask_mode = 0
2/autotile/bitmask_flags = [ Vector2( 0, 0 ), 325, Vector2( 1, 0 ), 325, Vector2( 2, 0 ), 325, Vector2( 3, 0 ), 325, Vector2( 4, 0 ), 325, Vector2( 5, 0 ), 325, Vector2( 6, 0 ), 325, Vector2( 7, 0 ), 325 ]
2/autotile/icon_coordinate = Vector2( 0, 0 )
2/autotile/tile_size = Vector2( 32, 32 )
2/autotile/spacing = 0
2/autotile/occluder_map = [ ]
2/autotile/navpoly_map = [ ]
2/autotile/priority_map = [ ]
2/autotile/z_index_map = [ ]
2/occluder_offset = Vector2( 0, 0 )
2/navigation_offset = Vector2( 0, 0 )
2/shape_offset = Vector2( 0, 0 )
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
2/shape_one_way = false
2/shape_one_way_margin = 0.0
2/shapes = [ ]
2/z_index = 0
3/name = "Cracks rand"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 151, 303, 128, 64 )
3/tile_mode = 1
3/autotile/bitmask_mode = 0
3/autotile/bitmask_flags = [ Vector2( 0, 0 ), 325, Vector2( 0, 1 ), 325, Vector2( 1, 0 ), 325, Vector2( 1, 1 ), 325, Vector2( 2, 0 ), 325, Vector2( 2, 1 ), 325, Vector2( 3, 0 ), 325, Vector2( 3, 1 ), 325 ]
3/autotile/icon_coordinate = Vector2( 0, 0 )
3/autotile/tile_size = Vector2( 32, 32 )
3/autotile/spacing = 0
3/autotile/occluder_map = [ ]
3/autotile/navpoly_map = [ ]
3/autotile/priority_map = [ ]
3/autotile/z_index_map = [ ]
3/occluder_offset = Vector2( 0, 0 )
3/navigation_offset = Vector2( 0, 0 )
3/shape_offset = Vector2( 0, 0 )
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
3/shape_one_way = false
3/shape_one_way_margin = 0.0
3/shapes = [ ]
3/z_index = 0
4/name = "FillerWall"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, 0 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 55, 207, 64, 64 )
4/tile_mode = 1
4/autotile/bitmask_mode = 0
4/autotile/bitmask_flags = [ Vector2( 0, 0 ), 325, Vector2( 0, 1 ), 325, Vector2( 1, 0 ), 325, Vector2( 1, 1 ), 325 ]
4/autotile/icon_coordinate = Vector2( 0, 0 )
4/autotile/tile_size = Vector2( 32, 32 )
4/autotile/spacing = 0
4/autotile/occluder_map = [ ]
4/autotile/navpoly_map = [ ]
4/autotile/priority_map = [ ]
4/autotile/z_index_map = [ ]
4/occluder_offset = Vector2( 0, 0 )
4/navigation_offset = Vector2( 0, 0 )
4/shape_offset = Vector2( 0, 0 )
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
4/shape_one_way = false
4/shape_one_way_margin = 0.0
4/shapes = [ ]
4/z_index = 0
5/name = "WallLeft"
5/texture = ExtResource( 1 )
5/tex_offset = Vector2( 0, 0 )
5/modulate = Color( 1, 1, 1, 1 )
5/region = Rect2( 23, 143, 32, 32 )
5/tile_mode = 0
5/occluder_offset = Vector2( 0, 0 )
5/navigation_offset = Vector2( 0, 0 )
5/shape_offset = Vector2( 0, 0 )
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
5/shape = SubResource( 5 )
5/shape_one_way = false
5/shape_one_way_margin = 1.0
5/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 5 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
5/z_index = 0
6/name = "WallLeftBase"
6/texture = ExtResource( 1 )
6/tex_offset = Vector2( 0, 0 )
6/modulate = Color( 1, 1, 1, 1 )
6/region = Rect2( 23, 111, 32, 32 )
6/tile_mode = 0
6/occluder_offset = Vector2( 0, 0 )
6/navigation_offset = Vector2( 0, 0 )
6/shape_offset = Vector2( 0, 0 )
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
6/shape = SubResource( 6 )
6/shape_one_way = false
6/shape_one_way_margin = 1.0
6/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 6 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
6/z_index = 1
7/name = "WallLeftFull"
7/texture = ExtResource( 1 )
7/tex_offset = Vector2( 0, 0 )
7/modulate = Color( 1, 1, 1, 1 )
7/region = Rect2( 23, 79, 32, 32 )
7/tile_mode = 0
7/occluder_offset = Vector2( 0, 0 )
7/navigation_offset = Vector2( 0, 0 )
7/shape_offset = Vector2( 0, 0 )
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
7/shape_one_way = false
7/shape_one_way_margin = 0.0
7/shapes = [ ]
7/z_index = 0
8/name = "WallRight"
8/texture = ExtResource( 1 )
8/tex_offset = Vector2( 0, 0 )
8/modulate = Color( 1, 1, 1, 1 )
8/region = Rect2( 119, 143, 32, 32 )
8/tile_mode = 0
8/occluder_offset = Vector2( 0, 0 )
8/navigation_offset = Vector2( 0, 0 )
8/shape_offset = Vector2( 0, 0 )
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
8/shape = SubResource( 7 )
8/shape_one_way = false
8/shape_one_way_margin = 1.0
8/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 7 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
8/z_index = 0
9/name = "WallRightBase"
9/texture = ExtResource( 1 )
9/tex_offset = Vector2( 0, 0 )
9/modulate = Color( 1, 1, 1, 1 )
9/region = Rect2( 119, 111, 32, 32 )
9/tile_mode = 0
9/occluder_offset = Vector2( 0, 0 )
9/navigation_offset = Vector2( 0, 0 )
9/shape_offset = Vector2( 0, 0 )
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
9/shape = SubResource( 8 )
9/shape_one_way = false
9/shape_one_way_margin = 1.0
9/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 8 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
9/z_index = 1
10/name = "WallRightFull"
10/texture = ExtResource( 1 )
10/tex_offset = Vector2( 0, 0 )
10/modulate = Color( 1, 1, 1, 1 )
10/region = Rect2( 119, 79, 32, 32 )
10/tile_mode = 0
10/occluder_offset = Vector2( 0, 0 )
10/navigation_offset = Vector2( 0, 0 )
10/shape_offset = Vector2( 0, 0 )
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
10/shape_one_way = false
10/shape_one_way_margin = 0.0
10/shapes = [ ]
10/z_index = 0
11/name = "WallLeftTop"
11/texture = ExtResource( 1 )
11/tex_offset = Vector2( 0, 0 )
11/modulate = Color( 1, 1, 1, 1 )
11/region = Rect2( 23, 15, 32, 32 )
11/tile_mode = 0
11/occluder_offset = Vector2( 0, 0 )
11/navigation_offset = Vector2( 0, 0 )
11/shape_offset = Vector2( 0, 0 )
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
11/shape_one_way = false
11/shape_one_way_margin = 0.0
11/shapes = [ ]
11/z_index = 0
12/name = "WallRightTop"
12/texture = ExtResource( 1 )
12/tex_offset = Vector2( 0, 0 )
12/modulate = Color( 1, 1, 1, 1 )
12/region = Rect2( 119, 15, 32, 32 )
12/tile_mode = 0
12/occluder_offset = Vector2( 0, 0 )
12/navigation_offset = Vector2( 0, 0 )
12/shape_offset = Vector2( 0, 0 )
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
12/shape_one_way = false
12/shape_one_way_margin = 0.0
12/shapes = [ ]
12/z_index = 0
13/name = "WallTop"
13/texture = ExtResource( 1 )
13/tex_offset = Vector2( 0, 0 )
13/modulate = Color( 1, 1, 1, 1 )
13/region = Rect2( 55, 15, 64, 32 )
13/tile_mode = 1
13/autotile/bitmask_mode = 0
13/autotile/bitmask_flags = [ Vector2( 0, 0 ), 260, Vector2( 1, 0 ), 65 ]
13/autotile/icon_coordinate = Vector2( 0, 0 )
13/autotile/tile_size = Vector2( 32, 32 )
13/autotile/spacing = 0
13/autotile/occluder_map = [ ]
13/autotile/navpoly_map = [ ]
13/autotile/priority_map = [ ]
13/autotile/z_index_map = [ ]
13/occluder_offset = Vector2( 0, 0 )
13/navigation_offset = Vector2( 0, 0 )
13/shape_offset = Vector2( 0, 0 )
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
13/shape_one_way = false
13/shape_one_way_margin = 0.0
13/shapes = [ ]
13/z_index = 0
14/name = "WallCenterBase"
14/texture = ExtResource( 1 )
14/tex_offset = Vector2( 0, 0 )
14/modulate = Color( 1, 1, 1, 1 )
14/region = Rect2( 55, 111, 64, 32 )
14/tile_mode = 1
14/autotile/bitmask_mode = 0
14/autotile/bitmask_flags = [ Vector2( 0, 0 ), 260, Vector2( 1, 0 ), 65 ]
14/autotile/icon_coordinate = Vector2( 0, 0 )
14/autotile/tile_size = Vector2( 32, 32 )
14/autotile/spacing = 0
14/autotile/occluder_map = [ ]
14/autotile/navpoly_map = [ ]
14/autotile/priority_map = [ ]
14/autotile/z_index_map = [ ]
14/occluder_offset = Vector2( 0, 0 )
14/navigation_offset = Vector2( 0, 0 )
14/shape_offset = Vector2( 0, 0 )
14/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
14/shape_one_way = false
14/shape_one_way_margin = 0.0
14/shapes = [ ]
14/z_index = 1

BIN
Assets/Tiling/tileset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/tileset.png-06023f60f54ec986b75003a8d422612f.stex"
path="res://.import/tileset.png-2065aa8976bcb5e9b347b30001fed630.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/tileset.png"
dest_files=[ "res://.import/tileset.png-06023f60f54ec986b75003a8d422612f.stex" ]
source_file="res://Assets/Tiling/tileset.png"
dest_files=[ "res://.import/tileset.png-2065aa8976bcb5e9b347b30001fed630.stex" ]
[params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

60
Scene/GameMap.tscn Normal file

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 15.5015, 46.849 )
[sub_resource type="Animation" id=6]
[sub_resource type="Animation" id=2]
resource_name = "IdleDown"
length = 0.1
loop = true
@ -23,7 +23,7 @@ tracks/0/keys = {
"values": [ 7 ]
}
[sub_resource type="Animation" id=7]
[sub_resource type="Animation" id=3]
resource_name = "IdleLeft"
length = 0.1
loop = true
@ -40,7 +40,7 @@ tracks/0/keys = {
"values": [ 14 ]
}
[sub_resource type="Animation" id=8]
[sub_resource type="Animation" id=4]
resource_name = "IdleRight"
length = 0.1
loop = true
@ -57,7 +57,7 @@ tracks/0/keys = {
"values": [ 0 ]
}
[sub_resource type="Animation" id=9]
[sub_resource type="Animation" id=5]
resource_name = "IdleTop"
length = 0.1
loop = true
@ -74,8 +74,7 @@ tracks/0/keys = {
"values": [ 21 ]
}
[sub_resource type="Animation" id=2]
resource_name = "RunDown"
[sub_resource type="Animation" id=6]
length = 0.7
loop = true
tracks/0/type = "value"
@ -91,8 +90,7 @@ tracks/0/keys = {
"values": [ 8, 9, 10, 11, 12, 13, 7 ]
}
[sub_resource type="Animation" id=3]
resource_name = "RunLeft"
[sub_resource type="Animation" id=7]
length = 0.7
loop = true
tracks/0/type = "value"
@ -108,8 +106,7 @@ tracks/0/keys = {
"values": [ 15, 16, 17, 18, 19, 20, 14 ]
}
[sub_resource type="Animation" id=4]
resource_name = "RunRight"
[sub_resource type="Animation" id=8]
length = 0.7
loop = true
tracks/0/type = "value"
@ -125,8 +122,7 @@ tracks/0/keys = {
"values": [ 1, 2, 3, 4, 5, 6, 0 ]
}
[sub_resource type="Animation" id=5]
resource_name = "RunUp"
[sub_resource type="Animation" id=9]
length = 0.7
loop = true
tracks/0/type = "value"
@ -210,6 +206,7 @@ start_node = "Idle"
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
z_index = 2
texture = ExtResource( 1 )
hframes = 28
frame = 14
@ -219,14 +216,14 @@ position = Vector2( 0.263519, 0.0374289 )
shape = SubResource( 1 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/IdleDown = SubResource( 6 )
anims/IdleLeft = SubResource( 7 )
anims/IdleRight = SubResource( 8 )
anims/IdleTop = SubResource( 9 )
anims/RunDown = SubResource( 2 )
anims/RunLeft = SubResource( 3 )
anims/RunRight = SubResource( 4 )
anims/RunUp = SubResource( 5 )
anims/IdleDown = SubResource( 2 )
anims/IdleLeft = SubResource( 3 )
anims/IdleRight = SubResource( 4 )
anims/IdleTop = SubResource( 5 )
anims/RunDown = SubResource( 6 )
anims/RunLeft = SubResource( 7 )
anims/RunRight = SubResource( 8 )
anims/RunUp = SubResource( 9 )
[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource( 22 )

View File

@ -16,7 +16,7 @@ _global_script_class_icons={
[application]
config/name="Paint Jam 2020"
run/main_scene="res://Scene/TestScene.tscn"
run/main_scene="res://Scene/GameMap.tscn"
config/icon="res://icon.png"
[display]