BASIC 10 Liner Competition - Oric Entry

Everything related to BASIC version 1.x (Oric 1 and Atmos) or HYPERBASIC (Telestrat).
Don't hesitate to give your small program samples, technical insights, or questions...
User avatar
peacer
Flight Lieutenant
Posts: 428
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by peacer »

Congratulations ... Big success

rax
Pilot Officer
Posts: 95
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post by rax »

Thank you Yicker and peacer :)

rax
Pilot Officer
Posts: 95
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post by rax »

ibisum wrote:
Sun Apr 11, 2021 7:56 pm
Please share more 10-liners .. one thing I keep thinking when I look at these, is that they pack a lot of punch for 10 lines of code, but don't necessarily need to be 10 lines .. and can therefore probably pack a whole lot *more* punch ..
These are my drafts of sent and unsent games :

Moon landing, all varsions:

Code: Select all

'the winner
0PAPER0:INK7:TEXT:FORI=0TO15:READA:POKE#B908+I,A:NEXT:DEFFNR(X)=RND(1)*X:G=.1
1HIRES:Y=150:M=3:FORI=12TO230STEP6:R=FNR(14)-7:IFY+R<190ANDY+R>120THENY=Y+R
2CURSETI+6,Y,3:T=FNR(60)+35:CHART,1,1:CURSETI,Y,3:CHART,1,1:DRAW0,6,3
3FILL193-Y,2,255:CURSETFNR(239),FNR(110),1:NEXT:Y=5:X=FNR(220)+12:PRINT"LVL:"S
4POKE#26A,10:INK3:REPEAT:K=PEEK(#208):Y=Y+V:V=V+G:IFX+E>12ANDX+E<225THENX=X+E
5IFK=156THENV=V-.3-G:ELSEIFK=172THENE=E-FNR(1)ELSEIFK=188THENE=E+FNR(1)
6IFY<0THENY=0ELSE:CURSETQ,W,3:CHAR33,1,M:M=2:CURSETX,Y,3:CHAR33,1,M:Q=X:W=Y'''
7L=Y+8:O=POINT(X,L):P=POINT(X+2,L):L=POINT(X+5,L):Z=Y>115AND(OORPORL):UNTILZ''
8G=G+0.03:CURSETX+7,Y,3:S=S+1:DATA0,12,22,47,30,12,30,51,,,48,62,60,56,32,32
9IFOANDPANDLANDV<2THENCHAR34,1,1:PING:WAIT200:GETA$:GOTO1ELSEEXPLODE


old versions:
0PAPER0:FORI=0TO21:READA:POKE#B908+I,A:NEXT:DEFFNR(X)=RND(1)*X:E=0:INK7:HIRES:
1CURSET0,150,1:Y=150:FORI=0TO236STEP3:R=FNR(10)-5:IFY+R<199ANDY+R>120THENY=Y+R
2CURSETI,Y,3:CHAR55,1,1:CURSETFNR(239),FNR(120),1:NEXT:POKE#26A,10:Y=0
3X=FNR(230):G=.05:REPEAT:K$=KEY$:Y=Y+V:V=V+G:IFX+E>0ANDX+E<230THENX=X+E
4IFK$=" "THENV=V-.5ELSEIFK$="Z"THENE=E-.3ELSEIFK$="X"THENE=E+.3
5IFY<0THENY=0ELSE:CURSETQ,W,3:CHAR33,1,M:M=2:CURSETX,Y,3:CHAR33,1,M:Q=X:W=Y:
6UNTILY>190
7 
8
9DATA0,12,22,47,30,12,30,51,0,0,48,62,60,56,32,32,48,30,63,30,48,0,0,0
RUN

0PAPER0:FORI=0TO15:READA:POKE#B908+I,A:NEXT:DEFFNR(X)=RND(1)*X:E=0:INK7:HIRES:
1Y=150:FORI=0TO236STEP6:R=FNR(14)-7:IFY+R<192ANDY+R>120THENY=Y+R
2CURSETI,Y,1:DRAW4,0,1:DRAW0,2,3:FILL195-Y,1,85:CURSETFNR(239),FNR(119),1:NEXT
3Y=0:X=FNR(230):G=.05:REPEAT:K$=KEY$:Y=Y+V:V=V+G:IFX+E>0ANDX+E<230THENX=X+E
4IFK$=" "THENV=V-.5ELSEIFK$="Z"THENE=E-.3ELSEIFK$="X"THENE=E+.3
5IFY<0THENY=0ELSE:CURSETQ,W,3:CHAR33,1,M:M=2:CURSETX,Y,3:CHAR33,1,M:Q=X:W=Y:
6UNTILY>190:GETA$:RUN
7 
8
9DATA0,12,22,47,30,12,30,51,0,0,48,62,60,56,32,32
RUN


0PAPER0:FORI=0TO21:READA:POKE#B908+I,A:NEXT:DEFFNR(X)=RND(1)*X:E=0:INK7:HIRES:
1CURSET0,150,1:Y=150:FORI=0TO236STEP6:R=FNR(10)-5:IFY+R<199ANDY+R>120THENY=Y+R
2CURSETI,Y,3:FILL199-Y,1,85:CURSETFNR(239),FNR(120),1:NEXT:POKE#26A,10:Y=0
3X=FNR(230):G=.05:REPEAT:K$=KEY$:Y=Y+V:V=V+G:IFX+E>0ANDX+E<230THENX=X+E
4IFK$=" "THENV=V-.5ELSEIFK$="Z"THENE=E-.3ELSEIFK$="X"THENE=E+.3
5IFY<0THENY=0ELSE:CURSETQ,W,3:CHAR33,1,M:M=2:CURSETX,Y,3:CHAR33,1,M:Q=X:W=Y:
6UNTILY>190:GETA$:RUN
7 
8
9DATA0,12,22,47,30,12,30,51,0,0,48,62,60,56,32,32,48,30,63,30,48,0,0,0
RUN



0PAPER0:FORI=0TO15:READA:POKE#B908+I,A:NEXT:DEFFNR(X)=RND(1)*X:E=0:INK7:HIRES:
1POKE#26A,10:Y=150:FORI=0TO236STEP6:R=FNR(14)-7:IFY+R<192ANDY+R>120THENY=Y+R
2CURSETI,Y,3:CHARFNR(60)+35,1,1:CURSETFNR(239),FNR(110),1:NEXT:Y=0:X=FNR(230)
3G=.05:REPEAT:K$=KEY$:Y=Y+V:V=V+G:IFX+E>0ANDX+E<230THENX=X+E:L=Y+8
4IFK$=" "THENV=V-.3ELSEIFK$="Z"THENE=E-.3ELSEIFK$="X"THENE=E+.3
5IFY<0THENY=0ELSE:CURSETQ,W,3:CHAR33,1,M:M=2:CURSETX,Y,3:CHAR33,1,M:Q=X:W=Y:
6O=POINT(X,L):P=POINT(X+2,L):L=POINT(X+5,L):Z=Y>120AND(OORPORL):UNTILZ
7::IFOANDPANDLANDV<2THEN?"success":CURSETX+7,Y,3:CHAR34,1,1ELSE?"crushing"
8::WAIT200:GETA$:RUN
9DATA0,12,22,47,30,12,30,51,0,0,48,62,60,56,32,32
RUN



Catch the mouse, all varsions:

Code: Select all

'final version 
0FORA=0TO15:READV:POKE#B508+A,V:NEXT:DEFFNR(X)=RND(1)*63AND28:E=0:POKE#26A,10'
1LORES0:C=35:D%=0:FORY=1TO23:X=0:PLOTX,Y,C:X=38:PLOTX,Y,C:NEXT:FORX=1TO37:Y=0'
2PLOTX,Y,C:Y=24:PLOTX,Y,C:NEXT:FORY=2TO22STEP2:FORX=2TO36STEP2:R=INT(RND(1)*4)
3A=0:B=0:IFR=0THENA=-1ELSEIFR=1THENB=-1ELSEIFR=2THENA=1ELSEB=1:PLOTX,Y,C':::::
4PLOTX+A,Y+B,C:NEXTX,Y:X=1:Y=1:L=RND(1)*22+2:J=RND(1)*33+2:E=E+1:?@0,25;"L:"E'
5:REPEAT:K$=KEY$:IFK$THENK=ASC(K$):X0=X:Y0=Y:Y=Y+(K=11)-(K=10):X=X+(K=8)-(K=9)
6Q=0:W=0:IFD%=1THENQ=-1ELSEIFD%=2THENQ=1ELSEIFD%=3THENW=1ELSEW=-1:DATA12,,30':
7IFSCRN(J+Q,L+W)<34THENPLOTJ,L,16:J=J+Q:L=L+W:PLOTJ,L,34ELSED%=RND(1)*5'::::::
8POKE#B51A,FNR(0):POKE#B51C,FNR(0):DATA45,,12,18,51,,6,17,47,63,18,,':::::::::
9O=SCRN(X,Y):PLOTX0,Y0,16:PLOTX,Y,33:UNTILO>33:SHOOT:IFO=34THEN1ELSEZAP:CLS'::
RUN 

'old versions 
'v2
0LORES0:FORA=0TO15:READV:POKE#B508+A,V:NEXT:DATA12,,30,45,,12,18:POKE#26A,10':
1C=35:GOSUB9:D%=0:FORY=0TO26:X=0:PLOTX,Y,C:X=38:PLOTX,Y,C:NEXT:FORX=0TO38:Y=0'
2PLOTX,Y,C:Y=26:PLOTX,Y,C:NEXT:FORY=2TO24STEP2:FORX=2TO36STEP2:R=INT(RND(1)*4)
3A=0:B=0:IFR=0THENA=-1ELSEIFR=1THENB=-1ELSEIFR=2THENA=1ELSEB=1:DATA51,,30,63':
4PLOTX,Y,C:PLOTX+A,Y+B,C:NEXTX,Y:X=1:Y=1:J=37:L=25::X0=1:Y0=1'::::::::::::::::
5REPEAT:K$=KEY$:IFK$THENK=ASC(K$):X0=X:Y0=Y:Y=Y+(K=11)-(K=10):X=X+(K=8)-(K=9)'
6:GOSUB7:CH=SCRN(X,Y):PLOTX0,Y0,16:PLOTX,Y,33:UNTILCH>33:ZAP:GETA$:RUN':::::::
7Q=0:W=0:IFD%=1THENQ=-1ELSEIFD%=2THENQ=1ELSEIFD%=3THENW=1ELSEW=-1'::::::::::::
8IFSCRN(J+Q,L+W)<34THENPLOTJ,L,16:J=J+Q:L=L+W:PLOTJ,L,34ELSED%=RND(1)*5'::::::
9FORA=0TO7:POKE#B518+A,RND(1)*64:NEXT:RETURN:DATA45,63,63,33,00'::::::::::::::
RUN 



'v3
0LORES0:FORA=0TO15:READV:POKE#B508+A,V:NEXT:DATA12,,30,45,,12,18:POKE#26A,10':
1C=35:D%=0:FORY=0TO26:X=0:PLOTX,Y,C:X=38:PLOTX,Y,C:NEXT:FORX=0TO38:Y=0':::::::
2PLOTX,Y,C:Y=26:PLOTX,Y,C:NEXT:FORY=2TO24STEP2:FORX=2TO36STEP2:R=INT(RND(1)*4)
3A=0:B=0:IFR=0THENA=-1ELSEIFR=1THENB=-1ELSEIFR=2THENA=1ELSEB=1:DATA51,,30,63':
4PLOTX,Y,C:PLOTX+A,Y+B,C:NEXTX,Y:X=1:Y=1:J=37:L=24:X0=1:Y0=1:PLOT37,25,127':::
5REPEAT:K$=KEY$:IFK$THENK=ASC(K$):X0=X:Y0=Y:Y=Y+(K=11)-(K=10):X=X+(K=8)-(K=9)'
6:GOSUB7:CH=SCRN(X,Y):PLOTX0,Y0,16:PLOTX,Y,33:UNTILCH>33ORCH=127:ZAP:GETA$:RUN
7Q=0:W=0:Z=63:IFD%=1THENQ=-1ELSEIFD%=2THENQ=1ELSEIFD%=3THENW=1ELSEW=-1':::::::
8V=SCRN(J+Q,L+W):IFV<34THENPLOTJ,L,16:J=J+Q:L=L+W:PLOTJ,L,34ELSED%=RND(1)*5'::
9FORA=0TO7:POKE#B518+A,(RND(1)*64)AND(V=35):NEXT:RETURN:DATA45,63,63,33,00':::
RUN 


'v4
0LORES0:FORA=0TO15:READV:POKE#B508+A,V:NEXT:DATA12,,30,45,,12,18:POKE#26A,10':
1C=35:D%=0:FORY=1TO25:X=0:PLOTX,Y,C:X=38:PLOTX,Y,C:NEXT:FORX=1TO37:Y=0':::::::
2PLOTX,Y,C:Y=26:PLOTX,Y,C:NEXT:FORY=2TO24STEP2:FORX=2TO36STEP2:R=INT(RND(1)*4)
3A=0:B=0:IFR=0THENA=-1ELSEIFR=1THENB=-1ELSEIFR=2THENA=1ELSEB=1:DATA51,,30,63':
4PLOTX,Y,C:PLOTX+A,Y+B,C:NEXTX,Y:X=1:Y=1:J=37:L=25:DEFFNR(X)=RND(1)*63AND28'::
5REPEAT:K$=KEY$:IFK$THENK=ASC(K$):X0=X:Y0=Y:Y=Y+(K=11)-(K=10):X=X+(K=8)-(K=9)'
6:GOSUB7:CH=SCRN(X,Y):PLOTX0,Y0,16:PLOTX,Y,33:UNTILCH>33ORCH=127:ZAP:GETA$:RUN
7Q=0:W=0:IFD%=1THENQ=-1ELSEIFD%=2THENQ=1ELSEIFD%=3THENW=1ELSEW=-1'::::::::::::
8IFSCRN(J+Q,L+W)<34THENPLOTJ,L,16:J=J+Q:L=L+W:PLOTJ,L,34ELSED%=RND(1)*5'::::::
9POKE#B51A,FNR(0):POKE#B51C,FNR(0):RETURN:DATA45,63,63,33,00':::::::::::::::::
RUN 

'V5
0FORA=0TO15:READV:POKE#B508+A,V:NEXT:DEFFNR(X)=RND(1)*63AND28:E=0:POKE#26A,10'
1LORES0:C=35:D%=0:FORY=1TO23:X=0:PLOTX,Y,C:X=38:PLOTX,Y,C:NEXT:FORX=1TO37:Y=0'
2PLOTX,Y,C:Y=24:PLOTX,Y,C:NEXT:FORY=2TO22STEP2:FORX=2TO36STEP2:R=INT(RND(1)*4)
3A=0:B=0:IFR=0THENA=-1ELSEIFR=1THENB=-1ELSEIFR=2THENA=1ELSEB=1:PLOTX,Y,C::::::
4PLOTX+A,Y+B,C:NEXTX,Y:X=1:Y=1:L=RND(1)*22+2:J=RND(1)*33+2:E=E+1:?@0,25;"L:"E'
5:REPEAT:K$=KEY$:IFK$THENK=ASC(K$):X0=X:Y0=Y:Y=Y+(K=11)-(K=10):X=X+(K=8)-(K=9)
6Q=0:W=0:IFD%=1THENQ=-1ELSEIFD%=2THENQ=1ELSEIFD%=3THENW=1ELSEW=-1:DATA12,,30':
7IFSCRN(J+Q,L+W)<34THENPLOTJ,L,16:J=J+Q:L=L+W:PLOTJ,L,34ELSED%=RND(1)*5'::::::
8POKE#B51A,FNR(0):POKE#B51C,FNR(0):DATA45,,12,18,51,,6,17,47,63,18,,':::::::::
9O=SCRN(X,Y):PLOTX0,Y0,16:PLOTX,Y,33:UNTILO>33:SHOOT:IFO=34THEN1ELSEZAP:CLS'::



The great wall, all varsions:

Code: Select all

'final version 
0DATA,12,,30,45,12,18,51,63,63,45,30,12,12,18,51,,61,61,61,,47,47,47,18,12,30'
1DIME(40):DEFFNR(X)=INT(RND(1)*36)+2:FORA=0TO39:READV:POKE47368+A,V:NEXT:G=2''
2POKE#26A,10:LORES1:INK6:FORY=5TO20:FORX=2TO37:PLOTX,Y,163:NEXTX,Y:POKE#BBA8,6
3B=163:N=20:X=N:P=34:V=175:REPEAT:PLOTX,4,P:IFX=ZANDP=33THENP=34:DATA45,12,30'
4U=U+1:K$=KEY$:IFK$THENK=ASC(K$):PLOTX,4,32:X=X-((K=8)*(X>2))+((K=9)*(X<37))''
5IFK=32ANDP=34THENE(X)=0:FORI=6TON:PLOTX,I,V:PLOTX,I-1,B:NEXT:P=33:Z=1:O=O+10'
6IFZ=1THENZ=FNR(0):PLOTZ,4,92ELSEIFX=ZTHENP=34:IFU>999THENL=L+1:U=0:DATA45,,''
7S=S+1:IFS>4THENS=L:GOSUB9ELSE:?@6,0;"Lives:"G" Lvl:"L" Score:"O:UNTILE(E)>15'
8IFGTHENG=G-1:SHOOT:FORI=0TO40:E(I)=0:NEXT:GOTO2ELSEEND:DATA54,58,54,,59,55,59
9E=FNR(0):PLOTE,N-E(E),165:E(E)=E(E)+1:PLOTE,N-E(E),36:PLAY0,1,1,99:RETURN''''
RUN




