Mazes
From Maze
(Difference between revisions)
(→Mazes in Dance) | (moved Jeremy's content to the patterns section) | ||
| Line 550: | Line 550: | ||
Even here, however, we see how extremely different aesthetic of early isometric maze games was when compared to the ''10 Print'' output. While both have a dynamic diagonal orientation, the move from 2D design to volumetric pseudo-3D space leaves them, visually, worlds apart. | Even here, however, we see how extremely different aesthetic of early isometric maze games was when compared to the ''10 Print'' output. While both have a dynamic diagonal orientation, the move from 2D design to volumetric pseudo-3D space leaves them, visually, worlds apart. | ||
| − | == Patterns == | ||
| − | |||
| − | === Diagonals === | ||
| − | |||
| − | [[Image:10print-diagonal.png|160px|thumb|10 PRINT CHR$(109+RND(1)*2); : GOTO 10]] | ||
| − | |||
| − | By contrast, the maze output of 10 PRINT is oriented diagonally, giving it a distinctive visual look. | ||
| − | |||
| − | 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. | ||
| − | |||
| − | <blockquote>10 PRINT CHR$(109+RND(1)*2); : GOTO 10</blockquote> | ||
| − | |||
| − | === Orthogonal Weave === | ||
| − | |||
| − | [[Image:10print-orthogonal-weave.png|160px|thumb|10 PRINT CHR$(102+RND(1)*2); : GOTO 10]] | ||
| − | |||
| − | 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. | ||
| − | |||
| − | <blockquote>10 PRINT CHR$(102+RND(1)*2); : GOTO 10</blockquote> | ||
| − | |||
| − | (add note on 3d wicker visual interpretation) | ||
| − | |||
| − | === Corners === | ||
| − | |||
| − | [[Image:10print-elbows.png|160px|thumb|10 PRINT CHR$(108+(INT(RND(1)+.5)*3)); : GOTO 10]] | ||
| − | |||
| − | Randomly selecting corner pieces such as "L", on the other hand, simply turn the image into a honeycomb. | ||
| − | |||
| − | 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. | ||
| − | |||
| − | (Add note on including 1,2,3,4,5 etc. spaces in order to try to create a spaced offset -- note similarity to Gotcha etc.) | ||
| − | |||
| − | 10 PRINT " "CHR$(108+(INT(RND(1)+.5)*3)); : GOTO 10 | ||
| − | |||
| − | === Four Walls === | ||
| − | |||
| − | [[Image:10print-orthogonal-rough.png|160px|thumb|10 PRINT CHR$(181+(INT(RND(1)+.5)*3)+(INT(RND(1)+.5))); : GOTO 10]] | ||
| − | |||
| − | 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 can, of course, construct an orthogonal maze instead in a variety of other ways. One way is to address a set of four or more horizontal character elements a l. There are two styles of these characters (thick and thin) available in the Commodore 64 ASCII character set. However, these four character types never appear continuously in the table, so the elegant method of using a simple RND offset must be made a bit more verbose -- for example, selecting between 181, 182, 184 and 185 using two random offsets. | ||
| − | |||
| − | <blockquote>10 PRINT CHR$(181+(INT(RND(1)+.5)*3)+(INT(RND(1)+.5))); : GOTO 10</blockquote> | ||
| − | |||
| − | The image that emerges is indeed mazelike, but (like the code) lacks simplicity and elegance. potential redundancy between the top / bottom and left / right elements creates apparent variation in the thickness of the walls -- an interesting but potentially distracting implication of messiness and texture. | ||
| − | |||
| − | === Two Walls === | ||
| − | |||
| − | [[Image:10print-orthogonal.png|160px|thumb|10 PRINT CHR$(181+(INT(RND(1)+.5)*3)); : GOTO 10]] | ||
| − | |||
| − | <blockquote>(...discuss how 181/184 is the best approximation of the classic orthogonal game aesthetic, but it is still less elegant than 109/110 -- we have to carefully force the random result to an INT before introducing an offset multiplier, which adds length to the line, conceptual complexity to the demo, AND as a result we get a less visually interesting output -- that is, it is both less formally dynamic as a design and less contextually unexpected)</blockquote> | ||
| − | |||
| − | <blockquote>10 PRINT CHR$(181+(INT(RND(1)+.5)*3)); : GOTO 10</blockquote> | ||
| − | |||
| − | == See Also == | ||
| − | |||
| − | * [[10_Print_in_a_visual_context]] | ||
| − | * [[Visual_Essay]] | ||
| − | * [[Cultural_History_of_Mazes]] | ||
| − | |||
| − | == Notes == | ||
| − | Cross-reference the discussion of QWERTY / PETSCII with a small table of textures that indexes the variations, giving each a letter pair, index pair, a name, and a picture: | ||
| − | |||
| − | * FG (102/103) Weave | ||
| − | * JK (106/107) Waves ? | ||
| − | * NM (110/109) (reversed) Maze | ||
| − | * OP (111/112) Corners2 ? | ||
| − | |||
| − | How should the table be sorted? Probably by alphabetical / index, although it doesn't make sense to go through it in that order.... Table might also have two pictures -- one of the textured render, the other of the symbolic render (-32 shifted, so NM etc.) There is a hotkey in C64 BASIC to do this...? | ||
