GenerateLabyrinth w,h,sx,sy,tx,ty,lt,ds,ws,wp;

starts the maze generator

missing by default

the parameters are integers

The maze generator will create a w x h matrix,representing the maze, which will be symmetric to the center point.

The sx and sy will set the starting cell for the first player. The second player's cordinates will be known at this time, due to the symmetry.The cordinates in pixels for each player must be set through the Pos1 and Pos2 commands.

tx and ty will set the cordinates of the target cell for the first player. The one for the second player is calculated. The target cell is used to be the center of the maze.

It is granted that the target cell can be reached from the starting cell.

The cordinate of cells starts from 1.

This command only generates a maze, and it will nothing happen if a player reaches the target cell. If we want to end the game when somebody reaches the target, we must either place a single treasure in that cell, or place a checkpoint.

The wall of the cells can be made from two kind of materials:
one which can be passed : the target can reached through this walls. They can be built either at starting time from a material on which the tanks can move (Free, Fast, Hill, ...), or from Mild, which can be razed.
one which can't be passed : these walls made up the real maze.

The material of the walls can be set using LabyrinthWalls1 and LabyrinthWalls2 commands:

Solid;
LabyrinthWalls1;
Mild;
LabyrinthWalls2;

On each side of the walls which can't be passed there is a padding from the other material (the mild one). The width of this padding can be set through the wp. The padding is used just in case of special lands, like the Moonlight. You can simply set it to 0 in other cases.

The ws sets the width of the walls.

The lt sets the lenght of the sortest path to the target. The ds gives the "density" of the walls. It can be 2,3. The best value for this is 2.

w : width in cells
h : height in cells
sx: starting x for 1st player (1 based)
sz: starting y for 1st player (1 based)
tx: x of the target (1 based)
tz: y of the target (1 based)
lt: the lenght of the shortest path. Best value: 10.
ds: density of wallsadja meg. Best value: 2.
ws: width of the walls
wp: width of padding.

Related commands : LabyrinthWalls1, LabyrinthWalls2;

Sample : Labyrinth, Bio, Moonlight