Create a maze with 1 line of C64 basic code


FBnil

There is 1 impostor among us.
Joined
Dec 14, 2012
Messages
3,503
Location
Yurp
This book is 4 years old, but still amazing (pun intended). How to make a maze in 1 line of code. The book has more than 300 pages and 10 authors...

http://10print.org/

This book takes a single line of code—the extremely concise BASIC program for the Commodore 64 inscribed in the title—and uses it as a lens through which to consider the phenomenon of creative computing and the way computer programs exist in culture.
The authors of this collaboratively written book treat code not as merely functional but as a text—in the case of 10 PRINT, a text that appeared in many different printed sources—that yields a story about its making, its purpose, its assumptions, and more.
They consider randomness and regularity in computing and art, the maze in culture, the popular BASIC programming language, and the highly influential Commodore 64 computer.

 
Last edited:

Fzero

Advanced Member
Joined
Mar 9, 2010
Messages
4,703
I like this from an art perspective too, and going to print that image ^ and put in a clip frame, along with my other ones of Speccy and Commodore loading screens
 

FlapJack

Active Member
Joined
Jul 8, 2016
Messages
222
Age
49
My respect, Sir. I'm an old 8-bit programmer from when I was a weee babe. I had an Atari 800 & my friends had Commodore 64's. We pushed the envelopes...those were good times.
 
  • Like
Reactions: rSl

FlapJack

Active Member
Joined
Jul 8, 2016
Messages
222
Age
49
It's not really a maze though, more of a labyrinth.
"many contemporary scholars and enthusiasts observe a distinction between the two. In this specialized usage maze refers to a complex branching multicursal puzzle with choices of path and direction, while a unicursal labyrinth has only a single path to the center. A labyrinth in this sense has an unambiguous route to the center and back and is not difficult to navigate"

I suppose that your distinction is the correct one.
[doublepost=1480683518,1480682560][/doublepost]That being said, I'd prefer to enter at the upper right top of the maze, (at around 1:00)...and then meander down towards the middle of the maze, then book it up towards the top left (at around 10:00) to escape...or vice versa.
 

_jr_

Advanced Member
Joined
May 5, 2013
Messages
1,170
I wouldn't call that a maze, though. And the first error is already in the introduction (concerning float conversion). I think I don't like that book.

edit: ninjaed concerning the maze observation

edit2: sorry, it's probably a good book, but somehow the writing rubs me the wrong way
 
Last edited:

hns

Well-Known Member
Joined
Dec 4, 2011
Messages
534
Location
Oberhaching
Slightly off-topic and in case you don't know, here is a three liner in pre-ANSI C:

Code:
int a[1817];main(z,p,q,r){for(p=80;q+p-80;p-=2*a[p])for(z=9;z--;)q=3&(r=time(0)
+r*57)/7,q=q?q-1?q-2?1-p%79?-1:0:p%79-77?1:0:p<1659?79:0:p>158?-79:0,q?!a[p+q*2
]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}
Proper attribution:

A maze generating program by Joseph H. Allen
http://www.iwriteiam.nl/SigProgC.html
 
Last edited:
Top