
Part I. The basics: Your first random mazes: Preparing the grid; The binary tree algorithm; The sidewinder algorithm -- Automating and displaying your mazes: Introducing our basic grid; Displaying a maze on a terminal; Implementing the binary tree algorithm; Rendering a maze as an image -- Finding solutions: Dijkstra's algorithm; Implementing Dijkstra's; Finding the shortest path; Making challenging mazes; Coloring your mazes -- Avoiding bias with random walks: Understanding biases; The Aldous-Broder algorithm; Implementing Aldous-Broder; Wilson's algorithm; Implementing Wilson's algorithm -- Adding constraints to random walks: The hunt-and-kill algorithm; Implementing hunt-and-kill; Counting dead ends; The recursive backtracker algorithm; Implementing the recursive backtracker -- Part II. New steps: Fitting mazes to shapes: Introducing masking; Implementing a mask; ASCII masks; Image masks -- Going in circles: Understanding polar grids; Drawing polar grids; Adaptively subdividing the grid; Implementing a polar grid -- Exploring other grids: Implementing a hex grid; Displaying a hex grid; Making hexagon (sigma) mazes; Implementing a triangle grid; Displaying a triangle grid; Making triangle (delta) mazes -- Braiding and weaving your mazes: Braiding mazes; Cost versus distance; Implementing a cost-aware Dikstra's algorithm; Introducing weaves and insets; Generating weave mazes -- Part III.
I really like the book Mazes for Programmers by Jamis Buck [1].
Also, my open source Dungeon generator is a (slightly-misnamed) maze generator [2]. It produces 2D maps, and also 3D files (OBJ and MTL) for use in Blender etc. I like to think it does a more 'reasonable' job than many, but I am biased.
[0] http://mazesforprogrammers.com/, wonderful book by Jamis Buck
My personal favorite distinction is between the Recursive Backtracker (which creates long, winding corridors with few dead ends which is great for tower defense games) vs. Prim's Algorithm (which creates lots of short cul-de-sacs which is better for roguelikes). The bias of the algorithm dictates the feel of the game more than the graphics do.
> Aren't mazes supposed to have starting points and end points? […] honestly, […] it's entirely up to you. […] The maze […] is a perfect maze, and one of the attributes of a perfect maze is that there exists exactly one path between any two cells in it. […] You pick them, and there's guaranteed to be a path between them.
You do not need to choose an entrance or exit only on the sides, but you can also choose "Pacman-style" where the goal is to reach points inside the maze.
"Perfect" refers to the mathematical/logical properties of a maze (i.e. no loops), not the aesthetical aspect. I have not checked though if the mazes in the source here are all perfect.