5 Basic 5 Line Games ==================== 5 Basic 5 Line Games -------------------- These games were made for the "VIC 20 Quick Reference Handbook" in 2022. Instructions and program LISTs are provided in this document for digital release. As homage to the original VIC 20 user manual, I made several tiny games, each restricted to five lines of BASIC code (one full screen). I always found type-in programs to be a little intimidating, so a screenshot of each program LIST is included to assist proofreading. Of course, PRG files are available online. Each game listed here demonstrates a different genre or mechanism and could be altered for joystick input or user defined characters. B-5 Bomber ---------- Clear the skyline to land your bomber aircraft before colliding with a building. This is a one button game. Use any key of the keyboard, OR the joystick fire button, OR the paddle fire button. B-5 Bomber Listing ------------------ 1 E=36876:POKEE+3,105:PRINT"{clr}{yellow}{down}{right}BOMBER":D=30720:H=32:FORA=8167TO8183:FORC=0TO1+RND(A)*9 2 B=A-C*22:POKEB+D,2+(AAND3):POKEB,189:NEXT:NEXT:A=7745:C=8186:B=C:POKEE-2,140:G=E+1 3 POKEA,H:A=A+1:POKEA,62:POKEB,H:IFPEEK(A+1)>HTHENPOKEE+2,0:WAIT197,64,64:RUN 4 B=B-22*(B=CTHENB=A:F=239 5 POKEB,81:POKEB+D,1:POKE198,0:POKEE+2,9:POKEC-1,233:POKEE,F:F=F+7*(F>128):POKEG,0:GOTO3 {clr} SHIFT HOME {yellow} CONTROL 8 {down} CRSR DOWN {right} CRSR RIGHT UFO Rush -------- Move to the top of the screen while avoiding collision. Beat the High Score. Use any two keyboard keys recommended below to move the UFO left or right: 1. Z - left, X - right 2. S - left, D - right 3. L - left, ; - right 4. Z - left, / - right 5. E - left, R - right 6. . - left, / - right 7. Z - left, C - right 8. S - left, F - right 9. : - left, ; - right UFO Rush Listing ---------------- 1 E=36879:POKEE,11:POKEE-2,0:PRINT"{clr}{white}"ATAB(5)"{cyan}{cmd *}{rvs on}{space}UFO{space}RUSH{space}{rvs off}{shift £}{yellow}"TAB(18):K=1:IFF-1ANDC<25)GOTO3:RUN 4 A=7840+INT(C/5)*44+(C/5-INT(C/5))*10:IFE=0THENA(1)=2:A(2)=-2:A(3)=44:A(4)=-44:RETURN 5 POKEB,173+C*2:FORD=0TO4:F=A+A(D):POKEF,128+PEEK(F)AND255:NEXT:POKEB,0:RETURN {clr} SHIFT HOME {red} CONTROL 3 {cmd *} CMD * {rvs on} CONTROL 9 {space} SPACE BAR {black} CONTROL 1 {home} HOME {down} CRSR DOWN Trails ------ Collect the clovers. Avoid running off screen or into yourself. Use the default WASD keys OR modify the highlighted areas of line 3. Up: W 9 P 9 Q 48 * 14 Down: S 41 . 41 A 17 = 46 Left: A 17 L 17 O 52 A 17 Right: D 18 ; 18 P 13 S 41 Highlighted areas in line 3 may be changed to one of the suggested combinations listed above or any key code (see page 106). Trails Listing -------------- TREASURE TRAILS PROGRAM LISTING: 1 DIMA(255):A=36875:PRINT"{clr}{yellow}"SPC(30)"TRAILS"SPC(200)"{white}{shift X}{shift X}{home}{down}":C=7910: B=1:A(1)=C:POKEA+3,4 2 D=D+1:I=7724+RND(1)*400:ON-(PEEK(I)><32)GOTO2:POKEA+4,10+RND(1)*5:POKEI,88:POKEA,163 3 C=C+B:E=PEEK(C):POKEC,9↑2:I=PEEK(197):IFI<63THEN B=((I=9)-(I=41))*22+(I=17)-(I=18) 4 F=F+1:POKEA,(FAND25)+215:A(G)=C:G=(G+1)*-(G1THEN2 4 POKEC+30698,7:IFE=PEEK(7691+D)THENPOKEA,212:POKE38411+D,7:D=D+1:IFD<10THEN2 5 FORE=0TO20:POKEA+3,171-63*(D<9):POKEA,255-E*9:POKE198,0:NEXT:WAIT197,64,64:RUN {clr} SHIFT HOME {blue} CONTROL 7 {black} CONTROL 1 {home} HOME {left} CRSR LEFT {space} SPACE BAR {down} CRSR DOWN {insert} SHIFT DELETE