10LinesGame by azimov
A downloadable game
10LinesGame by azimov for the Homeputerium 10Lines Contest 2022.
Use O and P to move and Q for jump. (First jump and then move). Go to the left
and take the key, come back to the start of the level to go out. Avoid spikes and
falls.
-------------------------------
This is a game for the ZX Spectrum, it's typed in Spectaculator (128k +2A) and it
will work in any ROM 48k or 128k and obviously, any real Sinclair Spectrum or clone.
Lines 1 to 7 are the main engine of the game.
Line 1 test if the Q key is pressed
and make the character jump. If the character touches the upper line (cieling spikes) or
the bottom line (lava) the game is reset. Goes to line 8 where the program starts.
Line 2 moves the character left and right and limits the map checking the value of
the variable c$ (the floor). If character is at the end of map (top right) the game
increases 1 level. Go to line 9 where the map is created.
Line 3 prints basic info in screen when you press the I key.
Line 4 detect if the character touches a spike and then goes to line 1 for restart
game.
Line 5 erases the old position, prints the character at new position, then prints
the portion of a$ (the floating spikes) and the portion of c$ that defines the floor.
Line 6 detects if the character falls in a hole in the ground. It it is, it goes to
line 2 to end game.
Line 7 Check if a key is pressed, makes a beep if it's, and go back to line 1.
Line 8 and 9 Initialize game variables and screen, makes the UDG.
Line 10 Creates the variables a$ (floating spikes) and c$ (the ground) depending his
lenght on the level number and then goes to line 1, the game engine.
1 LET y=y+(y<13)*(i$<>"q")-(i$="q"): IF y=6 OR y=15 THEN POKE 23693,151: PRINT AT 10,15;"AY!": BEEP .06,9: BEEP .3,-1: FOR z=0 TO 199: NEXT z: GO TO 8: DATA " * ": REM RUN 8 to start 2 LET s=s+(i$ ="p")-(i$ ="o")*(s>1): IF s=v THEN LET s=v-1: IF k=1 THEN LET l=l+1: GO TO 9: DATA " * " 3 IF i$="i" THEN PRINT AT 2,0;"Made by azimov for the"'"Homeputerium 10Lines Contest2022";AT 13,0;"First jump,"'"then move";AT 8,23;"Go for";AT 9,23;"the key";AT 10,25;"<<<";AT 11,23;"and back";AT 12,25;">>>": DATA " * *" 4 IF SCREEN$ (y,16)="*" THEN LET y=15: LET i$="": GO TO 1: DATA " ** " 5 PRINT AT q,16;" ";AT y,16;e$;AT 10,12;a$(s TO s+8);AT 14,12;c$(s TO s+8): LET q=y: IF s=1 AND y=11 THEN PRINT AT 16,12; FLASH 1;"THE KEY!!": FOR z=0 TO 199: NEXT z: LET a$(3 TO 8)="GO >>>": LET a$(v+2 TO v+5)="EXIT": LET c$(v+2 TO v+5)="XXXX": LET k=1: PRINT PAPER 6;AT 16,12,,: DATA "\::\::\:: \::\::\::" 6 IF c$(s+4)=" " AND y>11 THEN PRINT PAPER 2; INK 6;AT 13,16;"!";AT 14,16;"!": IF y=13 THEN LET y=15: GO TO 1: DATA "\::\:: \::\:: \::\::" 7 LET i$=INKEY$: BEEP .01*(i$<>""),-3: GO TO 1: DATA "\:: \::\::\::\::\:: " 8 RESTORE : BORDER 5: POKE 23693,48: CLEAR : LET l=1: PRINT "10LinesGame."''''''''" Q"'" \::"'" O\::\::\::P"'" \::";AT 21,31; INK 1;"i": RESTORE 9: FOR z=0 TO 15: READ h: POKE USR "a"+z,h: NEXT z: DATA " \::\:: \::\::\::\::" 9 PAPER 4: FOR z=6 TO 13: PRINT AT z,12;" ": NEXT z: PRINT AT 14,12;"LEVEL....";AT 14,20-(l>9);l: PLOT 95,128: DRAW 73,0: DRAW 0,-73: DRAW -73,0: DRAW 0,72: PAPER 4: LET y=9: LET q=13: LET e$=CHR$ 17+CHR$ 3+""""+CHR$ 17+CHR$ 4: DATA 0,0,0,4,170,251,10,4,136,136,136,85,85,85,34,34 10 LET a$=" \a ": LET c$="\::\::\::\::\::\::\:: ": FOR z=1 TO 5+l*2: LET w=INT (RND*4): RESTORE w: READ b$: LET a$=a$+b$: RESTORE 5+w: READ d$: LET c$=c$+d$: NEXT z: LET a$=a$+" <<< ": LET c$=c$+"\::\::\::\::\::\::\::\::\::": LET s=LEN a$-9: PRINT AT 6,12; INK 1;"\b\b\b\b\b\b\b\b\b": LET i$="": LET v=LEN a$-8: LET k=0: GO TO 1
Status | Released |
Author | BASIC 10Liner |
Genre | Action |
Tags | 8-Bit, basic, basic10liner, sinclair, ZX Spectrum |
Leave a comment
Log in with itch.io to leave a comment.