Re: Controllable maze generation?

@2.
I am so, so sorry for not looking at that topic... I really try to read as much as I can. I am again, extremely sorry for missing this.
To that end, I have a few questions for you based on your explanation from post 6.
Your second point in maze generation states:
2. Turn border tiles into walls.
I want to make sure I understand this correctly. When you say boarder tiles, do you mean something like this?
Note, 0 is empty space, 1 is a wall

[
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 0, 0, 0, 1],
[1, 0, 0, 0, 1],
[1, 1, 1, 1, 1]
]

As of now, all of my boarders are walls, making a completely sealed off area. Is this what you intended?
Your point 4 states the following:
4.1 Choose a random base tile from the map.
4.2 You can lead a wall from this point in 4 directions, select one randomly.
4.3 Make a continuous wall in that direction, until you reach an already existing wall. this is the reason why border the area first, otherwise you could end up out of index. If you go through a base tile, turn it into wall too, including the one which you selected in step 4.1.
So, if I have the same matrix shown earlier, except that 2 now represents base tiles, couldn't the following occur?
I will paste the matrix again including the base tiles this time so we are on the same page

[
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 2, 0, 2, 1],
[1, 0, 0, 0, 1],
[1, 1, 1, 1, 1]
]

By your logic, if I choose the tile at (2, 3), and choose to build a wall to the left, the following will take place.

[
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 2, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 1, 1, 1, 1]
]

Is the tile to the left a wall? No, so the matrix changes once again, because it has to be either an empty or a base tile, both of which can be changed into a wall, which is what I understand from your post. Here is the final matrix which generates an impassable maze:

[
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 1],
[1, 1, 1, 1, 1]
]

I would appreciate if you could correct my logic, as I think it is a simple misunderstanding on my part.



-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : alisson via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : alisson via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : alisson via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector

Reply via email to