Looking into:
maze generation - DFS
A* algorithm
genetic algorithm
minuet activity
After a lot of research, it seemed like prim's would be optimal for this.
Took me around 4.5 hours to make the basics, more to add stuff(see below), followed pseudo code from https://cantwell-tom.medium.com/prims-algorithm-as-a-maze-in-javascript-aec7415ad2cd but wanted to make the code myself. Click to generate maze using Prim's algorithm. Had to learn how to use sets.
In this one, red dots are points where all adjacent edges were already visited. This isn't every end point, but it's only end points, so it works if these are where treasure or monsters are.
Here is a version on a smaller scale, possibly for laser cutting, points with 3 or 4 adjacent edges are marked to generate more treasure spots. The black lines indicate where I could possible break this into pieces.
A problem is that DND maps are usually not pure mazes. Like sometimes you want bigger rooms. I made this maze generator before the one above. It does not work as well and I don't like how it looks compared to the other ones. It's more like one path that just goes to the closes point, but it does have cycles(they aren't really cycles in the algorithmic sense, they are just where the path overlaps) which you could interpret as bigger rooms. I made this by copying code from https://www.freecodecamp.org/news/prims-algorithm-explained-with-pseudocode/, and I had to learn how to use objects in java script, took me a while. I think I will go with the maze gerator above, I like the look better.
LITTLE MAZE GAME BELOW