'V1
0DATA,12,,30,45,12,18,51,63,63,45,30,12,12,18,51,,61,61,61,,47,47,47,18,12,30
1POKE#26A,10:LORES1:INK6:FORA=0TO31:READV:POKE47368+A,V:NEXT:DATA45,12,30,45,
2B=163:DEFFNR(X)=INT(RND(1)*30)+5:DIME(40):FORY=5TO20:FORX=5TO35:PLOTX,Y,B:
3NEXTX,Y:N=20:X=N:P=34:REPEAT:PLOTX,4,P:IFX=ZANDP=33THENP=34:PLOTX,Y-1,32
4:K$=KEY$:IFK$THENK=ASC(K$):PLOTX,4,32:X=X-((K=8)*(X>5))+((K=9)*(X<35))
5:IFK=32ANDP=34THENE(X)=0:FORI=6TON:PLOTX,I,92:PLOTX,I-1,B:NEXT:P=33:Z=1
6:
7:IFZ=1THENZ=FNR(0):PLOTZ,3,92ELSEIFP=33ANDX=ZTHENP=34:PLOTX,3,32
8GOSUB9:UNTILE(E)>15:END
9E=FNR(0):PLOTE,N-E(E),199:E(E)=E(E)+1:PLOTE,N-E(E),36:RETURN
RUN




