Hello, everyone! Welcome to another blog of mine, and it will be about maze generation. So, our target is to create a maze, and in this case, a perfect maze. Perfect maze is a maze, that always has just one way to get from point A, B. This also means the maze will contain no loops, closed off locations, etc. This also requires us to generate the pathways, instead of the walls, because it guarantees that there won't be closed off locations. So, the most popular maze generation alrogithm is propably depth-first search algorithm, which works simply by first storing the history in a stack-like structure(or runnin recursively), and its Position as a 2D vector, and then for each instance, we generate the available points next to the position(so left, right, up and down), and determine which have been visited(and eliminating those), and which are out of bounds(and eleminating those aswell), and then we are eighter left with empty array, in which case we return 1 point back in history(or return in recursive mode), or go to random point on the array. The maze generation ends in the point that we try to go back, and the history is empty. Such implementation could look something like: stack history; Point position; while(true) { possible = generateUpDownLeftRight(position); if(possible.empty() && history.empty()) break; history.push(position); move, etc. } There are obviously hundreds of other maze generation algorithms, and some(including this one) work in 3D, 4D etc. Conclusion is, the maze generation is fairly easy to implement, aswell as with fun results, and is possible to generate mazes with even very low computing resources preety easily, and even a few KHz clock could generate instant mazes! Here is my video about generating a maze, that I uploaded on youtube: https://youtu.be/JAOEGe1oVGU