Hardware Reference
In-Depth Information
MAZE_X = 0
GROUND = 0
MAZE_Z = 0
MAZE_MATERIAL = 1 #stone
GROUND_MATERIAL = 2 #grass
CEILING = False
To build the maze, you will start with a grid of walls with one-block spaces (or cells) between
them, which looks a bit like a potato wale (see Figure 7-2). Each cell starts with four walls,
and the program knocks walls down to create paths between them and build the maze. he
maze is square, and its SIZE is measured in cells. A maze with a SIZE of 10 will have 10 cells
in the x and z dimensions, but will occupy double that space in the Minecraft world (that is,
20 blocks by 20 blocks) because there is a one-block wall between each cell. his will become
clearer as you start to build the maze. I've tried mazes as big as 40, but they take some time
to build and ages to explore. 10 is big enough for now. he program will stop with an error if
there isn't enough room for all of the maze in your world.
he HEIGHT is how many blocks tall the maze walls are. I chose 2 because a value of 1 means
that the player can just walk over the maze. (he player automatically steps up onto blocks 1
unit high.) Higher values obscure any mountains in the distance that can otherwise give a
nice visual hint to the player.
he constants MAZE_X , GROUND and MAZE_Z are used for the starting coordinates of the
maze. he MAZE_MATERIAL is stone (1), and the GROUND_MATERIAL is grass (2). I've added
an option for a ceiling, to stop players from just lying out of the top of the maze, but I've
turned it of for now so that you can freely explore the maze as you're building it.
A maze of bookshelves ( MAZE_MATERIAL=47 ) looks great!
Laying the Foundations
One of the irst things you need to do is make sure that you're building on solid land. Because
Minecraft worlds are dynamically generated, you might ind that you're building a maze
inside a mountain or in the sea, otherwise.
As well as the area the maze will occupy, you'll clear an area of 10 blocks all the way around
it, so the players can approach it easily and walk around the outside of it. First you clear the
area by illing it with air blocks, which will wipe out anything else in that space.
 
Search WWH ::




Custom Search