Remarks: Ports to Other Platforms
From Maze
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
There are no other two characters in the 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.
10 PRINT CHR$(102+RND(1)*2); : GOTO 10
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
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
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.
10 PRINT CHR$(181+(INT(RND(1)+.5)*3)+(INT(RND(1)+.5))); : GOTO 10
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
(...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)
10 PRINT CHR$(181+(INT(RND(1)+.5)*3)); : GOTO 10
PATH: Maze as Program
While computer users may think of programming languages as relatively straightforward instruments used to produce increasingly complex or efficient tools and experiences, 10 Print shows that the code itself can have aesthetic features worthy of consideration on their own merit.
A small but lively group of programmers rejects the values of clarity and efficiency in programming, in favor of other code aesthetics. While some of these techniques rely on the exploitation of conventions in existing, "normal" programming languages, others involve the invention of entirely new languages with their own aesthetic properties. These "esoteric" or "weird" languages test the limits of programming language design and comment upon programming languages themselves.
Many weird languages comment on the practices of programming, but the sort Michael Mateas and Nick Montfort dub "minimalist" comment on the space of computation itself. As they put it, "Minimalist languages strive to achieve universality while providing the smallest number of language constructs possible. Such languages also often strive for syntactic minimalism, making the textual representation of programs minimal as well." The archetypical minimalist language is Brainfuck. It provides seven commands, each corresponding to a single character of punctuation.
Another style of weird language uses a two-dimensional space to hold a program's instructions, rather than the usual organization into lines of code. One such example is Piet, a language whose source code resembles abstract paintings (like those by its namesake, Piet Mondrian). Another is Befunge, which uses typographical symbols like <, v, and ^ to move program flow.
PATH is a weird language that borrows from the conventions of Brainfuck and Befunge, offering a syntactically constrained language whose control flow takes place in a two-dimensional space.
PATH has a natural connection to 10 Print because the language uses the / and \ characters for program flow. / and \ are reflectors. As the program counter travels around in 2D space, it bounces off the reflectors in the intuitive way. Here's a path program that computes nothing (but moves the PC around).
/ \
$ / /
Control starts at the dollar sign and flows to the right. It bounces off the first reflector and goes up, then bounces right, then down, then left then down (and at this point would flow off the edge, terminating the program).
In addition to / and \, PATH uses v ^ < > to move the flow conditionally, down, up, left and right, respectively, if the current memory location is non-zero. Memory locations are arrayed on an infinite tape Turing style, and you can increment and decrement the current memory focus.
Given PATH's strong typographical similarity to 10 Print, it's possible to implement a version of 10 Print in PATH--a program that generates labyrinths by endlessly walking a labyrinth. Here's what such a PATH program looks like:
10 print chr$(109+rnd(1)*2); : goto 10
$ \
/ /
\ + } } } } } + } } + } } + } + } + } + } } } + } + \
/ /
\ } +++++++++++++++++++++++++++++++++++++++++++++++ \
/ /
\ } ++++++++++++++++++++++++++++++ \
/ ++++++++++++++++++++++++++++++ /
\ ++++++++++++++++++++++++++++++++ \
/ {{{{{{{{{{{{{{{{{{ /
!
/ \
/ - { \ / - { \ / - { \ / - { \
\} } } } } } } v }^ { !/ !\ !/ { v }^ { !/ !\ !/ { v }^ { !/ !\ !/ { v }^ { !/ !\ !/ \
{ { { {
\ } ^ + { / \ } ^ + { / \ } ^ + { / \ } ^ + { /
/ /
/ - { \ / - { \ / - { \ / - { \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
And here's some of the output it produces when run:
\/////\////\//\\\\\/\/\\\\/\///\/\//\/\\\///\///\//\//\/\///\\//\/\\/\/\/\/\\/\\ ///\/\\\\\//\\///////\\/\\\/\//\///\\\\\\/////\\\/\/\//\\/\/\\////\\///\\/\////\ \\\///\\\//\\\\/\\\//\//\\//\\/\\/\\\\//\/\/\\\/\\\\\\\\/\\/\//\\\////\/\/\///// /\/\\//\\\/\\//\/////\////\//\\\\\/\/\\\\/\///\/\//\/\\\///\///\//\//\/\///\\//\ /\\/\/\/\/\\/\\///\/\\\\\//\\///////\\/\\\/\//\///\\\\\\/////\\\/\/\//\\/\/\\/// /\\///\\/\////\\\\///\\\//\\\\/\\\//\//\\//\\/\\/\\\\//\/\/\\\/\\\\\\\\/\\/\//\\ \////\/\/\//////\/\\//\\\/\\//\/////\////\//\\\\\/\/\\\\/\///\/\//\/\\\///\///\/ /\//\/\///\\//\/\\/\/\/\/\\/\\///\/\\\\\//\\///////\\/\\\/\//\///\\\\\\/////\\\/ \/\//\\/\/\\////\\///\\/\////\\\\///\\\//\\\\/\\\//\//\\//\\/\\/\\\\//\/\/\\\/\\ \\\\\\/\\/\//\\\////\/\/\//////\/\\//\\\/\\//\/////\////\//\\\\\/\/\\\\/\///\/\/ /\/\\\///\///\//\//\/\///\\//\/\\/\/\/\/\\/\\///\/\\\\\//\\///////\\/\\\/\//\/// \\\\\\/////\\\/\/\//\\/\/\\////\\///\\/\////\\\\///\\\//\\\\/\\\//\//\\//\\/\\/\ \\\//\/\/\\\/\\\\\\\\/\\/\//\\\////\/\/\//////\/\\//\\\/\\//\/////\////\//\\\\\/ \/\\\\/\///\/\//\/\\\///\///\//\//\/\///\\//\/\\/\/\/\/\\/\\///\/\\\\\//\\////// /\\/\\\/\//\///\\\\\\/////\\\/\/\//\\/\/\\////\\///\\/\////\\\\///\\\//\\\\/\\\/ /\//\\//\\/\\/\\\\//\/\/\\\/\\\\\\\\/\\/\//\\\////\/\/\//////\/\\//\\\/\\//\//// /\////\//\\\\\/\/\\\\/\///\/\//\/\\\///\///\//\//\/\///\\//\/\\/\/\/\/\\/\\///\/ \\\\\//\\///////\\/\\\/\//\///\\\\\\/////\\\/\/\//\\/\/\\////\\///\\/\////\\\\// /\\\//\\\\/\\\//\//\\//\\/\\/\\\\//\/\/\\\/\\\\\\\\/\\/\//\\\////\/\/\//////\/\\ //\\\/\\//\/////\////\//\\\\\/\/\\\\/\///\/\//\/\\\///\///\//\//\/\///\\//\/\\/\ /\/\/\\/\\///\/\\\\\//\\///////\\/\\\/\//\///\\\\\\/////\\\/\/\//\\/\/\\////\\//
Amusingly, the output of 10 Print is itself a PATH program, just one that only moves the program counter around, doing no other work.
Processing
10 Print produces an appealing visual effect. As such, it deserves the name "visual art." While computer artists have used code to make visual compositions for decades, since the turn of the millennium interest in computer-generated visual art has expanded rapidly within the digital art community. Some use widely-available commercial tools like Flash for this purpose, while others have built bespoke programming environments designed specifically for visual artists.
John Maeda's _Design by Numbers_ (2001) offers one example, but a far more popular and influential tool is Ben Fry and Casey Reas's Processing, which was inspired by Maeda's work and started within his research group at the MIT Media Lab. Processing is really just Java, with a specialized toolkit, program framework, and authoring environment laid atop. Among its goals, Processing seeks to introduce non-programmers to the practice of programming, but it also offers a set of very simple tools (such as mechanisms for drawing and coloring lines and shapes) for the creation of generative visual art.
That lineage in mind, implementing a version of 10 Print in Processing allows us to focus on its visual design in a way that might not be easy or even possible to do in a C64 program. In the Processing version of 10 Print depicted here, the program is created by drawing a left or right-facing diagonal line within a grid of enclosing squares.
[Need to add image of Casey's Processing implementation]http://mailman.mit.edu/mailman/private/10-print/attachments/20100505/92aa360e/Picture-1-0001.gif, http://reas.com/rnd/
Already that's a different way to think about the visual output of the program, since the C64 version simply outputs characters to the screen buffer, which wraps them in order to create the appearance of a maze. But Processing programs also tend to rely on code rather than assets to create their effects. That is, Processing is particularly adept at visual renderings produced entirely from geometric primitives fashioned in source code rather than from loading and manipulating image files (although it is certainly capable of the latter). When using such a technique, it is easy to make small variations on the appearance of individual elements in the output by changing the values of particular variables in the program.
The adaptation of 10 Print shown here offers several knobs that can be used to alter the appearance of the individual cells, among them thickness, randomness, and shape. Changing the shape used for individual cells from slashes to circles or lines results in the same sort of systemic visual changes seem in the Commodore 64 variations discussed above. However, changing the thickness or randomness of the pattern results in a totally different appearance, as shown below.
[Image of some variations]http://mailman.mit.edu/mailman/private/10-print/attachments/20100505/92aa360e/Picture-2-0001.gif, http://mailman.mit.edu/mailman/private/10-print/attachments/20100505/92aa360e/Picture-3-0001.gif
Generative art is characterized by the use of algorithms or self-automated processes to create some artistic result. From an author's perspective, the practice of creating generative art is less a matter of designing a fixed, singular outcome than in designing a machine capable of producing a variety of different outcomes. 10 Print is itself generative--it uses a set of instructions to create a visual effect. But as the C64 variants suggest, the manner of parametric variation possible on that platform, within a single line of BASIC code, are limited. The Processing variant of the program is not only many more lines of code, but also far more granular in its settings. When discussing generative aesthetics, it's common to think that more parametric variation is "better"--or at least more generative--than less variation.
That value in mind, the Processing program's results suggest a question: were one to create or discover 10 Print as a Processing program instead of a Commodore 64 one-liner, would the particular configuration of settings that correspond with the latter seem most natural or appealing? It's impossible to answer definitively, but the question does underscore how the constraints of the original program's authorship--a single line of code, the particularities of the PETSCII table, and so forth--contribute to the result partly by reducing its possible variations, rather than by increasing them.
Additional Images (what were these here for?)
Bibliography (not sure which of these are still in scope here)
Commodore 64 User's Guide. Wayne PA; Indianapolis, IN: Commodore Business Machines; Distributed by Howard W. Sams & Co., 1982. <http://www.commodore.ca/manuals/c64_users_guide/c64-users_guide.htm>.
Jerz, Dennis. "Somewhere Nearby is Colossal Cave: Examining Will Crowther's Original 'Adventure' in Code and in Kentucky." DHQ: Digital Humanities Quarterly 1.2 (2007). <http://digitalhumanities.org/dhq/vol/001/2/000009/000009.html>.
Krueger, Dan A., and Louis F. Sander. "Magic $93." Run Jul 1984. 13-14. <http://www.old-computer-mags.com/magazine/magazine_viewer_eng.php?idx=Run.htm&base=Run&num=007&page=13>.
Langway, Lynn. "Invasion of the Video Creatures." Newsweek 16 Nov 1981: 90+.
Latham, Aaron. "Video Games Star War." The New York Times 25 Oct 1981: 100+.
Mateas, Michael and Nick Montfort. "A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics." In Digital Arts and Culture: Digital Experience: Design, Aesthetics, Practice (DAC 2005), Copenhagen, Denmark, 2005.
Map of Twisty Little Passages All Alike Maze. TEXTFILES. <http://www.textfiles.com/adventure/mazmap.adv>.
Zork 1 - Maze Map. TEXTFILES. <http://www.textfiles.com/adventure/maze.zk1>.
