Goblin

Developer(s): Ryan Gray
Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10051 – 10121.

Gallery

Goblin

Source Code

   0 REM  GOBLIN- ZX81 VERSION            ADAPTED BY RYAN GRAY
   1 LET HS=0
   2 LET SC=0
   3 RAND 
   5 POKE 16418,0
  10 FOR A=0 TO 23
  11 PRINT AT A,0;"% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % "
  12 NEXT A
  13 PRINT AT 18,15;"%*"
  20 FOR C=1 TO 60
  25 LET A=INT (RND*726)+17859
  26 IF PEEK A=118 OR A=18435 OR A=18402 THEN GOTO 25
  30 POKE A,8
  31 NEXT C
  32 FOR C=1 TO 25
  35 LET A=INT (RND*726)+17859
  36 IF PEEK A<>128 OR A=18435 THEN GOTO 35
  40 POKE A,180
  50 NEXT C
  97 LET N=0
  98 LET POS=18435
  99 PRINT AT 23,15;"%H%I%G%H% %S%C%O%R%E%=";HS
 100 PRINT AT 0,10;"G% O% B% L% I% N"
 101 PRINT AT 23,1;"%S%C%O%R%E%=";SC
 102 POKE POS,151
 103 LET D$=INKEY$
 105 LET D=(D$="8")-(D$="5")
 106 LET OLD=POS
1000 LET POS=POS-33+D
1001 IF PEEK POS=118 THEN LET POS=POS-1
1002 IF POS<17859 THEN LET POS=POS+726
1004 IF PEEK POS=8 THEN GOTO 2000
1005 IF PEEK POS=180 THEN GOTO 3000
1006 POKE OLD,128
1007 GOTO 102
2000 POKE OLD,128
2001 FOR X=1 TO 8
2002 POKE POS,151
2003 POKE POS,23
2004 NEXT X
2005 GOTO 9000
3000 POKE OLD,128
3001 POKE POS,151
3002 POKE POS,23
3003 LET SC=SC+5
3004 LET N=N+1
3005 IF N=25 THEN GOTO 5
3006 GOTO 101
9000 PRINT AT 10,7;"%A%N%O%T%H%E%R% %G%A%M%E%?% %(%Y%/%N%)"
9001 IF SC>HS THEN LET HS=SC
9002 PRINT AT 23,15;"%H%I%G%H% %S%C%O%R%E%=";HS
9003 FOR Q=1 TO 10
9004 NEXT Q
9005 IF INKEY$="" THEN GOTO 9003
9006 IF INKEY$="Y" THEN GOTO 2
9010 SAVE "1009%9"
9020 RUN 
Scroll to Top