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
rax
Flying Officer
Posts: 200
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post by rax »

How buggy is the "print@" function? :)

I already know about the problems with "IF" and "ELSE", but I hadn't seen that with "print@".

I tried to make a "brick" game, and I use "print @" to show the lives and score in the first line. You can see in the video how the function behaves.

Code: Select all

7?@0,0;"  Lives:"L"  Score:"S



p.s. I looked at last year's games in the competition, and I still think ORIC doesn't have a very good chance :(.
User avatar
jbperin
Flight Lieutenant
Posts: 487
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: BASIC 10 Liner Competition - Oric Entry

Post by jbperin »

Really I can't believe this game fits in 10 lines of BASIC.
Just amazing.
rax wrote: Mon Mar 01, 2021 10:10 pm p.s. I looked at last year's games in the competition, and I still think ORIC doesn't have a very good chance :(.
Perhaps Oric is not the best machine to compete is this category.

But if you and Dbug are in the competition we can say that Oric has its best chance to compete at its best capabilities.
Keep up the good works guys .. you are killers !!
User avatar
rax
Flying Officer
Posts: 200
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post by rax »

Thanks jbperin,

I hope to find free time and describe 1-2 of them and send them to the competition.
Very soon I will post them all here in the forum (I have to gather them in one place).

I would advise everyone to try to make a little basic game. It's not that hard :)


jbperin wrote: Thu Mar 04, 2021 12:26 pm But if you and Dbug are in the competition we can say that Oric has its best chance to compete at its best capabilities.
Keep up the good works guys .. you are killers !!
You missed 6502nerd :)
User avatar
rax
Flying Officer
Posts: 200
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post by rax »

Тhese are my gaming attempts:

Probe:

Code: Select all

0PAPER0:INK7:FORA=0TO15:READV:POKE47368+A,V:NEXT:DATA0,28,56,63,63,56,28,0,54:
1HIRES:POKE#26A,10:Q=14:P=-14:X=231:Y=100:M=0:L=0:W=200:H=200:DATA0,25,45,14::
2REPEAT:CURSETX,Y,3:CHAR33,1,0:K$=KEY$:Y=Y+(K$="A")-(K$="Z"):X=X+1:GOSUB6'::::
3IFX=232THENX=12:Y=RND(1)*160+20:INKRND(1)*7+1:GOSUB8:L=L+1:CLS:PRINT"Level:"L
4CURSETX,Y,3:CHAR33,1,1:IFK$=" "THENZAP:M=1:GOSUB7:M=0:GOSUB7:DATA32,29,0:::::
5T=X+6:UNTILPOINT(T,Y+2)ORPOINT(T,Y+3)ORPOINT(T,Y+4)ORPOINT(T,Y+5):EXPLODE:END
6:IFRND(1)*100<3THENCURSETRND(1)*W+30,RND(1)*190,3:CHAR34,1,1:RETURNELSERETURN
7CURSETX+6,Y+3,M:T=60+(X>170)*(X-170):DRAWT,0,M:DRAW1,1,3:DRAW-T,0,M:RETURN:::
8PING:CURSET10,0,3:FORA=0TO7:DRAWQ,Q,1:DRAWQ,P,1:NEXT:DRAW0,199,1:FORA=0TO7:::
9DRAWP,P,1:DRAWP,Q,1:NEXT:FORA=0TO99:CURSETRND(1)*W+30,RND(1)*H,1:NEXT:RETURN:




Moon Landing:

Code: Select all

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''''''''''




Catch The Mouse:

Code: Select all

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:

Code: Select all

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=20:P=34:V=175:REPEAT:PLOTX,4,P:IFX=ZANDP=33THENP=34:DATA45,12,30
4U=U+1:K=PEEK(#208):IFK>100THENPLOTX,4,32:X=X-((K=172)*(X>2))+((K=188)*(X<37))
5IFK=132ANDP=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:PRINT@6,0;"Man:"G" Lvl:"L" Scr:"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''''




Cars:

Code: Select all

0FORA=0TO15:READV:POKE#B908+A,V:NEXT:DEFFNR(X)=INT(RND(1)*X):E=0:POKE#26A,10
1CLS:?@2,26;:PAPER0:INK6:X=20:L=25:R=9:Y=26:E=34:FORA=0TO26:GOSUB7:NEXT
2REPEAT:GOSUB7:K$=KEY$:X=X+(K$="Z")-(K$="X"):CH=SCRN(X,0):PLOTX,0,33
3UNTILCH>33:EXPLODE:RUN
4
5
6
7R1=FNR(3)-1:L1=FNR(3)-1:T=R1+R:Q=L+L1:IFT>2ANDT+Q<37ANDQ>7THENR=T:L=Q
8C=FNR(50)+164:POKE#BFB8,9:PLOTR,Y,C:PLOTR+L,Y,C:IFFNR(2)THENPLOTR+FNR(L),Y,E
9?:RETURN:DATA45,63,45,12,45,63,45,0,8,28,20,46,62,62,8,28
I also have a few unfinished :)
User avatar
ibisum
Wing Commander
Posts: 1755
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by ibisum »

