- Created room1.tmx and room1.lua for the first room in the game, including tiles, collision objects, and NPCs. - Added room2.tmx and room2.lua for the second room, featuring tiles, collision objects, and an enemy. - Introduced a world template to manage map transitions and layout. - Implemented a new tileset (castle.tsx and castle.lua) for the castle theme, including tile properties and image references.
256 lines
6.2 KiB
Lua
256 lines
6.2 KiB
Lua
return {
|
|
version = "1.5",
|
|
luaversion = "5.1",
|
|
tiledversion = "1.8.4",
|
|
orientation = "orthogonal",
|
|
renderorder = "right-down",
|
|
width = 20,
|
|
height = 12,
|
|
tilewidth = 40,
|
|
tileheight = 40,
|
|
nextlayerid = 6,
|
|
nextobjectid = 12,
|
|
properties = {
|
|
["name"] = "Test Map - Room 2"
|
|
},
|
|
tilesets = {
|
|
{
|
|
name = "castle",
|
|
firstgid = 1,
|
|
filename = "../tilesets/castle.tsx"
|
|
}
|
|
},
|
|
layers = {
|
|
{
|
|
type = "tilelayer",
|
|
x = 0,
|
|
y = 0,
|
|
width = 20,
|
|
height = 12,
|
|
id = 1,
|
|
name = "tiles",
|
|
visible = true,
|
|
opacity = 1,
|
|
offsetx = 0,
|
|
offsety = 0,
|
|
parallaxx = 1,
|
|
parallaxy = 1,
|
|
properties = {},
|
|
encoding = "lua",
|
|
data = {
|
|
0, 0, 0, 0, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 0,
|
|
0, 0, 0, 0, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 0,
|
|
0, 0, 0, 0, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 0,
|
|
0, 0, 0, 0, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 0,
|
|
0, 0, 0, 0, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 0,
|
|
0, 0, 0, 0, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 0,
|
|
0, 0, 0, 0, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 0,
|
|
0, 0, 0, 0, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 0,
|
|
7, 7, 7, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 0,
|
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
}
|
|
},
|
|
{
|
|
type = "tilelayer",
|
|
x = 0,
|
|
y = 0,
|
|
width = 20,
|
|
height = 12,
|
|
id = 2,
|
|
name = "decal",
|
|
visible = true,
|
|
opacity = 1,
|
|
offsetx = 0,
|
|
offsety = 0,
|
|
parallaxx = 1,
|
|
parallaxy = 1,
|
|
properties = {},
|
|
encoding = "lua",
|
|
data = {
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 40, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
}
|
|
},
|
|
{
|
|
type = "objectgroup",
|
|
draworder = "topdown",
|
|
id = 3,
|
|
name = "collision",
|
|
visible = true,
|
|
opacity = 0.5,
|
|
offsetx = 0,
|
|
offsety = 0,
|
|
parallaxx = 1,
|
|
parallaxy = 1,
|
|
properties = {},
|
|
objects = {
|
|
{
|
|
id = 1,
|
|
name = "",
|
|
type = "",
|
|
shape = "rectangle",
|
|
x = 120,
|
|
y = 120,
|
|
width = 40,
|
|
height = 200,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {}
|
|
},
|
|
{
|
|
id = 2,
|
|
name = "",
|
|
type = "",
|
|
shape = "rectangle",
|
|
x = 0,
|
|
y = 400,
|
|
width = 760,
|
|
height = 40,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {}
|
|
},
|
|
{
|
|
id = 3,
|
|
name = "",
|
|
type = "",
|
|
shape = "rectangle",
|
|
x = 760,
|
|
y = 120,
|
|
width = 40,
|
|
height = 280,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {}
|
|
},
|
|
{
|
|
id = 4,
|
|
name = "",
|
|
type = "",
|
|
shape = "rectangle",
|
|
x = 160,
|
|
y = 80,
|
|
width = 600,
|
|
height = 40,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {}
|
|
},
|
|
{
|
|
id = 7,
|
|
name = "",
|
|
type = "",
|
|
shape = "rectangle",
|
|
x = 0,
|
|
y = 280,
|
|
width = 120,
|
|
height = 40,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
type = "objectgroup",
|
|
draworder = "topdown",
|
|
id = 4,
|
|
name = "markers",
|
|
visible = true,
|
|
opacity = 1,
|
|
offsetx = 0,
|
|
offsety = 0,
|
|
parallaxx = 1,
|
|
parallaxy = 1,
|
|
properties = {},
|
|
objects = {
|
|
{
|
|
id = 5,
|
|
name = "spawn",
|
|
type = "",
|
|
shape = "point",
|
|
x = 360,
|
|
y = 240,
|
|
width = 0,
|
|
height = 0,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {}
|
|
},
|
|
{
|
|
id = 8,
|
|
name = "entry",
|
|
type = "",
|
|
shape = "point",
|
|
x = 40,
|
|
y = 360,
|
|
width = 0,
|
|
height = 0,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
type = "objectgroup",
|
|
draworder = "topdown",
|
|
id = 5,
|
|
name = "objects",
|
|
visible = true,
|
|
opacity = 1,
|
|
offsetx = 0,
|
|
offsety = 0,
|
|
parallaxx = 1,
|
|
parallaxy = 1,
|
|
properties = {},
|
|
objects = {
|
|
{
|
|
id = 6,
|
|
name = "enemy",
|
|
type = "",
|
|
shape = "rectangle",
|
|
x = 530,
|
|
y = 220,
|
|
width = 40,
|
|
height = 40,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {
|
|
["actor"] = "dummy",
|
|
["encounter"] = "dummy"
|
|
}
|
|
},
|
|
{
|
|
id = 9,
|
|
name = "transition",
|
|
type = "",
|
|
shape = "rectangle",
|
|
x = -40,
|
|
y = 320,
|
|
width = 40,
|
|
height = 80,
|
|
rotation = 0,
|
|
visible = true,
|
|
properties = {
|
|
["map"] = "room1",
|
|
["marker"] = "entry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|