BDS Software

Making Maze Number 1 (Using the Tiled Map Editor) - Page 5 of 5



I then copied the maze01.tmx numeric data and pasted it into maze01.html's initializeArrays() function. After that, I added some strategically placed left brackets ( "[" ) and right brackets ( "]" ) as well as some commas and semi-colons, to form the data into 20 by 20 two-dimensional arrays, resulting in:

// Maze #1 Level #0 Floor Array.
// 1 ==> Blank Square
// 6 ==> Start Square
// 7 ==> Text = Blank Square
// 8 ==> Text = Blank Square
// 11 ==> Finish Square
// 12 ==> Text = Blank Square
// 13 ==> Text = Blank Square
// 41 through 50 ==> Wall Squares
// (The Start Square 6, and Text Squares 7, 8, 12, and 13
// function the same as Blank Square 1).
maze01Level00FloorArray = [
[41,42,43,44,45,46,47,48,49,50,41,42,43,44,45,46,47,48,49,50],
[46,6,7,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41],
[45,41,42,43,1,41,1,42,43,44,45,46,1,47,48,49,50,41,1,42],
[44,1,1,1,1,42,1,1,1,43,1,1,1,44,1,1,1,1,1,43],
[43,1,45,1,46,47,1,48,1,49,1,50,1,41,1,42,1,43,44,44],
[42,1,45,1,1,1,1,46,1,47,1,48,1,49,1,50,1,41,1,45],
[41,1,42,43,44,1,45,46,1,47,1,48,1,49,1,50,1,41,1,46],
[50,1,42,1,1,1,1,1,1,43,1,44,1,45,1,46,1,1,1,47],
[49,1,47,48,49,50,41,42,43,44,1,45,1,46,1,47,48,49,1,48],
[48,1,1,1,1,1,1,1,1,1,1,50,1,1,1,41,1,1,1,49],
[47,1,42,43,44,45,1,46,47,48,49,50,41,42,43,44,1,45,46,50],
[46,1,47,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,41],
[45,1,48,1,49,1,50,41,42,1,43,1,1,44,1,45,1,46,47,42],
[44,1,48,1,49,1,50,1,41,1,1,1,42,43,1,44,1,45,1,43],
[43,1,46,1,47,1,48,1,49,50,41,1,1,42,1,43,1,1,1,44],
[42,1,44,1,45,1,46,1,47,1,48,1,49,50,41,42,43,44,45,45],
[41,1,1,1,46,1,1,1,47,1,1,1,1,1,1,1,1,1,1,46],
[50,1,48,49,50,41,1,42,43,44,1,45,46,47,1,48,43,42,41,47],
[49,1,1,1,1,49,1,1,1,1,1,1,1,50,1,1,12,13,11,48],
[48,47,46,45,44,43,42,41,50,49,48,47,46,45,44,43,42,41,50,49]
];

// Initial Maze #1 Level #0 Items Array
// 0 ==> No Item
// 100 ==> Power Pill
initialmaze01Level00ItemsArray = [
[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,100,0,0,0,100,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,100,0,100,0,0,0,0,0,0,0,0,0,100,0],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,100,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,100,0,0,100,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,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0],
[0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,100,0],
[0,0,0,0,0,0,0,0,0,0,0,0,100,0,100,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,100,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,100,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,100,0,100,0,0,0,0,0,100,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]
];

// Initial Maze #1 Level #0 Avatars Array
// 0 ==> No Avatar
// 51 ==> Player Avatar
initialmaze01Level00AvatarsArray = [
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
[0,51,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,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,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,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]
];

And that completed my use of the Tiled Map Editor in making Maze number 1.




                                                                                                                                                                M.D.J. 2018/08/19