Remarks: Ports to Other Platforms
From Maze
(Difference between revisions)
| Line 1: | Line 1: | ||
| − | Thanks to its simplicity of construction and of form, 10 PRINT is easy to appreciate as an aesthetic object. This experience takes place on several registers. To name a few: as a visual experience running on a Commodore 64, a line of computer source code, and as the relationship between those two. To appreciate 10 PRINT fully, a viewer must consider all of these registers and perhaps even more. | ||
| − | |||
| − | There's another way to reflect on 10 PRINT: by reimplementing it in different ways. The most obvious reimplementations take place on the C64, by changing the original program in modest or significant ways. But many other methods of variation and reimplementation are possible, including considering the way mazes work in other programs and recreating 10 PRINT on totally different platforms. At first blush such effort might seem like mere geekery, but a closer look shows that these variations can tell us much about the nature of the program. | ||
| − | |||
| − | === Commodore 64 Variations === | ||
| − | |||
| − | When a C64 user first keys in and runs 10 PRINT, he or she may soon wonder how the pattern might change if it used different character set instead of the slash characters. Whether through experimentation with different numeric values or by consulting a PETSCII table to find promising graphic characters, such changes are quite easy to accomplish. | ||
| − | |||
| − | It turns out that even small changes have a significant impact on the visual output, particularly on its status as a maze-like pattern. The output of 10 PRINT has a unique visual appeal, which we can understand in terms of design and composition (diagonal vs orthogonal), and in terms of how it plays against the contextual expectations of the historical period when it emerged (graphical software -- particularly video games of the era). | ||
| − | |||
| − | When we attempt to change even the smallest element of 10 PRINT, we make an interesting discovery -- 10 PRINT is a kind of optimal solution that is uniquely elegant in its design space (a c64 BASIC one-line maze generator). Any similar attempt is both less concise (requires more code) and less expressive (resembles a maze less). In fact, the concision of the code and the expressiveness of the image are tightly related, and arise out of a unique set of constraints and interactions, particularly the interaction between the desire to constrain the program code to a single line and the sequence of adjacent characters in the PETSCII table. | ||
| − | |||
| − | Because the original program is a concise randomized offset to a region of the PETCSII character table, let's consider only variations that embrace the same limitation. | ||
| − | |||
| − | ==== 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 "\" 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> | ||
| − | |||
| − | Though it's certainly not a maze, this version of the program imparts a three-dimensional impression, as if someone had woven bands of material over and under one another. | ||
| − | |||
| − | ==== 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", by contrast, turns 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> | ||
| − | |||
=== PATH: Maze as Program === | === PATH: Maze as Program === | ||
