Chapter 14Bending and Folding Your Mazes

It’s been a wild ride, but we’re nearly done. Maze algorithms, grids born of non-rectangular tesselations, circles, weaves, and braids, and even building those mazes out in three and four dimensions—it’s all brought us to this point.

Let’s go out with a bang. Let’s blow some minds.

Consider those mazes you’ve generated up to now, all of them neatly built on flat, predictable surfaces. Even the three-dimensional ones were composed of neatly planar levels. But what would happen if you were to take one of those mazes and bend it a bit, warping the surface so that it curves in one or more dimensions? What if you were to even go so far as to fold it?

Those first-person shooters take on an entirely different ...

Get Mazes for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.