Setup a Basic scene with Autotiles

This commit is contained in:
snoweuph 2023-01-31 02:06:04 +01:00
parent c32b2f2fc5
commit 88bdaf19a5
5 changed files with 406 additions and 65 deletions

View file

@ -1,16 +1,119 @@
[gd_resource type="TileSet" load_steps=2 format=2]
[gd_resource type="TileSet" load_steps=37 format=2]
[ext_resource path="res://Assets/Textures/Tilesets/colony.png" type="Texture" id=1]
[ext_resource path="res://addons/TileMapPlus/TilingRuleSet.gd" type="Script" id=2]
[sub_resource type="ConvexPolygonShape2D" id=9]
points = PoolVector2Array( 0, 16, 0, 16, 0, 0, 0, 0 )
[sub_resource type="ConvexPolygonShape2D" id=10]
points = PoolVector2Array( 4, 16, 0, 16, 0, 0, 4, 0 )
[sub_resource type="ConvexPolygonShape2D" id=11]
points = PoolVector2Array( 0, 0, 16, 0, 16, 4, 0, 4 )
[sub_resource type="ConvexPolygonShape2D" id=12]
points = PoolVector2Array( 0, 0, 16, 0, 16, 4, 0, 4 )
[sub_resource type="ConvexPolygonShape2D" id=13]
points = PoolVector2Array( 16, 4, 0, 4, 0, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=14]
points = PoolVector2Array( 16, 16, 12, 16, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=15]
points = PoolVector2Array( 16, 16, 12, 16, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=16]
points = PoolVector2Array( 16, 16, 12, 16, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=17]
points = PoolVector2Array( 16, 16, 0, 16, 0, 12, 16, 12 )
[sub_resource type="ConvexPolygonShape2D" id=18]
points = PoolVector2Array( 16, 16, 0, 16, 0, 12, 16, 12 )
[sub_resource type="ConvexPolygonShape2D" id=19]
points = PoolVector2Array( 16, 16, 0, 16, 0, 12, 16, 12 )
[sub_resource type="ConvexPolygonShape2D" id=20]
points = PoolVector2Array( 0, 0, 4, 0, 4, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=21]
points = PoolVector2Array( 0, 0, 4, 0, 4, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=38]
points = PoolVector2Array( 0, 0, 4, 0, 4, 4, 0, 4 )
[sub_resource type="ConvexPolygonShape2D" id=39]
points = PoolVector2Array( 0, 12, 4, 12, 4, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=40]
points = PoolVector2Array( 16, 16, 12, 16, 12, 12, 16, 12 )
[sub_resource type="ConvexPolygonShape2D" id=41]
points = PoolVector2Array( 16, 4, 12, 4, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=22]
points = PoolVector2Array( 16, 4, 0, 4, 0, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=23]
points = PoolVector2Array( 0, 0, 4, 0, 4, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=24]
points = PoolVector2Array( 16, 4, 0, 4, 0, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=25]
points = PoolVector2Array( 16, 4, 0, 4, 0, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=26]
points = PoolVector2Array( 16, 16, 12, 16, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=27]
points = PoolVector2Array( 16, 16, 12, 16, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=28]
points = PoolVector2Array( 16, 16, 12, 16, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=29]
points = PoolVector2Array( 16, 16, 0, 16, 0, 12, 16, 12 )
[sub_resource type="ConvexPolygonShape2D" id=30]
points = PoolVector2Array( 16, 16, 0, 16, 0, 12, 16, 12 )
[sub_resource type="ConvexPolygonShape2D" id=31]
points = PoolVector2Array( 0, 12, 16, 12, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=32]
points = PoolVector2Array( 0, 0, 4, 0, 4, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=33]
points = PoolVector2Array( 0, 0, 4, 0, 4, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=34]
points = PoolVector2Array( 16, 4, 12, 4, 12, 0, 16, 0 )
[sub_resource type="ConvexPolygonShape2D" id=35]
points = PoolVector2Array( 16, 16, 12, 16, 12, 12, 16, 12 )
[sub_resource type="ConvexPolygonShape2D" id=36]
points = PoolVector2Array( 0, 12, 4, 12, 4, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=37]
points = PoolVector2Array( 0, 0, 4, 0, 4, 4, 0, 4 )
[sub_resource type="Resource" id=1]
script = ExtResource( 2 )
[resource]
0/name = "colony.png 0"
0/name = "Colony Blue Wall"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 8, 8, 80, 64 )
0/region = Rect2( 8, 56, 48, 16 )
0/tile_mode = 1
0/autotile/bitmask_mode = 0
0/autotile/bitmask_flags = [ ]
0/autotile/bitmask_mode = 1
0/autotile/bitmask_flags = [ Vector2( 0, 0 ), 48, Vector2( 0, 1 ), 438, Vector2( 0, 2 ), 54, Vector2( 1, 0 ), 56, Vector2( 1, 1 ), 511, Vector2( 1, 2 ), 63, Vector2( 2, 0 ), 24, Vector2( 2, 1 ), 219, Vector2( 2, 2 ), 27, Vector2( 3, 0 ), 255, Vector2( 3, 1 ), 507, Vector2( 3, 2 ), 511, Vector2( 3, 3 ), 511, Vector2( 4, 0 ), 447, Vector2( 4, 1 ), 510, Vector2( 4, 2 ), 511, Vector2( 4, 3 ), 511 ]
0/autotile/icon_coordinate = Vector2( 0, 0 )
0/autotile/tile_size = Vector2( 16, 16 )
0/autotile/spacing = 0
@ -26,26 +129,287 @@
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
1/name = "colony.png 1"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 96, 8, 80, 64 )
1/tile_mode = 1
1/autotile/bitmask_mode = 0
1/autotile/bitmask_flags = [ ]
1/autotile/icon_coordinate = Vector2( 0, 0 )
1/autotile/tile_size = Vector2( 16, 16 )
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 = "Colony Red Wall"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 96, 56, 48, 16 )
2/tile_mode = 1
2/autotile/bitmask_mode = 1
2/autotile/bitmask_flags = [ Vector2( 0, 0 ), 48, Vector2( 1, 0 ), 56, Vector2( 2, 0 ), 24 ]
2/autotile/icon_coordinate = Vector2( 0, 0 )
2/autotile/tile_size = Vector2( 16, 16 )
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 = "Colony Blue"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 8, 8, 80, 64 )
3/tile_mode = 1
3/autotile/bitmask_mode = 1
3/autotile/bitmask_flags = [ Vector2( 0, 0 ), 432, Vector2( 0, 1 ), 438, Vector2( 0, 2 ), 54, Vector2( 1, 0 ), 504, Vector2( 1, 1 ), 511, Vector2( 1, 2 ), 63, Vector2( 2, 0 ), 216, Vector2( 2, 1 ), 219, Vector2( 2, 2 ), 27, Vector2( 3, 0 ), 255, Vector2( 3, 1 ), 507, Vector2( 3, 2 ), 511, Vector2( 3, 3 ), 511, Vector2( 4, 0 ), 447, Vector2( 4, 1 ), 510, Vector2( 4, 2 ), 511, Vector2( 4, 3 ), 511 ]
3/autotile/icon_coordinate = Vector2( 0, 0 )
3/autotile/tile_size = Vector2( 16, 16 )
3/autotile/spacing = 0
3/autotile/occluder_map = [ ]
3/autotile/navpoly_map = [ ]
3/autotile/priority_map = [ Vector3( 3, 2, 2 ), Vector3( 3, 3, 2 ), Vector3( 4, 2, 2 ), Vector3( 4, 3, 2 ) ]
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 = SubResource( 9 )
3/shape_one_way = false
3/shape_one_way_margin = 1.0
3/shapes = [ {
"autotile_coord": Vector2( 0, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 9 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 10 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 11 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 12 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 13 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 14 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 15 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 16 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 17 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 18 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 19 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 20 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 21 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 38 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 39 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 3, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 40 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 3, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 41 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
3/z_index = 0
4/name = "Colony Red"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, 0 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 96, 8, 80, 64 )
4/tile_mode = 1
4/autotile/bitmask_mode = 1
4/autotile/bitmask_flags = [ Vector2( 0, 0 ), 432, Vector2( 0, 1 ), 438, Vector2( 0, 2 ), 54, Vector2( 1, 0 ), 504, Vector2( 1, 1 ), 511, Vector2( 1, 2 ), 63, Vector2( 2, 0 ), 216, Vector2( 2, 1 ), 219, Vector2( 2, 2 ), 27, Vector2( 3, 0 ), 255, Vector2( 3, 1 ), 507, Vector2( 3, 2 ), 511, Vector2( 3, 3 ), 511, Vector2( 4, 0 ), 447, Vector2( 4, 1 ), 510, Vector2( 4, 2 ), 511, Vector2( 4, 3 ), 511 ]
4/autotile/icon_coordinate = Vector2( 0, 0 )
4/autotile/tile_size = Vector2( 16, 16 )
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 = SubResource( 22 )
4/shape_one_way = false
4/shape_one_way_margin = 1.0
4/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 22 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 23 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 24 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 25 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 26 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 27 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 28 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 29 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 30 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 31 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 32 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 33 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 3, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 34 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 3, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 35 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 36 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 4, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 37 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
4/z_index = 0
5/name = "Colony Black"
5/texture = ExtResource( 1 )
5/tex_offset = Vector2( 0, 0 )
5/modulate = Color( 1, 1, 1, 1 )
5/region = Rect2( 176, 8, 16, 16 )
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_one_way = false
5/shape_one_way_margin = 0.0
5/shapes = [ ]
5/z_index = 0
script = SubResource( 1 )

File diff suppressed because one or more lines are too long

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -21,13 +21,17 @@ _global_script_class_icons={
[application]
config/name="2d Hack And Slay"
config/icon="res://icon.png"
config/icon="res://addons/TileMapPlus/icon.png"
[editor]
version_control_autoload_on_startup=true
version_control_plugin_name="GitAPI"
[editor_plugins]
enabled=PoolStringArray( "res://addons/TileMapPlus/plugin.cfg" )
[gui]
common/drop_mouse_on_gui_input_disabled=true