Harry Dotter - BASIC Game in 10 Lines

Post Reply
User avatar
1anking
Posts: 4
Joined: Wed Oct 09, 2019 9:47 pm
Location: Oslo
Contact:

Harry Dotter - BASIC Game in 10 Lines

Post by 1anking »

Harry Dotter is my Pac Man clone written in 10 lines of BASIC for the BBC Micro.
The disk image attached is slightly modified so you can play again without having to manually re-load the game.
The game features intro music, sound effects, and increasing difficulty as Harry progresses through the levels.

The official contest entry with code comments can be found here
https://bunsen.itch.io/harry-dotter-by-ian-king

The game is also hosted on the bbcmicro.co.uk games archive here.
https://bbcmicro.co.uk/game.php?id=4113

Code: Select all

0d=0:V=1:W=3:Z=240:K=0:H=-1:V.23,Z,H;H;H;H;:REM0-=(((888((5((((X(((*)9*(H;8H-=(H;8H*)9*((((X(((5(((888((-=(@5EEIIMQQUYaa
1DEFFNt(x,y,c):SO.1,-12*d,200,6*d:=((x>c)+((x<c)*-1))*-(((PO.x-64,y)<4)A.(x>c))OR((PO.x+64,y)<4) A.(x<c)))
2DEFFNu(x,y,c):V.4:P.TAB(0,18);K:V.5:=((y>c)+((y<c)*-1))*-(((PO.x,y-32)<4)A.(y>c))OR((PO.x,y+32)<4) A.(y<c)))
3B=241:V.23,B,60,126,219,147,219,-1,189,152:D=PA.+47:F.y=1TO59:D?y=D?y+40*H:N.:H=0:D?0=Z:D?60=Z:GOS.8:V.5:MOVEj,k:GC.3,5
4V.B:MOVEl,m:GC.3,5:V.B:REP.:MOVEX,Y:GC.0,3:P."H":n=j:o=k:p=l:q=m:IFPO.X+32,Y-26)=V K=K+1:MOVEX,Y:GC.0,0:V.Z:SO.0,-9,2,1
5F=RND(12):e=-(F<V+1):j=j+FNt(j,k,X)*64*e:l=l+FNt(l,m,X)*64*e:k=k+FNu(j,k,Y)*32*e:m=m+FNu(l,m,Y)*32*e:MOVEn,o:GC.3,5:V.B
6IFK=V*99 OR d=1 V=V+1-d:G.3:EL.MOVEp,q:GC.3,5:V.B:MOVEj,k:GC.3,5:V.B:MOVEl,m:GC.3,5:V.B:r=X:s=Y:IFPO.X+32,Y)=5 d=1
7X=X+64*FNt(X,Y,X+INKEY(-98)-INKEY(-67)):Y=Y+32*FNu(X,Y,Y+INKEY(-102)-INKEY(-71)):MOVEr,s:GC.0,0:V.Z:IFW=0 END:EL. U.0
8MO.2:X=452:Y=670:l=388:m=862:j=772:k=m:V.4:C=0:S=0:F.L=1TO15:REP.:A=D?S:S=S+1:F.I=0TOA/16:C.4:V.Z;:C=C+1:N.:K=V*99-99
9F.I=0TOA A.15:C.V:V.46*-(C<16);:C=C+1:N.:U.C=17:P.:C=0:N.:F.E=61TO72:SO.1,-12,D?E,2:N.:W=W-d:P.TAB(7,18);V;W:V.5:d=0:R.
Full Colour Mode 2 BBC Micro Disk Image
HDOTTER.ssd
(25 KiB) Downloaded 42 times
Electron Version Mode 5 Tape Image
HDOTTER.uef
(1.43 KiB) Downloaded 48 times
BBC MICRO Screen shots
Hdotter1.png
Hdotter2.png
Acorn Electron Screen Shot
Hdotter3.png
User avatar
fizgog
Posts: 618
Joined: Thu Jun 17, 2021 3:18 pm
Location: Nottinghamshire
Contact:

Re: Harry Dotter - BASIC Game in 10 Lines

Post by fizgog »

Very impressive for 10 lines of code
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
User avatar
1anking
Posts: 4
Joined: Wed Oct 09, 2019 9:47 pm
Location: Oslo
Contact:

Re: Harry Dotter - BASIC Game in 10 Lines

Post by 1anking »

Cheers Fizgog!
User avatar
lushprojects
Posts: 148
Joined: Mon Jan 18, 2021 4:02 pm
Contact:

Re: Harry Dotter - BASIC Game in 10 Lines

Post by lushprojects »

That's mad (in a good way)!
User avatar
1anking
Posts: 4
Joined: Wed Oct 09, 2019 9:47 pm
Location: Oslo
Contact:

Re: Harry Dotter - BASIC Game in 10 Lines

Post by 1anking »

:D yep sends you that way too, trying to compress it down haha..
Post Reply

Return to “miscellaneous new bbc and electron games”