'v2
0DATA,12,,30,45,12,18,51,63,63,45,30,12,12,18,51,,61,61,61,,47,47,47,18,12,30'
1DIME(40):DEFFNR(X)=INT(RND(1)*36)+2:FORA=0TO39:READV:POKE47368+A,V:NEXT:G=3
2POKE#26A,10:LORES1:INK6:FORY=5TO20:FORX=2TO37:PLOTX,Y,163:NEXTX,Y
3B=163:N=20:X=N:P=34:REPEAT:PLOTX,4,P:IFX=ZANDP=33THENP=34:PLOTX,Y-1,32
4:K$=KEY$:IFK$THENK=ASC(K$):PLOTX,4,32:X=X-((K=8)*(X>2))+((K=9)*(X<37))
5:IFK=32ANDP=34THENE(X)=0:FORI=6TON:PLOTX,I,92:PLOTX,I-1,B:NEXT:P=33:Z=1:O=O+5
6:IFZ=1THENZ=FNR(0):PLOTZ,3,92ELSEIFP=33ANDX=ZTHENP=34:PLOTX,3,32
7:S=S+1:IFS>5THENS=L:GOSUB9ELSE?@0,0;"Lives:"G"Score:"O:UNTILE(E)>15
8IFG>1THENG=G-1:FORI=0TO40:E(I)=0:NEXT:GOTO2ELSEEND:DATA45,12,30,45,,,54,58
9E=FNR(0):PLOTE,N-E(E),165:E(E)=E(E)+1:PLOTE,N-E(E),36:RETURN:DATA54,,59,55,59
RUN