These are terrific. You are truly an Oric hero! All of you guys are! What a sweet collection of neat, fun things.

I like the animation technique of Catch the Mouse- well in fact all of these animals techniques are interesting... With a 500-line BASIC “limitation”, you could really make a bigger engine out of this... these 10-liners are so nicely written, that the mind boggles what can be done without the imposition.... but same ethos.
User avatar
6502Nerd
Pilot Officer
Posts: 111
Joined: Thu Oct 08, 2020 9:48 pm
Location: Leicestershire, UK
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by 6502Nerd »

ibisum wrote: Wed Mar 17, 2021 2:33 pm These are terrific. You are truly an Oric hero! All of you guys are! What a sweet collection of neat, fun things.
Totally concur - very nice programming by rax!
Although there are some excellent games for other platforms in just 10 lines - for me part of the reason to enter was to show the Oric, and the judges are quite fair. I think we will get more Oric fans and interest by entering these cross-platform contests - taking part is fun I think!
User avatar
jbperin
Flight Lieutenant
Posts: 487
Joined: Wed Nov 06, 2019 11:00 am
Location: Valence, France

Re: BASIC 10 Liner Competition - Oric Entry

Post by jbperin »

rax wrote: Wed Mar 17, 2021 1:46 pm Тhese are my gaming attempts:
Just Amazing !!

Rax is a killer !!

Congratulations, you're offering the Oric some of its best chance to have an award at this contest.
User avatar
coco.oric
Squad Leader
Posts: 721
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by coco.oric »

These small pieces of code are wonders.
Congrats to all compact basics coders and my point to "the great wall", perfect.
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
User avatar
Chema
Game master
Posts: 3081
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by Chema »

Incredible work, rax! Really nice!
User avatar
rax
Flying Officer
Posts: 200
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post by rax »

Thank you all (ibisum, 6502Nerd , jbperin, coco.oric, Chema ) :),

I hope with this competition, more people will touch the Oric computer.

I'm still wondering what else can be done in 10 lines. Really small BASIC programs work better :)
User avatar
goyo
Pilot Officer
Posts: 65
Joined: Sat Jan 12, 2019 10:16 am

Re: BASIC 10 Liner Competition - Oric Entry

Post by goyo »

Hi !

How can i make a line with IF THEN ELSE with many instruction after ELSE ?

here I have PLOT TX,TY,32 instruction that work with IF T=1 and not with ELSE T=0: ?

Code: Select all

120 IF T=1 THEN IF TY<26 THEN TY=TY+1 ELSE T=0:PLOT TX,TY,32
User avatar
Dbug
Site Admin
Posts: 4739
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by Dbug »

goyo wrote: Thu Apr 08, 2021 1:50 pm Hi !

How can i make a line with IF THEN ELSE with many instruction after ELSE ?

here I have PLOT TX,TY,32 instruction that work with IF T=1 and not with ELSE T=0: ?

Code: Select all

120 IF T=1 THEN IF TY<26 THEN TY=TY+1 ELSE T=0:PLOT TX,TY,32
If wonder if this would work:

Code: Select all

120 IF T<>1 THEN ELSE IF TY<26 THEN TY=TY+1 ELSE T=0:PLOT TX,TY,32
Something often doable, is to replace IF by booleans, for example that

Code: Select all

 IF TY<26 THEN TY=TY+1
is equivalent to

Code: Select all

 TY=TY-(TY<26)
The way it works, is that when an expression is evaluated to FALSE, the value is 0, and when evaluated to TRUE, the value is -1
User avatar
goyo
Pilot Officer
Posts: 65
Joined: Sat Jan 12, 2019 10:16 am

Re: BASIC 10 Liner Competition - Oric Entry

Post by goyo »

Dbug wrote: Thu Apr 08, 2021 5:12 pm
If wonder if this would work:

Code: Select all

120 IF T<>1 THEN ELSE IF TY<26 THEN TY=TY+1 ELSE T=0:PLOT TX,TY,32
Thanks Dbug but unfortunately

Code: Select all

PLOT TX,TY,32
is still displaying when

Code: Select all

T=1
and

Code: Select all

TY=25
User avatar
rax
Flying Officer
Posts: 200
Joined: Tue Jul 24, 2018 3:16 pm

Re: BASIC 10 Liner Competition - Oric Entry

Post by rax »

goyo wrote: Fri Apr 09, 2021 3:32 pm ...
HI :),
The ELSE function does not work correctly in ORIC ATMOS (only one command is executed after ELSE), but it works correctly in ORIC 1.

For example, try this in ORIC 1 and ORIC ATMOS:

Code: Select all

10 FOR I = 0 TO 20
20 IF I<10 THEN PRINT "LOW" ELSE PRINT "HIGH": ZAP 
30 NEXT

Тhis bug can be used for some tricks.
User avatar
iss
Wing Commander
Posts: 1680
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: BASIC 10 Liner Competition - Oric Entry

Post by iss »



Congrats my dear friend @rax!!!

...and I almost hear @rax's voice: "That's one small step for man, one giant leap for #Oric-kind." :D :D :D
Post Reply