Random demo
Random game
Random game
Short description
			
The goal is to get to the top-left corner of a randomly-generated maze. Once the goal is reached, the time taken to complete the maze is displayed, then the game restarts. At the beginning of the game, the player can choose either to have the maze stay on screen as it is explored, or to have only a small section of the maze displayed at one time. Link to description source
Maze! Maze! Maze! Maze! Maze! Maze! Maze! Maze! Maze!
Listing 1
0 REM S."D:​MAZE.TBS":​RUN
10 GRAPHICS 17:​SC=DPEEK(88):​FOR X=21 TO 37:​POKE SC+X,​3:​NEXT X:​FOR Y=2 TO 17:​MOVE SC+20,​SC+Y*20,​20:​NEXT Y:​ZZ=SC+42:​Z=ZZ:​OPEN #1,​4,​0,​"K:​"
20 _=-1:​T=20:​DIM D(4):​D(0)=_:​D(1)=-T:​D(2)=1:​D(3)=T:​RR=_:​? #6;"MAZE!  yn":​REPEAT:​GET #1,​N:​UNTIL N=78 OR N=89:​POKE 708,​0
25 POKE Z,​0:​G=1000:​IF N=89:​GG=128:​ENDIF:​POKE 559,​0:​CH=(PEEK(106)-16)*256:​POKE 756,​CH/256
30 REPEAT:​A=0:​OD=-1:​FOR I=0 TO 3:​A=A+(PEEK(Z+D(I)*2)=3):​NEXT I:​IF A=0 THEN RR=PEEK(Z)-128:​POKE Z,​0:​POKE Z-D(RR),​0:​Z=Z-D(RR)*2
35 UNTIL A<>0+(Z=ZZ):​IF Z<>ZZ OR RR=-1 THEN REPEAT:​R=RAND(4):​UNTIL PEEK(Z+D(R)*2)=3 AND R<>OD:​FOR I=0 TO 1:​Z=Z+D(R):​POKE Z,​128+R:​NEXT I:​GOTO 30
40 Z=SC+210:​MOVE ADR("UUUU"),​CH,​8:​MOVE ADR(""),​CH+24,​8:​POKE 710,​8:​POKE 559,​34:​TIME$= "000000"
50 FOR Y=_ TO 1:​FOR X=_ TO 1:​NZ=Z+Y*T+X:​POKE NZ,​PEEK(NZ)!64:​NEXT X:​NZ=Z-2+Y*T:​GOSUB G:​NZ=NZ+4:​GOSUB G:​NEXT Y:​FOR X=-2 TO 2:​NZ=Z-40+X:​GOSUB G
60 NZ=NZ+80:​GOSUB G:​NEXT X:​REPEAT:​S=STICK(0):​UNTIL S<15:​NZ=Z+D((S=14)+(S=7)*2+(S=13)*3):​IF PEEK(NZ)&63=0:​Z=NZ:​ENDIF:​GOTO 50+1000*(Z=ZZ)
1000 POKE NZ,​(PEEK(NZ)&191)!GG:​RETURN
1050 FOR A=0 TO 15:​FOR B=0 TO 15:​SOUND 0,​100+A*10,​10,​B:​POKE 708,​A*16+B:​POKE 712,​15-B:​NEXT B:​NEXT A:​GRAPHICS 18:​? #6;TIME$:​PAUSE 120:​RUN	

This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page, please contact me immediatelly so I can remove it!