'v3
0DATA,12,,30,45,12,18,51,63,63,45,30,12,12,18,51,,61,61,61,,47,47,47,18,12,30'
1DIME(40):DEFFNR(X)=INT(RND(1)*36)+2:FORA=0TO39:READV:POKE47368+A,V:NEXT:G=2':
2POKE#26A,10:LORES1:INK6:FORY=5TO20:FORX=2TO37:PLOTX,Y,163:NEXTX,Y:POKE#BBA8,0
3B=163:N=20:X=N:P=34:REPEAT:U=U+1:PLOTX,4,P:IFX=ZANDP=33THENP=34:PLOTX,Y-1,32'
4K$=KEY$:IFK$THENK=ASC(K$):PLOTX,4,32:X=X-((K=8)*(X>2))+((K=9)*(X<37))':::::::
5IFK=32ANDP=34THENE(X)=0:FORI=6TON:PLOTX,I,92:PLOTX,I-1,B:NEXT:P=33:Z=1:O=O+10
6IFZ=1THENZ=FNR(0):PLOTZ,3,92ELSEIFX=ZTHENP=34:PLOTX,3,32:IFU>999THENL=L+1:U=0
7S=S+1:IFS>4THENS=L:GOSUB9ELSE?@6,0;"Lives:"G" Lvl:"L" Score:"O:UNTILE(E)>15':
8IFGTHENG=G-1:ZAP:FORI=0TO40:E(I)=0:NEXT:GOTO2ELSEEND:DATA45,12,30,45,,,54,58'
9E=FNR(0):PLOTE,N-E(E),165:E(E)=E(E)+1:PLOTE,N-E(E),36:RETURN:DATA54,,59,55,59
RUN

