Re: Controllable maze generation?
Hi,
@3: that's fine.
As of the matrix, here is a 11 x 11 example of how it should work. 1 is a wall, 2 is a base tile, and 0 is an empty file.
11111111111
10000000001
10000000001
10000000001
10000000001
10000000001
10000000001
10000000001
10000000001
10000000001
11111111111
Is the initial, bordered area. Now you make the base tiles like this:
11111111111
10000000001
10202020201
10000000001
10202020201
10000000001
10202020201
10000000001
10202020201
10000000001
11111111111
It's important to keep them in a grid like this to prevent double walls and blocked exits. By changing the distance between two base tiles i.e. changing their density, you can control corridors' height.
Now, suppose we select the base tile on 2;4, counted from bottom left with start index zero and first number the distance from left.
From the four possible directions, we choose the southone, and build the wall like this:
11111111111
10000000001
10202020201
10000000001
10202020201
10000000001
10102020201
10100000001
10102020201
10100000001
11111111111
So as you can see, our selected tile gets walled too, what prevents exactly those blockades, you're talking about, which would occur if we were building from the same tile two times in different directions.
Best regards
Rastislav
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector