Advertisement
plirof2

ZX Basic small programs v01h-added time calc

Dec 17th, 2021 (edited)
3,930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ZXBasic 34.50 KB | None | 0 0
  1. NOTE TO copy in BASIN :
  2. There may be a bug in the official version of BASin, but in the one I'm using (release 14) they paste just fine, with only one small effort required on the part of the user... When pasting, the "Add Code" window will appear, and some of these one-liners will be split over many lines (this is in part due to the way the windows clipboard works, and partly due to the CODE tags used in the webpage you copied from).
  3.  
  4. **IF you position your cursor AT the END of the first line AND press "DEL", the NEXT line will be concatenated TO the first. Repeat UNTIL the lines are all merged properly.**
  5.  
  6. ________________________
  7. Sources : https://worldofspectrum.org/forums/discussion/52743/
  8. _________________________
  9. 1  REM zig-zag game
  10. 10 LET x=5
  11. 20 FOR a=1 TO 9
  12. 30 RESTORE USR 3282
  13. 40 LET x=x-2*(INKEY$<>"")*(x>2)+(x<29)
  14. 50 PRINT AT 10,x;":"
  15. 60 NEXT a
  16. 70 PRINT AT 20,29-x;"| |"
  17. 80 GO TO 20
  18. ___________________________
  19. 1 REM Travelling Name
  20. 5 INPUT "ENTER YOUR NAME(S) :";b$
  21. 10 LET A$=" HELLO "+b$+"! YOU ARE THE BEST!!!! "
  22. 20 LET A$=A$(2 TO )+A$(1)
  23. 30 PRINT AT 10,1;A$(1 TO 30)
  24. 40 GOTO 20
  25. ___________________________
  26. 1 REM bubble run (Ski clone)
  27. 10 LET B=0
  28. 20 PRINT AT 0,B;"*"
  29. 30 LET B=B+(INKEY$="6")-(INKEY$="7")
  30. 40 POKE 23692,255
  31. 50 LET X=RND*30: PRINT AT 20,X;"O"
  32. 60 PRINT AT 21,0: PRINT '
  33. 80 GO TO 20
  34. ___________________________
  35. 1 REM bubble run (2lines)
  36. 10 LET B=0
  37. 20 PRINT AT 0,B;"*": LET B=B+(INKEY$="7")-(INKEY$="6"): POKE 23692,0: PRINT AT 20,RND*30;"O"''': IF  SCREEN$ (0,B)<>"O" THEN GO TO 20
  38. _____________________
  39. 1 REM bubble run (Ski clone) WITH if for class
  40. 10 LET B=0
  41. 20 PRINT AT 0,B;"*"
  42. 30 LET B=B+(INKEY$="7")-(INKEY$="6")
  43. 40 POKE 23692,0
  44. 50 PRINT AT 20,RND*30;"O"'''
  45. 60 IF SCREEN$(0,B)<>"O" THEN GO TO 20
  46. 70 REM ********* IGNORE NEXT LINES***
  47. 80 REM 30 IF (INKEY$="7") THEN LET B=B+1
  48. 80 REM 32 IF (INKEY$="6") THEN LET B=B-1
  49.  
  50. ___________________________
  51. ___________________________
  52. ___________________________
  53. ---------------------------------------------
  54.  
  55. 1 REM Arrow (Ski clone(ripped from a BASIC code in WOS )v01
  56. 10 LET B=0: LET d=0
  57. 15 CLS
  58. 20 PRINT AT 0,B;"O"
  59. 30 LET B=B+(INKEY$="6")-(INKEY$="7")
  60. 40 POKE 23692,255: REM stop scroll message
  61. 50 LET X=RND*30: PRINT AT 20,X; INK RND*6;"^"
  62. 60 PRINT AT 21,0: PRINT '
  63. 70 IF  SCREEN$ (0,B)="^" THEN LET d=d+1: PRINT INVERSE 1;"HIT ";d;" TIMES"; INVERSE 0
  64. 80 GO TO 20
  65.  
  66. ---------------------
  67.  
  68. ___________________________
  69. 9998 REM BASIC 1liner 20xx -City Bomber (AS single line STOPs when crash) Digital prawn https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  70. 1 READ i,j:
  71.  FOR f=0 TO 39:
  72.  READ d:
  73.  POKE USR "a"+f,d:
  74.  NEXT f:
  75.  BORDER 5:
  76.  POKE 23693,41:
  77.  CLS :
  78.  FOR m=1 TO 99:
  79.  FOR a=10 TO 27:
  80.  FOR b=-9 TO -RND*8:
  81.  PRINT INK 2*(b>-9);AT 12-b,a;CHR$ (144+b/17);AT 11-b,a;CHR$ 145:
  82.  NEXT b:
  83.  NEXT a:
  84.  FOR y=1 TO 20:
  85.  FOR x=1 TO 25+4*(y<20):
  86.  LET j=(j+1)*(j>0)*(j<21)+(INKEY$>"")*(j=0)*y:
  87.  LET i=i+(x+1-i)*(j=0):
  88.  LET c=ATTR (y,x+3)>41:
  89.  PRINT AT j-(j>0),i;" ";AT j,i;CHR$ 148 AND (j>0)*(j<21);AT y,x;" "; FLASH c;CHR$ 146;CHR$ 147:
  90.  BEEP .01+c,d-j-f*c:
  91.  IF c=0 THEN NEXT x:
  92.  PRINT AT y,28,: NEXT y:
  93.  PRINT INK 0;m;" landed":
  94.  BEEP .5,14:
  95.  BEEP .5,16:
  96.  BEEP .5,18:
  97.  NEXT m:
  98.  DATA 0,0,-1,159,d,d,-1,243,d,-1,0,24,60,126,-1,243,d,-1,0,48,120,124,127,d,63,0,0,0,0,0,-4,-2,-4,0,0,60,24,d,60,d,d,24
  99. ___________________________
  100.  
  101. 10 REM City Bomber ok Seems to work (BUG JONmulti-line ver when crash -single line is better) Digital prawn
  102. 11 REM http://reptonix.awardspace.co.uk/sinclair/oneliners/
  103. 20 READ i,j:
  104. 30 FOR f=0 TO 39:
  105. 40 READ d:
  106. 50 POKE USR "a"+f,d:
  107. 60 NEXT f:
  108. 70 BORDER 5:
  109. 80 POKE 23693,41:
  110. 90 CLS :
  111. 100 FOR m=1 TO 99:
  112. 110 FOR a=10 TO 27:
  113. 120 FOR b=-9 TO -RND*8:
  114. 130 PRINT INK 2*(b>-9);AT 12-b,a;CHR$ (144+b/17);AT 11-b,a;CHR$ 145:
  115. 140 NEXT b:
  116. 150 NEXT a:
  117. 160 FOR y=1 TO 20:
  118. 170 FOR x=1 TO 25+4*(y<20):
  119. 180 LET j=(j+1)*(j>0)*(j<21)+(INKEY$>"")*(j=0)*y:
  120. 190 LET i=i+(x+1-i)*(j=0):
  121. 200 LET c=ATTR (y,(x+3))>41:
  122. 210 PRINT AT j-(j>0),i;" ";AT j,i;CHR$ 148 AND (j>0)*(j<21);AT y,x;" "; FLASH c;CHR$ 146;CHR$ 147:
  123. 220 BEEP .01+c,d-j-f*c:
  124. 230 IF c=0 THEN NEXT x:
  125. 240 PRINT AT y,28,: NEXT y:
  126. 250 PRINT INK 0;m;" landed":
  127. 260 BEEP .5,14: BEEP .5,16: BEEP .5,18:
  128. 270 NEXT m:
  129. 280 DATA 0,0,-1,159,d,d,-1,243,d,-1,0,24,60,126,-1,243,d,-1,0,48,120,124,127,d,63,0,0,0,0,0,-4,-2,-4,0,0,60,24,d,60,d,d,24
  130. ____________
  131. 1 REM (Based on Bubble run a BASIC program from WOS forum) v03
  132. 10 LET B=0: LET d=0: PAPER 7
  133. 13 REM paper 2
  134. 15 CLS : PRINT "--AVOID TREES--"': PRINT "By Firelord Quality Games Ltd"'"Game created to celebrate the "'"60th entry of the CSSCGC2021 "'"(for the second time)!"
  135. 16 PRINT '"Santa has found You!!! You were skiing. "'"He sends small colorful "'"Christmas Trees on your way!"
  136. 17 PRINT "If you pass over a tree it will hit your private parts!"'"You must avoid them(unless you  don't want to have any children)!!!": PRINT "Whenever we have a direct hit you will see a 'direct hit' counter -if you are lucky you will NOT see that counter!"'" Keys left:1 ,right:0 - Enjoy": PAUSE 0: CLS
  137. 20 PRINT AT 0,B-1; FLASH 1; INK 4;"|o|"; FLASH 0
  138. 30 LET B=B+(INKEY$="1")-(INKEY$="0")
  139. 39 REM stop scroll message
  140. 40 POKE 23692,255
  141. 50 LET X=RND*30: PRINT AT 20,X; INK RND*6;"^"
  142. 60 PRINT AT 21,0: PRINT '
  143. 70 IF  SCREEN$ (0,B)="^" THEN LET d=d+1: PRINT INVERSE 1;"OUCH# ";d;"!!!"; INVERSE 0
  144. 80 GO TO 20
  145.  
  146.  
  147.  
  148. ___________________________
  149. 9998 REM https://bunsen.itch.io/10miglia-by-marcos-retrobits PROBLEM
  150. 1 LET M=23693: LET H=0: PRINT "Steer: 'z' or 'x'","Any key: select track": PAUSE 0: LET D= CODE INKEY$: LET B$=" ": RANDOMIZE D
  151. 2 LET E$="{90}": LET F$="{91}": RESTORE 10: FOR I=0 TO 15: READ A: POKE 65368+I,A: NEXT I: BORDER 4: POKE M,34: CLS : READ A$: LET R=11: LET X=R+2
  152. 3 FOR I=21 TO 0 STEP -1: GO SUB 9: BEEP .2*(I=0)+.1*(INT (I/6)=I/6),20+5*(I=0): NEXT I: LET I=21: LET B=0: LET P=0: LET S=0
  153. 4 POKE M,62: PRINT AT 0,X;B$;AT 1,X;B$: POKE M,34: LET K$=INKEY$: LET A=USR 3582: GO SUB 9: LET A=RND: LET X=X+(K$="x")-(K$="z")
  154. 5 LET Z=PEEK (22560+X): POKE M,58: PRINT AT 0,X;E$;AT 1,X;F$: LET R=R+(R<20)*RND-(R>2)*A: LET A=A*10
  155. 6 IF A<6 THEN POKE M,56+B: LET C=INT (R+1+A): IF C<>P THEN LET P=C: PRINT AT 20,C;E$;AT 21,C;F$
  156. 7 IF Z<>62 THEN LET H=(H>S)*H+(H<=S)*S: PRINT #1;A$;S;" HIGH:";H: BORDER 2: BEEP .5,-15: RANDOMIZE D: PAUSE 0: GO TO 2
  157. 8 LET S=S+1: LET B=(B=0): GO TO 4: REM MARCO V. 2021 MARCO'S RETROBITS https://retrobits.itch.io
  158. 9 POKE M,87: PRINT AT I,R;"{86}";: POKE M,62: PRINT "   .   ";: POKE M,87: PRINT "{89}"
  159. 10 RETURN : DATA 60,126,231,195,255,126,126,126,66,66,231,255,255,126,90,60,"CRASH! SCORE:"
  160.  
  161.  
  162. ___________________________
  163. 9998 REM ROM-Run for Oktogonia by victor https://bunsen.itch.io/rom-run-for-oktogonia-by-victor
  164. Controls : A,D
  165. 1 DATA 1,-21,18,16,"!",2,0.01,"?",4: LET L=1: LET W=224: DIM H(21): POKE 23562,0
  166. 2 RESTORE : READ I,A,C,P,M$,E,T: PAPER 0: INK L: BORDER 0: CLS : POKE 23692,0
  167. 3 LET C=ABS (C+SGN (PEEK (L*985+A)-92)): LET H(I)=C+3: LET I=1+(I AND I<21)
  168. 4 LET K=ABS ( CODE INKEY$-98): IF K<3 THEN LET P=P+K*2-3: POKE 23692,0: OUT 254,0
  169. 5 PRINT AT 21,0;"oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO",AT 20,C;"Oo   ": OUT 254,16
  170. 6 PRINT INK 7;AT 0,P;"V": REM \#169 victor\@oktogonia.com (https://www.oktogonia.com)
  171. 7 LET A=A+1: IF A=W THEN LET L=L+1: LET W=128+L*96: READ M$,E: GO TO 9
  172. 8 IF A<0 OR ABS (P-H(I))<=1 THEN GO TO 3: DATA 99,1," OO SAVED OKTOGONIA OO"
  173. 9 PRINT #1;AT 0,13-L/9;M$;" (";A;")": BORDER E: IF L=5 THEN READ L,T,M$: GO TO 9
  174. 10 FOR N=0 TO (E-3)*E*4 STEP E-3: BEEP T,24+N: BEEP T,30+N: NEXT N: GO TO 2+T*9
  175.  
  176.  
  177.  
  178. ___________________________
  179.  
  180. ___________________________
  181.  
  182.  
  183. ___________________________
  184.  
  185. ___________________________
  186.  
  187.  
  188. ___________________________
  189.  
  190. ___________________________
  191. ___________________________
  192.  
  193.  
  194. ___________________________
  195.  
  196. ___________________________
  197. 9998 REM 08SIMON.tap BASIC 10liner 2016
  198. 1 INPUT "Speed? ";F: LET S=0
  199. 2 CLS : LET A=(RND*23)+65: PRINT "Press ";CHR$ A;"   Score:";S
  200. 3 PAUSE F: GO SUB 6: IF V=1 THEN LET S=S+1: LET T=3: GO SUB 5: GO TO 2
  201.  
  202. 4 LET T=-3: GO SUB 5: GO TO 1
  203. 5 FOR N=0 TO 7: BORDER N: BEEP 0.02,N*T: NEXT N: RETURN
  204. 6 IF INKEY$=CHR$ A THEN LET V=1: RETURN
  205. 7 IF INKEY$=CHR$ (A+32) THEN LET V=1: RETURN
  206. 8 LET V=0: RETURN
  207.  
  208. ___________________________
  209. 9998 REM 23_10othello.tap BASIC 10liner 2016
  210. 1 CLEAR : DIM t(91): INPUT "Players (1-2)?";f: RESTORE : READ n,t(41),t(42),t(50),t(51),t(1),z,p,z$
  211.  
  212. 2 LET p=3-p: LET q=z>1: DIM c(3): FOR a=1 TO 8: FOR b=1 TO 8: LET k=t(a*9+b+1): PRINT AT 18,3*b+2;b
  213. 3 PRINT AT a+a,2;a; PAPER k+p*p*(a*9+b+1=z);AT a+a,3*b+1;"/  ";AT a+a+1,3*b+1;"___"
  214. 4 LET c(k+1)=c(k+1)+1: NEXT b: NEXT a: PRINT ''" BLUE ";c(2);"x";c(3);" RED",: BORDER p
  215. 5 LET e=c(1)*c(p+1)>0: INPUT ': IF e*f>=p THEN INPUT "Row (0-8)? ";a'"Col (0-8)? ";b
  216. 6 FOR i=1 TO 62*e: LET z= CODE z$(i)-32+(a*9+b)*(a*b>0)*(b<9)
  217. 7 BEEP .01,i: FOR j=0 TO 9*(t(z)=0)-1: LET d=j+INT (j/3)*6-10: LET w=z+d
  218. 8 POKE n-2,8: IF t(w)=3-p THEN LET w=w+d: POKE (t(w)<>p)*n,1: LET w=w-d: LET t(w)=p: POKE (w<>z)*n,4
  219. 9 NEXT j: GO TO 2+(8*(i*q<62)-5*(z>1=i))*(t(z)*j=0): DATA 23620,2,1,1,2,3,2,2
  220. 10 NEXT i: BORDER 7: DATA "!2j+qX=0-ol_D?ZB]HT\\\@[QAKOF/.nmVMYPG>^ULC9876fedcka4,ph;1:bg5!"
  221.  
  222. ___________________________
  223. 1 REM jumper-10liner.tzx BASIC 10liner 2017
  224.  
  225. 10 CLEAR : PRINT AT 10,2;"Boulder Jumper, by \@kevinhooke": PRINT AT 12,10;"b = you": PRINT AT 14,10;"O = rock"
  226.  
  227. 20 PRINT AT 16,10;"M = to jump": INPUT "Press a key when ready!",a$
  228. 30 CLEAR : LET lives=3: LET score=0: LET jump=0: PRINT AT 2,10;"b"
  229. 40 FOR i=30 TO 1 STEP -1: PRINT AT 2,i;"O": PRINT AT 2,i+1;" ": LET a$=INKEY$: IF i=1 THEN PRINT AT 2,1;" "
  230. 50 PRINT AT 0,0;"Lives: ": PRINT AT 0,6;lives: PRINT AT 0,15;"Score: ": PRINT AT 0,22;score: IF jump=0 THEN PRINT AT 2,10;"b"
  231. 60 IF jump=0 AND i=10 THEN PRINT AT 1,10;"ouch!": LET lives=lives-1: BEEP 1,-2: PRINT AT 1,10;"     ": PRINT AT 2,10;"b"
  232. 70 IF lives=0 THEN PRINT AT 1,15;"Game Over!": BEEP 2,-4: INPUT "PRESS A KEY";a$: GO TO 10
  233. 80 IF jump>0 THEN LET jump=jump-1: IF jump=0 THEN PRINT AT 2,10;"b": PRINT AT 1,10;" "
  234. 90 IF a$="m" THEN PRINT AT 1,10;"b": PRINT AT 2,10;" ": LET jump=7: LET score=score+10: BEEP 0.1,4
  235. 100 NEXT i: GO TO 40
  236. ___________________________
  237. 9998 REM BASIC 10liner 2019 - 10LineCarV2.tap
  238. 5 REM BASIC 10liner 2019 - 10LineCarV2.tap -keys O,P,A
  239. 10 CLEAR : RANDOMIZE : LET rec=0: LET z$="Drive all afternoon 'till       sundown avoiding spikes.        Faster you drive=more points    you win, but be careful not     to burn your engine!"
  240. 20 RESTORE 1: BORDER 6: PAPER 5: BRIGHT 1: CLS : PRINT FLASH 1;"LIFE IS A ROAD AND ALL THAT SHIT";AT 21,0; FLASH 0;"O\#201P                     A=break";AT 6,2; INVERSE 0;z$: FOR a=USR "a" TO USR "d"+7: READ b: POKE a,b: NEXT a: PAUSE 0: CLS : DATA 1,1,61,66,129,188,119,60,128,160,32,222,1,61,246,60,137,82,76,36,36,36,36,36,92,162,69,149,163,86,169,195
  241. 30 PRINT AT 14,0; PAPER 4;"\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d"; PAPER 2;"\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c"; PAPER 4,, PAPER 7; BRIGHT 0,,,,,, PAPER 4,,"0Mph         - VEL +      110Mph": PAPER 8: LET y=18: LET x=1: LET oy=17: LET ox=0: LET sol=0: LET punt=0
  242. 40 LET ey=17+2*(INT (RND*2))-(INT (RND*1)): LET ex=30
  243. 50 BEEP .01,-13: LET punt=punt+x: IF punt-x>rec THEN LET rec=punt
  244. 60 PRINT BRIGHT 0;AT 21,x-1; PAPER 1+2*(x>15)-1*(x>22); OVER 1;" "; PAPER 4;" ": PRINT #0;AT 1,0;punt;"   ": LET sol=sol+.05: LET ex=ex-1: PRINT BRIGHT 0; INK 1;AT 18, ex-1;" * ";AT ey,ex-1;" * ": IF sol>30 THEN PRINT INVERSE 1;AT 9,9;"TIME OVER!"; INVERSE 0;" ";punt: FOR z=0 TO 333: NEXT z: GO TO 20
  245. 70 IF ex<0 THEN PRINT BRIGHT 0;AT 18,ex;"   ";AT ey,ex;"   ": GO TO 40
  246. 80 LET y=18+(INKEY$="p")-(INKEY$="o"): LET x=x-2*(INKEY$="a")*(x>0): IF oy<>y OR ox<>x THEN PRINT AT oy,ox; BRIGHT 0;;"  ";AT y,x;"\a\b";AT 1,sol; PAPER 5; BRIGHT 1;" "; PAPER 6;" ": LET oy=y: LET ox=x: LET x=x+1: BEEP .0015,x*2: IF x=30 THEN PRINT AT 21,26; PAPER 1; INK 2; FLASH 1;"BANG!!": BEEP 1,-33: LET x=0: LET punt=0: PRINT BRIGHT 0;AT 18,ex;" ";AT ey,ex;" ": PRINT PAPER 4;AT 21,0; OVER 1; BRIGHT 0,,AT 21,26; OVER 0;"110Mph": GO TO 40
  247. 90 IF (ey=y OR y=18) AND (ex=x+1 OR ex=x) THEN PRINT INVERSE 1; FLASH 1;AT 8,15;":(";AT 10,4; FLASH 0;" Punt=";punt;" Record=";rec: FOR z=0 TO 333: NEXT z: GO TO 20
  248. 100 GO TO 50: REM azimov2019
  249.  
  250. ___________________________
  251. 9998 REM BASIC oneliner 20xx - 10miglia car
  252. 1 LET M=23693: LET H=0: PRINT "Steer: 'z' or 'x'","Any key: select track": PAUSE 0: LET D= CODE INKEY$: LET B$=" ": RANDOMIZE D
  253. 2 LET E$="\a": LET F$="\b": RESTORE 10: FOR I=0 TO 15: READ A: POKE 65368+I,A: NEXT I: BORDER 4: POKE M,34: CLS : READ A$: LET R=11: LET X=R+2
  254. 3 FOR I=21 TO 0  STEP -1: GO SUB 9: BEEP .2*(I=0)+.1*(INT (I/6)=I/6),20+5*(I=0): NEXT I: LET I=21: LET B=0: LET P=0: LET S=0
  255. 4 POKE M,62: PRINT AT 0,X;B$;AT 1,X;B$: POKE M,34: LET K$=INKEY$: LET A=USR 3582: GO SUB 9: LET A=RND: LET X=X+(K$="x")-(K$="z")
  256. 5 LET Z=PEEK (22560+X): POKE M,58: PRINT AT 0,X;E$;AT 1,X;F$: LET R=R+(R<20)*RND-(R>2)*A: LET A=A*10
  257.  
  258. 6 IF A<6  THEN POKE M,56+B: LET C=INT (R+1+A): IF C<>P  THEN LET P=C: PRINT AT 20,C;E$;AT 21,C;F$
  259. 7 IF Z<>62  THEN LET H=(H>S)*H+(H<=S)*S: PRINT #1;A$;S;" HIGH:";H: BORDER 2: BEEP .5,-15: RANDOMIZE D: PAUSE 0: GO TO 2
  260. 8 LET S=S+1: LET B=(B=0): GO TO 4: REM MARCO V. 2021 MARCO'S RETROBITS https://retrobits.itch.io
  261. 9 POKE M,87: PRINT AT I,R;"\'.";: POKE M,62: PRINT "   .   ";: POKE M,87: PRINT "\.'"
  262. 10 RETURN : DATA 60,126,231,195,255,126,126,126,66,66,231,255,255,126,90,60,"CRASH! SCORE:"
  263.  
  264. ___________________________
  265. 9998 REM BASIC 10liner 20xx - AI
  266. 1 BEEP .4,5: BEEP .3,1: BEEP .5,4: BEEP .8,4: BEEP .4,5
  267. 7 LET A=INT (2000*RND): INK 2: PAPER 6: BORDER 4: PRINT "Hello my Name is Clive the father of Sinclair Spectrum, what is your name?(Try first with name Sinclair)": INPUT A$
  268. 30 IF A$="Sinclair" THEN PRINT "The same as my Surname the Spectrum inventor!!! Would you like i draw a wheel?": INPUT B$
  269. 40 IF A$<>"Sinclair" THEN PRINT "i like your name, would you like to play a game with me?": GO TO 61
  270. 50 IF B$="yes" THEN CLS : CIRCLE INK 4;220,150,20: CLS : GO TO 1
  271. 60 IF B$="no" THEN PRINT "ok see you again": GO TO 1
  272. 61 INPUT C$: IF C$="yes" THEN PRINT "Play with Clive Guess a number from 1 to 2000": INPUT D
  273. 71 IF C$="no" THEN PRINT "ok see you later": GO TO 1
  274. 73 LET A=INT (2000*RND): PRINT "Your number is": PRINT D: PRINT "Computer number is": PRINT A: IF D=A THEN PRINT "You win!!!": GO TO 1
  275. 76 IF D<>A THEN PRINT "You lose": GO TO 1: IF C$="no" THEN PRINT "ok see you later": GO TO 1
  276. _____________________________________
  277.  
  278. ___________________________
  279. 9998 REM BASIC 10liner 20xx -BAD DAY BEING A MICROBE
  280. 1 LET r=0: BRIGHT 1: LET z$="\'.\'.\'.\'.\'."
  281. 2 BORDER 3: PAPER 0: CLS : PRINT INK 7;AT 1,5;"BAD DAY BEING A MICROBE";AT 10,11; OVER 1;"Re"+CHR$ 8+"'cord:";r: LET l=0: PAUSE 0
  282.  
  283. 3 BORDER 3: CLS : LET t=333-(l*10): LET y=10: LET x=2: LET oy=0: LET ox=0: FOR z=0 TO 21: PRINT AT RND*21,6+(RND*21); INK 6;".";AT z,31; INK 4;"\::": NEXT z: FOR z=0 TO l*2: PRINT AT RND*21,6+RND*21; INK 7;".": NEXT z: PRINT PAPER 4; INK 7;AT 8,31;"G";AT 10,31;"O";AT 12,31;"A";AT 14,31;"L"
  284. 4 LET t=t-1: IF x=29 THEN BORDER 4: BEEP 1,11: LET l=l+1: GO TO 3
  285. 5 PRINT #0;AT 1,0;l;AT 1,28+(t<100)+(t<10);" ";t: IF ATTR (y,x)>66 OR ATTR (y-2,x)>69 OR ATTR (y+2,x)>69 OR ATTR (y,x-2)>69 OR ATTR (y,x+2)>69 OR t=0 THEN FOR z=y-2 TO y+2: PRINT PAPER 6; INK 2; FLASH 1;AT z,x-2;z$: NEXT z: BORDER 2: BEEP 1,-33: GO TO 2
  286. 6 PRINT AT y,x; INK 2;"\::"; INK 5;AT oy,ox-2;"\::";AT oy,ox+2;"\::";AT oy-2,ox;"\::";AT oy+2,ox;"\::": LET y=y+(INKEY$="a")*(y<19)-(INKEY$="q")*(y>2): LET x=x+(INKEY$="p")*(x<29)-(INKEY$="o")*(x>2): PRINT AT oy,ox;"\::";AT oy,ox-2; INK 0;"\::";AT oy,ox+2;"\::";AT oy-2,ox;"\::";AT oy+2,ox;"\::": IF oy<>y OR ox<>x THEN BEEP .01,11: IF l>r THEN LET r=l
  287. 7 LET oy=y: LET ox=x: GO TO 4
  288.  
  289. ___________________________
  290. 9998 REM BASIC 10liner 20xx - ballgame.tap
  291. 10 BORDER 6: CLS : LET s=0: LET x=RND*31: LET b=INT (x*28/31): LET y=RND*21
  292. 20 LET u=2*(RND-.5): LET v=2*(RND-.5): PRINT AT RND*21,RND*31; INK 4;"*";#1;AT 1,0;s;
  293. 30 LET m=(INKEY$="p" AND b<28)-(INKEY$="o" AND b>0)
  294. 40 PRINT #1;AT 0,b-(m<0);" " AND m>0;"\.:\::\::\:.";" " AND m<0;: LET b=b+m
  295. 50 IF (u<0 AND x<0.5) OR (u>0 AND x>30.5) THEN LET u=-u
  296. 60 IF v<0 AND y<0.5 THEN LET v=-v
  297. 70 IF y<20.5 OR v<0 THEN GO TO 100
  298. 80 LET d=x-b-1.5: LET u=u+.2*d+.3*m: LET v=-v*(2-ABS d)-.4
  299. 90 LET r=1/(ABS u+ABS v): LET u=r*u: LET v=r*v: IF ABS d>2 THEN RUN
  300. 100 PRINT AT y,x;" ";: LET x=x+u: LET y=y+v: LET h=ATTR (y,x)=60: PRINT AT y,x;"\*";: LET s=s+h: GO TO 30-10*h
  301.  
  302. ___________________________
  303. 9998 REM BASIC 10liner 20xx - Bolalela 3.tap
  304. 1 BORDER 1: PAPER 0: CLS : PAPER 7: LET e=0: LET d=1: LET c=0: LET x=1: BRIGHT 1
  305. 2 LET y=2: LET t=27: FOR n=2 TO 20: PRINT AT n,1,,: GO SUB 3: NEXT n: GO TO 5
  306. 3 PRINT AT y,x;"|";AT 0,15;c;AT n,31; BRIGHT 0;"\::";AT n,2+RND*t; INK n/4;"\''\''"
  307. 4 PRINT AT n,1+RND*t; PAPER 6;"\*";AT n,2+RND*t; FLASH 1; INK 2;"\'.": RETURN
  308.  
  309. 5 LET w=x: LET q=y: LET x=x+(INKEY$="p")-(INKEY$="o"): IF e=6 THEN LET d=1
  310. 6 LET e=e+1: LET n=2+RND*18: IF ATTR (y,x)<65 THEN LET x=w: BEEP .005,-10
  311. 7 LET y=y+d: IF ATTR (y,x) <65 THEN LET d=1-(d=1)*2: LET y=q: LET e=0: BEEP .008,1
  312. 8 LET s=ATTR (y,x): IF s=112 THEN LET c=c+21-y: BEEP .008,15: GO SUB 3
  313. 9 PRINT AT q,w;" ";AT y,x; OVER 1;"\*";AT y,x;">": IF s<128 THEN GO TO 5
  314. 10 PRINT AT y,x;"X": BEEP 1,-20: CLS : PRINT AT 9,11;"Score ";c: PAUSE 99: RUN
  315.  
  316. ___________________________
  317.  
  318.  
  319. ___________________________
  320. 9998 REM BASIC oneliner 20xx -Penguins move!_v2.tap (LOAD from TAP NOT copy/paste) --https://worldofspectrum.org/forums/discussion/comment/955998
  321. 3 READ r,y,x,p$: BORDER 5: POKE 23693,58: CLS : DIM q(5,2): FOR s=1 TO 5: LET q(s,1)=8: LET q(s,2)=9+s: NEXT s: FOR c=1 TO 3: LET k=PEEK 23560-99: PRINT AT y,x;" ": LET x=x+(x<30)*(k=4)-(x>1)*(k=3): LET y=y+(y<20)*(k=1)-(y>2)*(k=2): LET t=58-ATTR (y,x): LET r=r+(t=2): LET c=c-(t>-3): PRINT AT y,x;"\{p2b1i0}""";AT 0,0;"""\{b0p5i0}x";3-c,r;"x\{i0}\`";p$;"n",: LET i=2.5*RND-1.5: LET j=RND*2.5-1.5: LET s=s-1+5*(s=1): LET o=ATTR (q(s,1)+i,q(s,2)+j)=58: BEEP .1,7*t: PRINT AT q(s,1),q(s,2);" " AND o;AT y,x;"\{b1p2i0}H"+p$+"M": LET q(s,1)=q(s,1)+i*o: LET q(s,2)=q(s,2)+j*o: PRINT AT q(s,1),q(s,2);"\{i0}\`"+p$+"n" AND o: PRINT AT y+i,x+j;"\:.\.:\:'\':\.:"(s)+p$+"\{p7i5}*" AND ATTR (y+i,x+j)=58: BEEP .1,4: PAUSE 25: NEXT c: DATA 0,16,y,CHR$ 8+CHR$ 21+CHR$ 1
  322. ___________________________
  323.  
  324. 9998 REM BASIC 1liner 20xx -Guess the number Oneliner contest https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  325. 10 REM BASIC 1liner 20xx -Guess the number Oneliner contest
  326. 20 LET X = INT (RND*1000)+1:
  327. 30 FOR N=1 TO 1000:
  328. 40 INPUT "GUESS NUMBER ";G:
  329. 50 PRINT "ROUND=";N;TAB 10;"GUESS=";G,"HIGHER " AND G<X;"LOWER" AND G>X;"RIGHT" AND G=X:
  330. 60 IF G<>X THEN NEXT N
  331. 70 PRINT "YOU WON" : PAUSE 0:CLS: GO TO 1
  332. ___________________________
  333. 9998 REM BASIC 1liner 20xx -Space Ski v01-Matt_B UDG!! https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  334. 10 FOR f=USR "a" TO USR "b"+7:
  335. 20 READ a: POKE f,a:
  336. 30 NEXT f:
  337. 40 LET score=0: BORDER 0: PAPER 0: INK 6: CLS : LET x=15:
  338. 50 FOR f=1 TO 1000:
  339. 60 PRINT AT 0,x;CHR$ 144: PRINT AT 21,INT (RND*32); INK 2;CHR$ 145: LET score=score+1: LET f=USR 3282:
  340. 70 LET x=x+(INKEY$="0")-(INKEY$="1"): LET x=x+(x<0)-(x>31): LET f=1000*(ATTR (0,x)<>6):
  341. 80 NEXT f:
  342. 90 PRINT AT 0,0;"SCORE=";score:
  343. 100 DATA 36,255,255,126,126,60,60,24,60,94,253,247,191,251,118,60
  344.  
  345. _____________________________________________________________
  346. 9998 REM BASIC 1liner 20xx -Space Ski v02  -Matt_B UDG https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  347. 10 FOR f=65368 TO 65431: READ a: POKE f,a: NEXT f:
  348. 20 LET s=0: BORDER 0: PAPER 0: INK 7: CLS : LET x=15:
  349. 30 FOR f=0 TO 1:
  350. 40 PRINT AT 0,x; INK 6;CHR$ 144:
  351. 50 FOR g=0 TO s/99:
  352. 60 PRINT AT 21,RND*31; BRIGHT 1; INK 7-g;CHR$ (145+g):
  353. 70 NEXT g:
  354. 80 LET s=s+USR 3282-800:
  355. 90 LET x=x+(INKEY$="0" AND x<31)-(INKEY$="1" AND x>0):
  356. 100 LET f=ATTR (0,x)<>7:
  357. 110 NEXT f:
  358. 120 PRINT AT 0,0;"Score=";s: INPUT "Press Enter", LINE a$: RUN :
  359. 130 DATA 36,255,255,126,126,60,60,24,60,94,253,247,191,251,118,60,6,31,59,111,125,174,252,112
  360. 140 DATA 0,66,189,231,231,189,66,0,0,195,60,126,126,60,195,0,24,60,90,255,255,90,60,24,14,17
  361. 150 DATA 24,60,60,24,136,112,60,60,60,126,90,90,219,153
  362.  
  363. ___________________________
  364. 9998 REM XX BASIC 1liner 20xx -Snake Bloodbaz EXPERT XXX https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  365. 5 REM Snake Bloodbaz - keys:QAOP
  366. 10 LET x=16: LET y=10: LET u=1: LET v=0: LET sc=0:
  367. 20 BORDER 1: CLS : PAPER 1: PRINT AT 0,0;"Score:",,:
  368. 30 FOR n=1 TO 1000:
  369. 40 PRINT AT 0,8;sc;" ";AT y,x; PAPER 2;" ": LET i$=INKEY$:
  370. 50 LET r=(i$="p" AND x<31)-(i$="o"): LET s=(i$="a" AND y<21)-(i$="q"):
  371. 60 LET u=((u AND NOT r)+(r AND r) AND s=0): LET v=((v AND NOT s)+(s AND s) AND r=0):
  372. 70 LET x=x+u: LET y=y+v: LET sc=sc+1: LET n=2000*(x<0 OR x>31 OR y<0 OR y>21 OR ATTR (y,x)<>56):
  373. 80 NEXT n:
  374. 90 PAPER 7: PRINT AT 1,0; PAPER 8;"You is dead!"'"Snake by Chris Walsh (BloodBaz)"
  375. ___________________________
  376. 9998 REM BASIC 1liner 20xx -SKI V+* https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  377. 1 PAPER 0: BORDER 0: INK 7: CLS :
  378. INPUT "Speed 1 (faster) / 10 (slower)? ";l:
  379. DIM u(85): LET x=15: PRINT AT 11,10;"Get ready!!":
  380. FOR f=21 TO 85: LET u(f)=11+INT (RND*8): NEXT f:
  381. CLS : FOR g=1 TO 3: POKE 23692,255: FOR f=21 TO 85: LET b=u(f-20):
  382. PRINT AT 21,u(f);"*": PRINT : PRINT AT 0,x;" v ": PRINT : FOR h=1 TO l: NEXT h:
  383. LET a$=INKEY$: LET x=x-(a$="o" AND x>10)+(a$="p" AND x<17):
  384. IF b<>x+1 THEN NEXT f: NEXT g
  385. ___________________________
  386. 9998 REM BASIC 1liner 20xx -Breakout v02 Copy TO BASIN -Matt_B UDG (use DEL TO copy -see first line in pastebin) https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  387. 10 REM Breakout v02 keys:1,0 Copy to BASIN -Matt_B UDG
  388. 20 FOR f=65368 TO 65391: READ a: POKE f,a: NEXT f:
  389. 30 BORDER 0: PAPER 0: INK 7: CLS :
  390. 40 LET s=1:
  391. 50 FOR f=1 TO 7:
  392. 60 FOR g=1 TO 30:
  393. 70 PRINT AT f,g; BRIGHT 1; INK f;CHR$ (145+s):
  394. 80 LET s=NOT s: NEXT g: LET s=NOT s:
  395. 90 NEXT f:
  396. 100 LET x=9: LET y=1: LET p=9: LET a=1: LET b=1:
  397. 110 FOR f=0 TO 1:
  398. 120 PRINT AT x,y;"  ": LET x=x+a: LET y=y+b: LET t=(ATTR (x,y)<>7):
  399. 130 PRINT AT x,y;CHR$ 144;AT 21,p;" _____ ": LET a=a*-(2*t-1): LET s=s+t: LET f=(x=21 AND (y<p+1 OR y>p+5)):
  400. 140 LET p=p+(INKEY$="0" AND p<25)-(INKEY$="1" AND p>0):
  401. 150 LET b=b+2*(y=1)-2*(y=30): LET a=a+2*(x=0)-2*(x=21):
  402. 160 NEXT f:
  403. 170 PRINT AT 0,0;"Score=";s: INPUT "Press enter", LINE a$: RUN :
  404. 180 DATA 60,126,255,255,255,255,126,60,0,254,254,254,254,254,254,0,0,127,127,127,127,127,127,0
  405.  
  406. ___________________________
  407. 9998 REM BASIC 1liner 20xx -https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  408. *********
  409. https://worldofspectrum.org/forums/discussion/16019/oneliner-contest/p7
  410. ***************************************
  411.  
  412. ___________________________
  413. 9998 REM BASIC 1liner 20xx -Space invaders DigitalPrawn keys:Q-P-M  https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  414. 1 LET n=191: DIM i$(4,9): FOR g=2 TO 4: LET i$(g-1)=" # # # # ": NEXT g:
  415.  LET b=0: LET p=16: LET a=p: LET s=0: FOR y=0 TO 13:
  416.  LET e=y/2=INT (y/2): FOR x=(1-e)*24 TO e*24 STEP e*2-1: FOR i=1 TO 3:
  417.  PRINT AT y-1+2*i,x;i$(4);AT y+2*i,x;i$(i): NEXT i:
  418.  LET z=(b>y)*(b<y+7)*(a>x)*(a<x+9):
  419.  LET k=(z=0)+z*(b-y)/2: LET l=(z=0)+z*(1+a-x): LET h=i$(k,l)>" ":
  420.  PRINT AT b+1,a;" ";AT b,a;"| "(1+(b=0));AT h*b,a;" ";AT g-1,x+3;"   ";AT g,x+4;"| "(1+(g=21));AT 20,p-1;" ^ ";: POKE 23620,22+8*(g=20)*(p=x+4):
  421.  LET i$(k,l)=" ": LET s=s+h:
  422.  LET p=p-(IN 64510<n)*(p>1)+(IN 57342<n)*(p<30):
  423.  LET b=(1-h)*(b+19*(IN 32766<n)*(b=0)-1*(b>0)):
  424.  LET a=a*(b<19)+p*(b=19): LET g=1+g*(g<21)+(g=21)*(y+4): NEXT x:
  425.  NEXT y: PRINT "SC=";s
  426.  
  427. ___________________________
  428. 9998 REM BASIC 1liner 20xx -https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  429. 10 REM keys z,m - Ski/Space clone no checks
  430. 20 BORDER 1: PAPER 0: INK 7: CLS :
  431. 30 LET h=15: LET s=0: POKE 23692,-1:
  432. 40 FOR t=1 TO 1000:
  433. 50 PRINT AT 21,RND*31;"*";AT 21,RND*31;"*";AT 21,RND*31;"*";AT 21,RND*31;"*"'':
  434. 60 LET h=h+(INKEY$="m" AND h<31)-(INKEY$="z" AND h>0):
  435. 70 IF SCREEN$ (0,h)<>"*" THEN PRINT INK 4;AT 0,h;"V": BEEP .001,20:
  436. 80 LET s=s+1:
  437. 90 NEXT t
  438. ___________________________
  439. 9998 REM BASIC 1liner 20xx -Meteroids (Ski) https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  440. 10 REM Meteroids (Ski)  keys z,m https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  441. 20 BORDER 1: PAPER 0: INK 7: CLS :
  442. 30 LET h=15: LET s=0: POKE 23692,-1:
  443. 40 FOR t=1 TO RND*1000:
  444. 50 PRINT AT 21,RND*31;"*";AT 21,RND*31;"*";AT 21,RND*31;"*";AT 21,RND*31;"*"'':
  445. 60 LET h=h+(INKEY$="m" AND h<31)-(INKEY$="z" AND h>0):
  446. 70 IF SCREEN$ (0,h)<>"*" THEN PRINT INK 4;AT 0,h;"V": BEEP .001,20:
  447. 80 LET s=s+1:
  448. 90 NEXT t:
  449. 100 PRINT INVERSE 1; FLASH 1; INK 4;AT 0,h;"V":
  450. 110 PRINT AT 1,1;"Congratulations! You survived!": PRINT AT 2,1;"Meteoroids: ";s*4
  451. ___________________________
  452.  
  453.  
  454.  
  455. ___________________________
  456. 9998 REM BASIC 1liner 20xx -tiny pacman **  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  457.  
  458. 1 BORDER 0: POKE 23693,1: CLS : DIM p(10): FOR l=0 TO 4: RESTORE : READ w,s,m$,m$: FOR t=1 TO 10: LET p(t)=85-9*t: PRINT AT t,0;m$(t*w-11 TO t*w): NEXT t: LET m$(p(1)+1)="": LET k=113- CODE INKEY$: FOR a=1 TO l+2: LET g=p(a): LET i=4*RND-2: LET i=(a=1)*((k=1)-(k=2)+w*((k=16)-(k=0)))+SGN i*(1+11*(i*i<1))*(g<>p(1)): LET c= CODE m$(g+i+1)-45: LET p(a)=g+i*(c<2)-i*(m$(g-i+1)<"O")*(c>1)*(a>1): PRINT AT g/w+.5,g-w*INT (g/w);m$(g+1);AT w,0;l*58+s;AT p(a)/w+.5,p(a)-w*INT (p(a)/w); INK 7-a*(t<1);"c\@\@\@\@\@"(a): LET t=t-1+(c=-9*a)*(37-t): LET s=s+(a=c): IF a=1 OR p(a)-p(1) OR t>0 THEN NEXT a: POKE (s<56)*23620,w: NEXT l: DATA 12,1,"OOOOOOOOOOOOO...O......OO.O..OO.OO.OO.OO...$.O.OO....OO....",m$+m$(w TO )+m$
  459.  
  460.  
  461.  
  462. ___________________________
  463. 9998 REM BASIC 1liner 20xx -tiny pacman 2 Strikes back** Keys:5-9  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  464.  
  465. 1 BORDER 0:
  466.  POKE 23693,1:
  467.  CLS :
  468.  DIM p(10):
  469.  FOR l=0 TO 4:
  470.  RESTORE :
  471.  READ w,s,m$,m$:
  472.  FOR a=1 TO 10:
  473.  LET p(a)=85-9*a:
  474.  PRINT AT a,0;m$(a*w-11 TO a*w):
  475.  NEXT a:
  476.  LET m$(p(1)+1)="":
  477.  LET k=CODE INKEY$-48:
  478.  FOR a=1 TO l+2:
  479.  LET g=p(a):
  480.  LET i=8*RND-4:
  481.  LET i=(a=1)*((k=7)-(k=6)+w*((k=8)-(k=9)))+SGN (ABS i-2+SGN (p(1)-g))*(1+11*(i>0))*(g<>p(1)):
  482.  LET c=CODE m$(g+i+1)-45:
  483.  LET p(a)=g+i*(c<2)-i*(m$(g-i+1)<"O")*(c>1)*(a>1):
  484.  PRINT AT g/w+.5,g-w*INT (g/w);m$(g+1);AT w,0;l*58+s;AT p(a)/w+.5,p(a)-w*INT (p(a)/w); INK 7-a;"c@@@@@"(a):
  485.  LET s=s+(a=c):
  486.  BEEP (a=1)/99,c/2+l*4:
  487.  IF a=1 OR p(a)-p(1) THEN NEXT a:
  488.  POKE (s<58)*23620,w:
  489.  NEXT l:
  490.  DATA 12,1,"OOOOOOOOOOOOO...O......OO.O..OO.OO.OO.OO.....O.OO....OO....",m$+m$(w TO )+m$
  491. ___________________________
  492. 9998 REM BASIC 1liner 20xx -space invaders  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  493. 1 READ t,b,p,a,s,e,n:
  494. BORDER 0:
  495. POKE 23693,7:
  496. CLS :
  497. DIM i$(3,9):
  498. FOR g=1 TO 3:
  499. LET i$(g)=" # # # #":
  500. NEXT g:
  501. FOR y=0 TO 13:
  502. LET e=24-e:
  503. FOR x=24-e TO e STEP e/12-1:
  504. FOR i=1 TO 3:
  505. PRINT AT y-1+2*i,x,AT y+2*i,x;i$(i):
  506. NEXT i:
  507. LET z=(b>y)*(b<y+7)*(a>x)*(a<x+9):
  508. LET k=1+z*(b-y-2)/2:
  509. LET l=1+z*(a-x):
  510. LET h=i$(k,l)>" ":
  511. PRINT AT g-1,x+3;"   ";AT g,x+4;"|";AT 21,0;s,,AT b+1,a;" ";AT b,a;"| "(1+h+(b=0));AT 20,p-1;" ^ ":
  512. IF x+3-p+g/20 THEN LET i$(k,l)="":
  513. LET s=s+h:
  514. LET p=p-(IN 64510<n)*(p>1)+(IN 57342<n)*(p<30):
  515. LET b=(1-h)*(b+19*(IN 32766<n)*(b=0)-(b>0)):
  516. LET a=a+(p-a)*(b=19):
  517. LET g=1+g+(g=21)*(y+4-g):
  518. BEEP .01,y+t:
  519. LET t=1-t:
  520. NEXT x:
  521. NEXT y:
  522. POKE 23620,32-30*(s/12=INT (s/12)):
  523. DATA 0,0,16,p,0,0,191
  524. ___________________________
  525. 9998 REM BASIC 1liner 20xx -tiny pacman 3 returnof pacman**  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  526.  
  527. 1 DIM p(10):
  528.  LET b=0:
  529.  FOR l=0 TO 4:
  530.  RESTORE :
  531.  READ w,s,m$,m$:
  532.  FOR f=1 TO 10:
  533.  LET p(f)=85-9*f:
  534.  PRINT AT f,0;m$(f*w-11 TO f*w):
  535.  NEXT f:
  536.  LET m$(p(1)+1)="":
  537.  LET k=CODE INKEY$-48:
  538.  FOR a=1 TO l+2:
  539.  LET g=p(a):
  540.  LET u=g=28*(f>50):
  541.  LET b=b+(a=u):
  542.  LET f=f+1-1e9*u:
  543.  LET i=8*RND-4:
  544.  LET i=(a=1)*((k=7)-(k=6)+w*((k=8)-(k=9)))+SGN (ABS i-2+SGN (p(1)-g))*(1+11*(i>0))*(g<>p(1)):
  545.  LET c=CODE m$(g+i+1)-45:
  546.  LET p(a)=g+i*(c<2):
  547.  PRINT AT g/w+.5,g-w*INT (g/w);m$(g+1);AT w,0;s+l*58+b*2;AT 3,4; INK a;"£" AND f>50;AT p(a)/w+.5,p(a)-w*INT (p(a)/w);"c@@@@@"(a):
  548.  LET s=s+(a=c):
  549.  IF a=1 OR p(a)-p(1) THEN NEXT a:
  550.  POKE (s<58)*23620,10:
  551.  NEXT l:
  552.  DATA 12,0,"OOOOOOOOOOOOO..........OO..O OO.O..OO.O......O.OO...OOOO...",m$+m$(w TO )+m$
  553. ___________________________
  554. 9998 REM BASIC 1liner 20xx -tCHECK FOR MORE  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  555.  
  556.  
  557.  
  558. ___________________________
  559. 9998 REM BASIC 1liner 20xx -A-Maze SLOW**  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  560. 1 DIM m(862): READ n,p,z,q,g: FOR g=g-1 TO g: LET p=p-z: LET m(p)=1: POKE 22496+p,9: NEXT g: LET z=68- CODE "d$CE"(RND*3+1): LET j=p/32-z/16: POKE (m(p-z-z)<(j>1)*(j<23)*(j>INT j))*n,3: LET p=64*INT (RND*11)+2*INT (RND*15)+66: POKE (g<165)*n,11-3*m(p): POKE n+53,0: FOR p=32 TO 767: POKE 22496+p,9*m(p)+9*(p=q): NEXT p: LET k= CODE INKEY$: LET d=(k=55)-(k=54)+32*((k=56)-(k=57)): POKE (d=0)*n,17-3*(k=48): LET q=q+d*m(q+d): LET t=50-PEEK 23673: CLS : IF q<>671 THEN PRINT #0;t: LET k=k*(k<48)+5-4*m(q+(k=8)-(k=20)+32*((k=2)-(k=14))): DRAW 4* CODE "W[OXOJaPUPKPPEQHQV?PKPUPPIzIWPIW&WIP"(k)-320,4* CODE "WPKPUPP[OXOJaPUPKPPEQHQV?IPWIzIWPIW&"(k)-320: POKE n,17+8*((t>0)*k<36): DATA 23620,672,1,130,0*USR 7766
  561. ___________________________
  562. 9998 REM BASIC 1liner 20xx -CaveAdventure  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  563. 1 READ r,k,c,s,v: PRINT '"You are in a ";"cavehallpit lake"(r*4-3 TO r*4): INPUT u$: LET n=0: LET f=0: FOR i=1 TO LEN u$: LET v= CODE u$(1)-96: LET n=n+ CODE u$(i)*(f>n): LET f=f+(u$(i)=" "): NEXT i: LET m=(v=14)*((r=1)+(r=3))-(v=19)*((r=2)+(r=4))+(v=5)*(r=2)-(v=23)*(r=3): LET a=r*(v=12)*(n=0)+(6-4*k-s)*(v=9)+(r=2)*(13-s)*(v=11)+(r=3)*(((1+5*s+c)*(v=12)+9*c*(1-k)*(v=15))*(n=99)+10*(c=0)*s*(v=7)*(n=115))+(r=4)*((1+4*k)*(v=12)*(n=99)+8*(v=7)*(n=107)*k)+11*ABS m: LET r=r+m: LET k=k-(a=8): LET c=c-(a=9): LET s=s-(a=10): PRINT ">";u$'"Can't doNothing A dragonA chest A corpseA key   A sword Closed  Taken   Opened  Taken   You walkYou diedYou won!"(a*8+1 TO a*8+8): POKE (a<12)*23620,2: DATA 1,1,1,1,0
  564.  
  565.  
  566.  
  567. ___________________________
  568. 9998 REM BASIC 1liner 20xx -tiny pacman 2 Strikes back**  digital prawn http://reptonix.awardspace.co.uk/sinclair/oneliners/ --https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  569.  
  570.  
  571. ___________________________
  572. 9998 REM BASIC 1liner 20xx -https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  573.  
  574. ___________________________
  575. 9998 REM BASIC 1liner 20xx -labyrin3d Digital prawn  keys 6,7,9 https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  576. 1 CLS :
  577.  DIM m(3e3):
  578.  LET m(INT (RND*5)*2+1430)=USR 7766^0:
  579.  FOR r=1 TO 31:
  580.  FOR s=1 TO 23:
  581.  READ p,z,j,i,w,m(i+i-z*(1<r>r/16)),m(i+i+(s<11)),m(i+i):
  582.  POKE 22496+s*32+r,15*m(i)+(i=p):
  583.  RESTORE :
  584.  NEXT s:
  585.  NEXT r:
  586.  LET k=CODE INKEY$:
  587.  POKE ((s<175)*k<1)*23620,11:
  588.  READ u,u,u,u,u,u,u,u,u,z,j,p,c,d,q:
  589.  BEEP .1,p/46:
  590.  CLS :
  591.  PRINT ,174-s;#1,"NEWS"(2+j/46+(j>0)):
  592.  LET o=m(q):
  593.  LET a=c:
  594.  LET c=(d+d+a)*o-a:
  595.  LET d=INT (d-.3*o*d):
  596.  FOR e=-.5 TO 1:
  597.  LET w=INT (.35*a-d)*(m(q-e*2*j)<o):
  598.  PLOT 128+a*e,88-d-w:
  599.  DRAW (c-a)*e,w:
  600.  DRAW 0,d+d:
  601.  DRAW (a-c)*e,w:
  602.  NEXT e:
  603.  LET q=q+z:
  604.  POKE (p+z<i)*23620,8+9*o*(q<i)*(c>1):
  605.  DATA 110,46,1,r*z+s,RND,w*(r>2)<.7,w>.3,1,(k=54)-(k=55),z+u*(j-z*u),z*(2117*(z*z=1)-1)/46,p+(k=57)*z*m(p+z),250,114,p
  606.  
  607. ___________________________
  608. 9998 REM BASIC 1liner 20xx -CaveAdventure Digital prawn https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  609.  
  610. ___________________________
  611. 9998 REM BASIC 1liner 20xx -CaveAdventure Digital prawn https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  612.  
  613. ___________________________
  614. 9998 REM BASIC 1liner 20xx -CaveAdventure Digital prawn https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  615.  
  616.  
  617.  
  618.  
  619. ___________________________
  620. 0 REM BASIC oneliner 2008 - race
  621.  
  622. 1 BORDER 0: PAPER 0: INK 5: CLS : READ o$,n,a,c,m: FOR t=1 TO 20: LET o=INT (RND*3-1): INK 7: PRINT AT 10,0,,: INK 5: FOR d=0 TO 4: PRINT AT 11,c-1;" ^ ^ ";AT m,0,,AT 21,0;"t";t,: LET m=m+d: PRINT AT m,15+m*o;o$(1 TO d+(d=0)): LET c=c-(IN 64510<n)*(c>2)+(IN 57342<n)*(c<23): LET a=a-(a>-1)+2*(IN 32766<n)-(a>8): FOR q=1 TO 9-a: NEXT q: NEXT d: LET m=0: LET t=INT (t+a/5-1-3*((ATTR (10,c)<6)+(ATTR (10,c+3)<6)+(ATTR (10,c+6)<6))): LET t=t*(t>0): NEXT t: PAPER 7: INK 0: BORDER 7: CLS : PRINT "You made it!": DATA "____",191,0,11,0
  623.  
  624.  
  625. ___________________________
  626. 0 REM BASIC oneliner 20xx -
  627. ___________________________
  628. 0 REM BASIC oneliner 20xx -
  629.  
  630. ___________________________
  631. 0 REM BASIC oneliner 20xx -
  632. ___________________________
  633. 5 REM -----GENERATE GRAPHICS---- (keys:1,0)
  634. 10 FOR f=USR "a" TO USR "b"+7
  635. 20 READ a: POKE f,a:
  636. 30 NEXT f:
  637. 35 REM -----Main Game-------
  638. 40 LET score=0: BORDER 0: PAPER 0: INK 6: CLS : LET x=15:
  639. 50 FOR f=1 TO 1000:
  640. 60 PRINT AT 0,x;CHR$ 144: PRINT AT 21,INT (RND*32); INK 2;CHR$ 145: LET score=score+1: LET f=USR 3282:
  641. 65 REM SET keys AND move player
  642. 70 LET x=x+(INKEY$="0")-(INKEY$="1"): LET x=x+(x<0)-(x>31): LET f=1000*(ATTR (0,x)<>6):
  643. 80 NEXT f:
  644. 90 PRINT AT 0,0;"SCORE=";score
  645. 3000 REM ----8x8 Graphics - Draw it on paper!----
  646. 3160 REM UDG player
  647. 3170 DATA BIN 00100100
  648. 3180 DATA BIN 11111111
  649. 3190 DATA BIN 11111111
  650. 3200 DATA BIN 01111110
  651. 3210 DATA BIN 01111110
  652. 3220 DATA BIN 00111100
  653. 3230 DATA BIN 00111100
  654. 3240 DATA BIN 00011000
  655. 3250 REM UDG oenemy
  656. 3260 DATA BIN 00111100
  657. 3270 DATA BIN 01011110
  658. 3280 DATA BIN 11111101
  659. 3290 DATA BIN 11110111
  660. 3300 DATA BIN 10111111
  661. 3310 DATA BIN 11111011
  662. 3320 DATA BIN 01110110
  663. 3330 DATA BIN 00111100
  664. 9998 REM BASIC 1liner 2007 -Space Ski v01- by Matt_B with UDG!! https://worldofspectrum.org/forums/discussion/comment/189539/#Comment_189539
  665. ___________________________
  666.  
  667. TIME calculation
  668. 10 PRINT "HELLO"
  669. 15 LET secs=(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50
  670. 20 PRINT "secs=";secs
  671. 30 INPUT "AA= ";a$
  672. 35 LET secsold=secs
  673. 40 LET secs=(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50
  674. 50 PRINT "secs=";secs
  675. 60 PRINT "Difference=";secs-secsold
  676.  
  677.  
  678.  
  679. _______________________
  680.  
  681.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement