[Coco] Truchet Tile Maze Generator
Robert Gault
robert.gault at att.net
Thu Aug 3 15:53:38 EDT 2017
Andrew wrote:
> Some of you may have seen the one-liner maze generator for the Commodore 64. Today I tried to create
> something similar for the CoCo 2. Maybe this has been done before? I don't know. Anyhow, enjoy!
>
> https://github.com/andrew-ayers/color-computer/blob/master/TruchetTiles.md
>
Andrew,
I think you wanted your pattern to scroll up the screen and the maze continued to grow. Run my mod
to your very good program and see if it is what you wanted. :)
I'm assuming a disk system!
* Scroll most of the PMODE4 graphics screen and clear the last 8 lines by Robert Gault.
ORG $7000
START LDX #$F00
LDY #$E00
A@ LDD ,X++
STD ,Y++
CMPX #$2600
BLS A@
LEAY -2,Y
LDD #0
B@ STD ,Y++
CMPY #$2600
BNE B@
RTS
END START
10 PMODE 4:SCREEN 1:PCLS:CLEAR 256,&H7000:LOADM"SCROLL"
20 FOR Y=0 TO 191 STEP 8
30 FOR X=0 TO 255 STEP 8
40 T=(RND(2)-1)*7
50 LINE(X,Y+T)-(X+7,Y+7-T),PSET
60 NEXT
70 NEXT
80 REM GOTO 10 : FOLLOWING MOD BY ROBERT GAULT ON Andrew Ayers program
90 Y=Y-8
100 EXEC
110 FOR X=0 TO 255 STEP 8
120 T=(RND(2)-1)*7
130 LINE(X,Y+T)-(X+7,Y+7-T),PSET
140 NEXT
150 GOTO100
Robert
More information about the Coco
mailing list