Fairly new to VBA and have an idea that I think is possible but need a ton of help. Any assistance would be appreciated.
I am looking to create a Random Dungeon Map Generator in Excel with the intention to make printouts. I think I have the steps down but I have no clue on how to do this and am hoping that once this project is complete my understanding of VBA will significantly increase.
Input Values:
Max Tunnel Length
Loop Times
Designate a static range or "boundary grid" this will be the print area and give each cell in that grid a value of "1"
11111
11111
11111
11111
Locate a "StartingPoint" by selecting a random cell in the range and change that cell value to "0"
11111
11101
11111
11111
From the "StartingPoint" offset in a random direction for a variable amount of cells (from 1 to "MaxTunnelLength") or until it hits the boundary creating a row or column of "0"s creating something like a "tunnel"
11101
11101
11111
11111
From there loop the tunneling process a variable amount of cycles determined by input "Loop Cycles" each time offsetting in a new direction (example of six consecutive loops using a very small grid)
11100 11100 11100 11100 11100 11100
11101 11100 11100 11100 10100 00100
11111 11110 10000 10000 10000 10000
11111 11111 11111 10111 10111 10111
After I get a range full of "1" and "0" I can then work on using conditional formatting as a quick fix until I learn another program to format the cells based on their value and position related to neighboring cell values. I found something similar in ww.freecodecamp.org/news/how-to-make-your-own-procedural-dungeon-map-generator-using-the-random-walk-algorithm-e0085c8aa9a/ but it wasn't in VBA. I know this is a huge ask but any help would be greatly appreciated. Thank you
I am looking to create a Random Dungeon Map Generator in Excel with the intention to make printouts. I think I have the steps down but I have no clue on how to do this and am hoping that once this project is complete my understanding of VBA will significantly increase.
Input Values:
Max Tunnel Length
Loop Times
Designate a static range or "boundary grid" this will be the print area and give each cell in that grid a value of "1"
11111
11111
11111
11111
Locate a "StartingPoint" by selecting a random cell in the range and change that cell value to "0"
11111
11101
11111
11111
From the "StartingPoint" offset in a random direction for a variable amount of cells (from 1 to "MaxTunnelLength") or until it hits the boundary creating a row or column of "0"s creating something like a "tunnel"
11101
11101
11111
11111
From there loop the tunneling process a variable amount of cycles determined by input "Loop Cycles" each time offsetting in a new direction (example of six consecutive loops using a very small grid)
11100 11100 11100 11100 11100 11100
11101 11100 11100 11100 10100 00100
11111 11110 10000 10000 10000 10000
11111 11111 11111 10111 10111 10111
After I get a range full of "1" and "0" I can then work on using conditional formatting as a quick fix until I learn another program to format the cells based on their value and position related to neighboring cell values. I found something similar in ww.freecodecamp.org/news/how-to-make-your-own-procedural-dungeon-map-generator-using-the-random-walk-algorithm-e0085c8aa9a/ but it wasn't in VBA. I know this is a huge ask but any help would be greatly appreciated. Thank you