Ok, I've managed to create an maze-generator by myself. It will do, though it is not an very good one. If anyone have any idea about how to make it better, please post it, so I can improve the maze. Here is the code:
function MakeMaze()
rem Create the array
dim world(55, 55) as boolean
rem Loop through the "maze", and create it
for x = 0 to 11
for y = 0 to 11
if world(x, y) = 0
wall = rnd( 1000 )
height = rnd( 3 )
obj = GetNewObjectNumber()
rem Which sort of wall?
if wall <= 500
make object box obj, 20, 50 + 50 * height, 20
position object obj, 40 * x, 0, 40 * y
else
if wall > 500 and wall <= 750
t = rnd( 1000 )
if t < 500
make object box obj, 60, 50 + 50 * height, 20
position object obj, 40 * x + 25, 0, 40 * y
world(x + 1, y) = 1
world(x + 2, y) = 1
else
make object box obj, 20, 50 + 50 * height, 60
position object obj, 40 * x, 0, 40 * y + 25
world(x, y + 1) = 1
world(x, y + 2) = 1
endif
else
if wall > 750
t = rnd( 1000 )
if t < 500
make object box obj, 120, 50 + 50 * height, 20
position object obj, 40 * x + 35, 0, 40 * y
world(x + 1, y) = 1
world(x + 2, y) = 1
world(x + 3, y) = 1
world(x + 4, y) = 1
world(x + 5, y) = 1
else
make object box obj, 20, 50 + 50 * height, 120
position object obj, 40 * x, 0, 40 * y + 35
world(x, y + 1) = 1
world(x, y + 2) = 1
world(x, y + 3) = 1
world(x, y + 4) = 1
world(x, y + 5) = 1
endif
endif
endif
endif
world(x, y) = 1
phy make rigid body static box obj
endif
next y
next x
undim world()
endfunction
. Anyway, I thank you for your time.