'v5
0DATA,12,,30,45,12,18,51,63,63,45,30,12,12,18,51,,61,61,61,,47,47,47,18,12,30'
1DIME(40):DEFFNR(X)=INT(RND(1)*36)+2:FORA=0TO39:READV:POKE47368+A,V:NEXT:G=3
2POKE#26A,10:LORES1:INK6:FORY=5TO20:FORX=2TO37:PLOTX,Y,163:NEXTX,Y
3B=163:N=20:X=N:P=34:REPEAT:PLOTX,4,P:IFX=ZANDP=33THENP=34:PLOTX,Y-1,32
4:K$=KEY$:IFK$THENK=ASC(K$):PLOTX,4,32:X=X-((K=8)*(X>2))+((K=9)*(X<37))
5:IFK=32ANDP=34THENE(X)=0:FORI=6TON:PLOTX,I,92:PLOTX,I-1,B:NEXT:P=33:Z=1:O=O+5
6:IFZ=1THENZ=FNR(0):PLOTZ,3,92ELSEIFP=33ANDX=ZTHENP=34:PLOTX,3,32
7:S=S+1:IFS>5THENS=L:GOSUB9ELSE?@0,0;"SCR:"O" LIVES:"3-G:UNTILE(E)>15:
8IFG>0THENG=G-1:FORI=0TO40:E(I)=0:NEXT:GOTO2:DATA45,12,30,45,,54,58,'
9E=FNR(0):PLOTE,N-E(E),165:E(E)=E(E)+1:PLOTE,N-E(E),36:RETURN:DATA54,,59,55,59
RUN


