Variations on a maze

From Maze

(Difference between revisions)
Jump to: navigation, search
Line 6:Line 6:
One common feature of the many different maze games from the period is orientation: all both rectilinear and aligned to the Cartesian axes. Different examples have their own aesthetics -- Pac Man partitions the screen space into an open field a indirect routes, Maze Craze creates a traditional full-screen overview with a single solution, while Adventure produces a claustrophobic view in which only part of the impossibly wrapping maze topology is visible at any time -- usually nearby but inaccessible paths. What all have in common is that they are constructed of horizontal/vertical walls that are orthogonal to the edges of the screen and the scan line of the display.
One common feature of the many different maze games from the period is orientation: all both rectilinear and aligned to the Cartesian axes. Different examples have their own aesthetics -- Pac Man partitions the screen space into an open field a indirect routes, Maze Craze creates a traditional full-screen overview with a single solution, while Adventure produces a claustrophobic view in which only part of the impossibly wrapping maze topology is visible at any time -- usually nearby but inaccessible paths. What all have in common is that they are constructed of horizontal/vertical walls that are orthogonal to the edges of the screen and the scan line of the display.
−
=== Diagonals ===
+
== Diagonals ==
[[Image:10print-diagonal.png|200px|thumb|10 PRINT CHR$(109+RND(1)*2); : GOTO 10]]
[[Image:10print-diagonal.png|200px|thumb|10 PRINT CHR$(109+RND(1)*2); : GOTO 10]]
Line 14:Line 14:
Several things about this visual orientation are surprising. First, when we visually trace the maze the long runs or paths that lead through the maze do not follow the lines along which the algorithm constructs the maze (which remains left-right, top-bottom). Second, this feature of being diagnol is not an elaboration in the code, but instead an elegant simplification that is part of the essence of the succinct one-liner.
Several things about this visual orientation are surprising. First, when we visually trace the maze the long runs or paths that lead through the maze do not follow the lines along which the algorithm constructs the maze (which remains left-right, top-bottom). Second, this feature of being diagnol is not an elaboration in the code, but instead an elegant simplification that is part of the essence of the succinct one-liner.
−
=== Verticals as Weave ===
+
== Verticals as Weave ==
[[Image:10print-orthogonal-weave.png|200px|thumb|10 PRINT CHR$(102+RND(1)*2); : GOTO 10]]
[[Image:10print-orthogonal-weave.png|200px|thumb|10 PRINT CHR$(102+RND(1)*2); : GOTO 10]]
Line 20:Line 20:
There are no other two characters in the [http://en.wikipedia.org/wiki/PETSCII PETSCII] data set that, when substituted for our "\" and "/", will result in the construction of a traditional orthogonal maze. Vertical and horizontal bars, for example, result in a disconnected weave, while solid and empty squares result in rough static.
There are no other two characters in the [http://en.wikipedia.org/wiki/PETSCII PETSCII] data set that, when substituted for our "\" and "/", will result in the construction of a traditional orthogonal maze. Vertical and horizontal bars, for example, result in a disconnected weave, while solid and empty squares result in rough static.
−
=== Corners ===
+
== Corners ==
[[Image:10print-elbows.png|200px|thumb|10 PRINT CHR$(108+(INT(RND(1)+.5)*3)); : GOTO 10]]
[[Image:10print-elbows.png|200px|thumb|10 PRINT CHR$(108+(INT(RND(1)+.5)*3)); : GOTO 10]]
Line 28:Line 28:
As it turns out, diagonal mazes are symbolically efficient on a Cartesian grid due to the fact that four characters meet at the corners, whereas only two meet along an edge. Thus, intersections of up to four lines (the building blocks of a rectilinear maze) can be created at corners if we use diagonal lines.
As it turns out, diagonal mazes are symbolically efficient on a Cartesian grid due to the fact that four characters meet at the corners, whereas only two meet along an edge. Thus, intersections of up to four lines (the building blocks of a rectilinear maze) can be created at corners if we use diagonal lines.
−
=== Walls ===
+
== Walls ==
One of the most intuitive methods of constructing a maze-grid is to take an approach like graph paper, using four characters to signify either a top-wall, bottom-wall, left-wall or right-wall for each cell on the grid. Such characters exist in PETSCII in both "thick" and "thin" variants. Such a process is unfortunately less elegant, as these characters are never placed continuously in the PETSCII character set, and so cannot be addressed with a simple offset.
One of the most intuitive methods of constructing a maze-grid is to take an approach like graph paper, using four characters to signify either a top-wall, bottom-wall, left-wall or right-wall for each cell on the grid. Such characters exist in PETSCII in both "thick" and "thin" variants. Such a process is unfortunately less elegant, as these characters are never placed continuously in the PETSCII character set, and so cannot be addressed with a simple offset.

Revision as of 00:31, 29 July 2010

View this revision of Variations on a maze.

Personal tools