'V6
0DATA,12,,30,45,12,18,51,63,63,45,30,12,12,18,51,,61,61,61,,47,47,47,18,12,30'
1DIME(40):DEFFNR(X)=INT(RND(1)*36)+2:FORA=0TO39:READV:POKE47368+A,V:NEXT:G=2''
2POKE#26A,10:LORES1:INK6:FORY=5TO20:FORX=2TO37:PLOTX,Y,163:NEXTX,Y:POKE#BBA8,0
3B=163:N=20:X=N:P=34:REPEAT:U=U+1:PLOTX,4,P:IFX=ZANDP=33THENP=34:DATA45,12,30'
4K$=KEY$:IFK$THENK=ASC(K$):PLOTX,4,32:X=X-((K=8)*(X>2))+((K=9)*(X<37))''''''''
5IFK=32ANDP=34THENE(X)=0:FORI=6TON:PLOTX,I,92:PLOTX,I-1,B:NEXT:P=33:Z=1:O=O+10
6IFZ=1THENZ=FNR(0):PLOTZ,4,92ELSEIFX=ZTHENP=34:IFU>999THENL=L+1:U=0:DATA45,,''
7S=S+1:IFS>4THENS=L:GOSUB9ELSE:?@6,0;"Lives:"G" Lvl:"L" Score:"O:UNTILE(E)>15'
8IFGTHENG=G-1:ZAP:FORI=0TO40:E(I)=0:NEXT:GOTO2ELSEEND:DATA54,58,54,,59,55,59''
9E=FNR(0):PLOTE,N-E(E),165:E(E)=E(E)+1:PLOTE,N-E(E),36:PLAY0,1,1,99:RETURN''''
RUN


Snake (unfinished, there are some bugs)

Code: Select all

0FORI=0TO7:READA:POKE#B908+I,A:NEXT:DEFFNR(X)=RND(1)*X:DIMO(1999):L=1:M=3:T=0
1B=224:LORES1:INK3:GOSUB7:X=20:Y=25:T=0:REPEAT:K$=KEY$:IFK$THENK=ASC(K$)
2IFK=8THEND=3ELSEIFK=9THEND=1ELSEIFK=11THEND=0ELSEIFK=10THEND=2
3PLOT38-T,26,T$:IFD=0THENY=Y-1ELSEIFD=1THENX=X+1ELSEIFD=2THENY=Y+1ELSEX=X-1
4T=T-G:Z=SCRN(X,Y):O(C)=X:O(C+1)=Y:C=C+2:CO=C-N:IFCO=>0THENPLOTO(CO),O(CO+1),U
5IFT<1THENQ=FNR(36)+3:W=FNR(23)+2:IFSCRN(Q,W)>UTHEN5ELSEP=P+1:T=35:PLOTQ,W,33
6IFZ=33THENP=P-2:T=1:Z=16:N=N+20ELSE:PLOTX,Y,17:UNTILZ>16:M=M-1:IFM>0THEN1
7FORA=2TO39:PLOTA,0,B:PLOTA,25,B:Y=A*0.65:PLOT2,Y,B:PLOT39,Y,B:NEXT
8
9U=16:N=10:C=0:G=.5:T$="S"+CHR$(0):RETURN:DATA6,14,8,30,63,63,63,30
RUN





Invaders (unfinished, there are some bugs):

Code: Select all

0FORA=0TO20:READV:POKE47368+A,V:NEXT:LORES1:POKE#26A,10:DIMC(40*40):Z=32
1DIMX(40),Y(40):FORY=0TO3:FORX=0TO9:X(I)=X*3+3:Y(I)=Y*2+2:I=I+1:NEXTX,Y:
2FORE=0TO39:GOSUB7:NEXT:D=1:ND=D:PX=20:E=0:PLOT1,0,O:REPEAT:IFX(E)>0THENGOSUB7
3:E=E+1:IFE=40THENE=0:D=ND:NY=DY:DY=0ELSE:IFK=132ANDBY=0THENBY=26:BX=PX:ZAP
4T=BX+BY*40:IFC(T)>0THENX(C(T))=0:PLOTBX,BY,32:BY=0:SHOOT
5K=PEEK(#208):IFBY>0THENPLOTBX,BY,32:BY=BY-1:PLOTBX,BY,35:
6PLOTPX,26,32:PX=PX+(K=172ANDPX>2)-(K=188ANDPX<38):PLOTPX,26,34:UNTIL0:END
7PLOTX(E),Y(E),Z:C(X(E)+Y(E)*40)=0:X(E)=X(E)+D:IFX(E)<3ORX(E)>37THENND=-D:DY=1
8:Y(E)=Y(E)+NY:C(X(E)+Y(E)*40)=E:PLOTX(E),Y(E),33:
9RETURN:DATA30,63,45,63,30,33,51,0,8,8,28,62,54,34,0,0,8,8,8,8,8
RUN


'hires - old version
0FORA=0TO20:READV:POKE47368+A,V:NEXT:POKE#26A,10:HIRES:DIMC(40*40):
1DIMX(40),Y(40):FORY=0TO3:FORX=0TO9:X(I)=X*15+25:Y(I)=Y*20+20:I=I+1:NEXTX,Y:
2FORE=0TO39:GOSUB7:NEXT:D=5:ND=D:PX=120:E=0:REPEAT:GOSUB7
3K=PEEK(#208):E=E+1:IFE=40THENE=0:D=NDELSEIFK=132THENBY=185:IFK=132THENBX=PX
4IFBY>10THENCURSETBX,BY,3:CHAR35,1,0:BY=BY-5:CURSETBX,BY,3:CHAR35,1,1
5CURSETPX,190,3:CHAR34,1,0:PX=PX+(K=172ANDPX>20)*5-(K=188ANDPX<220)*5:
6CURSETPX,190,3:CHAR34,1,1:UNTIL0:END
7IFX(E)=0THENRETURNELSE:CURSETX(E),Y(E),3:CHAR33,1,0:X(E)=X(E)+D:
8IFX(E)<20THENND=5ELSE:IFX(E)>220THENND=(-5)ELSE:CURSETX(E),Y(E),3:
9CHAR33,1,1:RETURN:DATA30,63,45,63,30,33,51,0,8,8,28,62,54,34,0,0,8,8,8,8,8
RUN




RLE compression test:

Code: Select all

'rle
0DATA"Cs4L6I4%6$:&6%:&9$:$9$:$9&:$9':$9%:$6+:%6&4%6$:&6%3=6'8$6$4%6)3$976'3$"
1DATA"6$:%6&4%6)3$5$6$5%9'4%9%4$9&4&9%6&3$6'8$6$4%6$8&6%3$6$5%6$5$9&4$9$4$9$"
2DATA"4$9&4$9(6%3$6$:%6&4%6)3$5'6$5$9%4%9%4$9&4%9)3$6)4%6)3$5$6$5'9%4$9$4$9$"
3DATA"4&9$4&9(3$6)4%6)3$5%9$5%9$5$609$6%9$3$6)4%6%4%6%3$4$9$5$9%5$953$6%4%6%"
4DATA"4%6$4'6$3$4$7':$753$6$4'6$4%6$3$4%3$6$3$4$7,:%7-:$7$3$6$3$4%3$6$4%6%3%"
5DATA"6%3$4$8(7.:&7'3$6%3%6%4%6)3$4$8$4$8)723$6)4%6%4%6%3$4$8'4$8'7&:'7':&3$"
6DATA"6%4%6%4%6$4'6$3$4$8%4$8*703$6$4'6$4%6$3$4%3$6$3=6$3$4%3$6$4%6%3%6A3%6%"
7DATA"4%6I4LCS3$CU3$C_"
8A=#BBA8:FORZ=0TO7:READD$:FORN=1TOLEN(D$)-1STEP2:K=ASC(MID$(D$,N,1))-35
9FORI=1TOASC(MID$(D$,N+1,1))-35:POKEA,K:A=A+1:NEXTI,N,Z


'explorer7
0DATA"9F6(9%4&9$4$9$4$9$4%9%4$9'4%9$4%9%4&9$4%9&7&6%9%4$9&4$9$4$9$4$9$4$9$4$"
1DATA"9&4$9$4$9$4$9$4$9$4$9&4$9$4$9&6$7$6%9%4%9&4$9%4%9%4$9&4$9$4$9$4%9%4%9%"
2DATA"4%9(7$6%9%4&9$4$9$4$9$4$9&4&9$4%9%4$9$4$9$4&9$4$9$4$9'7$9N6&9$6%9.6+9$"
3DATA"6&9$6&9$6%9$6$9-6,9:6+935$9)5$9$5$9%5$9;5$9$5'9%5&6$5%9$5$9$5$975)6$5*"
4DATA"6$5&6$5$8(915$6%5&6$5%6$5%6$5$6$5&6$5$6$9$8(905&6$5'6$5&6$5'6$5&9&8(9/"
5DATA"5(6$5&6%5*6%8):%8&9/5.6%5'8):'8(9,8%9%8$9$8%9$8$5'9$869)8%9%8$9$8%9$8$"
6DATA"9$8%9%8$9$8-908%9%8$9$8%9$8$9$8%9%8,906&8%6'8%6&8%6%8)7+:&7'628%6&7*:%"
7DATA"776.7/:%7':%7(:&7-:(7@:&7.:%7/:&7A:%71:%7(:%7(:&7Z:&73"
8A=#BBA8:FORZ=0TO7:READD$:FORN=1TOLEN(D$)-1STEP2:K=ASC(MID$(D$,N,1))-35
9FORI=1TOASC(MID$(D$,N+1,1))-35:POKEA,K:A=A+1:NEXTI,N,Z




Pong (unfinished):

Code: Select all

0DEFFNR(X)=RND(1)*X:FORA=0TO7:READV:POKE47368+A,V:NEXT:POKE#26A,10
1LORES1:PD$=CHR$(16)+"______"+CHR$(16):X=15:E=15:Q=5:W=5:Q1=1:W1=.7
2REPEAT
3Q2=Q:Q=Q+Q1:W2=W:W=W+W1:IFQ>37THENQ1=FNR(-1)-.5ELSEIFQ<3THENQ1=FNR(1)+.5
4IFW>24ORW<4THENW1=-W1ELSE:T=SCRN(Q,W):IFT=23THEN:PLOTQ,W,16:W1=-W1
5K=PEEK(#208):X=X+(K=172ANDX>1)-(K=188ANDX<32)
6PLOTQ2,W2,16:PLOTQ,W,33:PLOTX,25,PD$:PLOTE,2,PD$:UNTIL0
7
8
9S$=CHR$(C)+CHR$(C)+CHR$(C)+CHR$(C)+CHR$(C):RETURN:DATA0,12,30,63,63,30,12,0
RUN


LOGO (unfinished):

Code: Select all

0PAPER0:INK7:HIRES:X=120:Y=100:M=1:CURSETX,Y,3:R=-PI:P=PI/180
1DIMC$(999),ST(99),I(99):SP=0:CHAR64,0,2
2INPUTC$(I):I=I+1:IFC$(I-1)<>"END"THEN2
3FORI=0TO998STEP2:C$=C$(I):IFC$="END"THENI=999:IFC$="PU"THENM=3
4IFC$="FD"THENL=VAL(C$(I+1))ELSEIFC$="BK"THENL=-VAL(C$(I+1))
5IFC$="RT"THENR=R-VAL(C$(I+1))*PELSEIFC$="LT"THENR=R+VAL(C$(I+1))*P
6IFC$="R["THENSP=SP+1:ST(SP)=I:I(SP)=VAL(C$(I+1))ELSEIFC$="PD"THENM=1
7IFC$="]"THENI(SP)=I(SP)-1:IFI(SP)>0THENI=ST(SP)ELSESP=SP-1
8GOSUB9:L=0:NEXT:GETA$:END
9CHAR64,0,2:DRAWSIN(R)*L,COS(R)*L,M:CHAR64,0,2:RETURN
RUN


Plasma test:

Code: Select all

0H=26:W=39
1FORY=0TOH:FORX=0TOW
2C=ABS(128*SIN(SQR((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2)/4))/16)
3PLOTX,Y,C+16:NEXTX,Y
4
5
6
7
8
9
RUN


Matrix (only works well if you press F6 :) ):

Code: Select all

0LORES1:INK2:DIMC(39):DIML(39):POKE#26A,10:
1FORI=0TO39:C(I)=INT(RND(1)*25):NEXT
2REPEAT:
3X=PEEK(#304):C=RND(1)*37+2:C(C)=C(C)+1:T=C(C):IFT<25THENPLOTC,T,RND(1)*60+33
4L=L(C)+1:IFT-L>0ANDT-L<25THENPLOTC,T-L,32
5IFT>40THENC(C)=0:L(C)=INT(RND(1)*10+3)
6UNTIL0
7
8
9
RUN


Circles test:

Code: Select all

0PAPER0:INK7:CLS:DEFFNR(X)=RND(1)*X:::::::
1HIRES:POKE#26A,10:'FORA=0TO50:PLOTFNR(39),FNR(26),46:NEXT
2REPEAT:R1=FNR(100):R2=FNR(100):X=FNR(200)+40:Y=FNR(150)+50:C=FNR(97)+33
3FORI=0TO6.28STEP.05:X1=X+SIN(I)*R1:Y1=Y+COS(I)*R2:
4IFX1>0ANDX1<230ANDY1>0ANDY1<191THENCURSETX1,Y1,1
5
6NEXT:UNTIL0
7
8
9
RUN



0PAPER0:INK7:LORES0:DEFFNR(X)=RND(1)*X::::
1
2REPEAT:R1=FNR(20)+5:R2=FNR(20)+5:X=FNR(30)+5:Y=FNR(20)+5:C=FNR(7)+17
3FORI=0TO6.28STEP.03:X1=X+SIN(I)*R1:Y1=Y+COS(I)*R2:
4IFX1>0ANDX1<39ANDY1>0ANDY1<27THENPLOTX1,Y1,C
5
6NEXT:UNTIL0
7
8
9
RUN


Brick:

Code: Select all

0DEFFNR(X)=RND(1)*X:POKE#26A,10:L=3:R$=CHR$(223):B$=CHR$(16):W$=R$+R$+"__"
1LORES1:INK6:PD$=B$+"SSSSSS"+B$:X=15:Q=20:W=23:Q1=1:W1=-1:Q$="__"+R$+R$'''''''
2FORA=0TO37:PLOT2,2+A*.57,164:PLOT39,2+A*.57,168:PLOTA+2,1,162:NEXT:PLOT2,25,0
3FORY=0TO1:FORX=2TO8:PLOTX*4,Y*2+6,W$:PLOTX*4,Y*2+7,Q$:C=C+4:NEXTX,Y''''''''''
4PLOT0,0,"  Lives:":PLOT28,0,"Score:":PLOT9,0,STR$(L):IFL=0THENCLS:END''''''''
5REPEAT:K=PEEK(#208):Q2=Q:Q=Q+Q1:W2=W:W=W+W1:T=SCRN(Q,W):IFQ>37ORQ<4THENQ1=-Q1
6IFT<94THEN8ELSEPLOTINT(Q/2)*2,W,"  ":C=C-1:S=S+10:Q1=(.5+FNR(.5))*(-SGN(Q1))'
7PLOT34,0,STR$(S):W1=(.5+FNR(.5))*(-SGN(W1)):PING:IFC=0THEN1''''''''''''''''''
8X=X+(K=172ANDX>2)-(K=188ANDX<32):PLOTQ2,W2,16:IFW<4ORT=83THENW1=-W1''''''''''
9PLOTQ,W,33:PLOTX,24,PD$:IFC=0THENRUNELSE:UNTILW>25:L=L-1:W1=-1:W=24:ZAP:GOTO4
RUN

User avatar
jbperin
Flight Lieutenant
Posts: 284
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: BASIC 10 Liner Competition - Oric Entry

Post by jbperin »

Thank you for sharing. It's a very nice collection. Bravo.

Post Reply