A downloadable game

*** ASTRONAUT KERL for BASIC 10 Liner Contest 2021 ***
*** EXTREME-256 CATEGORY
*** A game by Antonio Silva - AvlixA

***(English)
ASTRONAUT KERL is a game for ZX Spectrum 48k.   You are lost in space and you must get to your ship by dodging the meteorites before the oxigen runs out.
Game inspired by "Parachutist Kerl" a game by Azimov https://azimov.itch.io/paracaidista-kerl

*Instructions:
After hundreds and hundreds of parachute jumps, Kerl needed a bigger challenge in his life.  So he applied for a job as an astronaut at ESA (European Space Agency) and got the job.

He is now flying in a mission to Mars on StarShip 21, and was on a spacewalk to repair a solar panel, when he was caught in a meteor shower that caused him to lose connection with the spacecraft.

He must reach StarShip 21 before he runs out of air.  To make the task easier, his crewmates have sent him some "O" oxygen cylinders to recharge the suit's limited air as he makes his way to the ship.

The spacesuit has an unlimited boost, but it overheats and must be allowed to recover before it can be used again.

Other shuttles from previous missions have disappeared in the area you are in, and it is possible that the ship you encounter is not StarShip 21, so you must continue on your way if you do not want to disappear into space forever.

*Keyboard: 
    - Left: O
    - Right: P
    - Boost: A

On the left you have a marker as a guide of the remaining distance to the ship:
    - "S" - StarShip position
    - "A" - Astronaut position

*Load the game:
Use a ZX Spectrum 48k emulator for example Fuse ( https://sourceforge.net/projects/fuse-emulator/ ).  In the bottom left corner of Fuse you will see the Spectrum model used.  It is recommended to use the Spectrum 48K model.   If you see a model other than Spectrum 48K you must change the model in the Machine - Select (or F9) option and select the Spectrum 48K option.

To load the game open the file astrokerl.tap in the option File - Open.
The game is saved with the option SAVE "atrokerl" LINE 10, and the first time it will auto-run from line 10. To run the game again type R (for RUN) 10 and ENTER.

***(Spanish)
ASTRONAUT KERL es un juego para ZX Spectrum 48k.   Estas perdido en el espacio y debes llegar a tu nave esquivando los meteoritos antes que el aire se acabe.
Juego inspirado en “Paracaidista Kerl” un juego de Azimov https://azimov.itch.io/paracaidista-kerl

*Instrucciones:
Tras cientos y cientos de saltos en paracaídas, Kerl, necesitaba un reto mayor en su vida.  Así que buscó trabajo de astronauta en la ESA (Agencia Espacial Europea) y consiguió el puesto.

Ahora está volando en una misión a Marte en la StarShip 21, y salió en un paseo espacial a reparar un panel solar, cuando le sorprendió una lluvia de meteoritos que le hizo perder la conexión con la nave.

Debe llegar a la StarShip 21 antes de que se le agote el aire.  Para facilitar la tarea sus compañeros de tripulación le han enviado algunas botellas de oxígeno “O” que permitirán recargar el limitado aire del traje mientras avanza hacia la nave.

El traje espacial lleva un propulsor ilimitado, pero se recalienta y debe dejarlo recuperarse para volver a utilizarlo.

Por la zona donde se encuentra desaparecieron otros transbordadores de misiones anteriores, y es posible que la nave que encuentre no sea la StarShip 21, debe continuar su camino si no quiere desaparecer en el espacio para siempre.

*Teclado: 
    • Izquierda: O
    • Derecha: P
    • Propulsor: A

A la izquierda tienes un marcador que sirve de guía para saber la distancia restante a la nave:
    • “S” – Posición de la nave StarShip
    • “A” – Posición del astronauta

*Cargar el juego:
Utiliza un emulador de ZX Spectrum 48k por ejemplo Fuse ( https://sourceforge.net/projects/fuse-emulator/ ).  En la esquina inferior izquierda de Fuse aparece el modelo de Spectrum utilizado.  Se recomienda utilizar el modelo Spectrum 48K.   Si aparece uno diferente a Spectrum 48K debes cambiar el modelo en la opción Machine – Select (o F9) seleccionar la opción Spectrum 48K.

Para cargar el juego abre el fichero  astrokerl.tap en la opción File – Open.
El juego está grabado con la opción SAVE “atrokerl” LINE 10, y la primera vez se autoejecutará desde la línea 10.  Para ejecutar el juego nuevamente pulsa R (para RUN) 10 y ENTER.

***Listing of the game (without abbreviations)****************************************
1 LET m=1+INT (RND*26): LET n=1+INT (RND*3): LET o=INT (RND*5): FOR i=1 TO 5: LET p=(RND*30)*(f=0): LET l$(i)=""+m$(i) AND f=1: LET l$(i,1+p)=".": PRINT AT r-1,0;" ": LET r=21-(q*20)/s: LET r=r*(r<21)+21*(r>21): PRINT BRIGHT 1; INVERSE 1;AT r,0;"A";AT 20,0;"|";AT 21,0;"S";
2 POKE 23692,9: LET n=n+6*(q<1): PRINT l$(i): PRINT BRIGHT 1;AT 21,m;("\.:"+"\::\::\::\::"( TO RND*4)+"\:.") AND (n=i): PRINT BRIGHT 1;AT 21,m;("\':"+"\::\::\::\::"( TO RND*4)+"\:'") AND (n+1=i): PRINT INK 5;AT 21,m+2;"O" AND (o>2)*(n+2=i): PRINT 
3 PRINT AT 0,0;"Boost:"; PAPER 4;"          "( TO B); PAPER 2;"          "( TO 10-B): PRINT AT 0,17;"Air:";a;" "; OVER 1;AT 0,21; PAPER 5;"          "( TO a/10); PAPER 2;"          "( TO 10-(a/10)): IF k=1 THEN IF b>0 THEN OUT 254,22: OUT 254,16: OUT 254,0
4 LET k=IN 65022=190: LET y=y-1+2*(k=1)*(b>0)-1*(k=0): LET x=x+((IN 57342=190)-(IN 57342=189))*(x>0)*(x<31): LET w=w-1: LET b=b-1*(k=1)*(b>0)+2*(k=0)*(b<10): LET z=(w<>y) OR (v<>x): LET d=d+1: IF (q<1 AND i=5) THEN LET f=f+1
5 LET g=(ATTR (y,x)>64) OR (ATTR (y+1,x)>64) OR (y>19): LET y=w*g+y*(g=0): LET g=ATTR (y,x): LET h=ATTR (y+1,x): LET x=v*(g>64)+x*(g<64): LET a=a-1+16*((g=5) OR (h=5)): LET a=a*(a<=100)+100*(a>100)
6 PRINT AT w,v;" " AND z;AT w+1,v;" " AND z; INK 3;AT y,x;"W";AT y+1,x;"o": LET v=x: LET w=y: LET q=q-1: LET c=9-2*(y<1 OR a<1)-1*((g=6) OR (h=6)): GO TO c: DATA 15,17,15,17,10,100,0,0,0,"WELL DONE YOU ARE ALIVE!","### ASTRONAUT KERL ###"
7 FOR i=1 TO 30: BEEP .03,i+10: NEXT i: PRINT FLASH 1; PAPER 2;AT 11,0;,,,,,,,,,,;AT 11,8;"YOU HAVE NO AIR" AND (a<1);AT 12,4;"YOU ARE LOST IN SPACE!";AT 13,6;"FOREVER ...UNLESS";AT 14,2;"SOMEONE TYPE RUN 10 + ENTER";AT 15,6;"LEVEL:";l;"  POINTS:";d: STOP 
8 LET l=l+1: LET q=75*(1+l): LET s=q: LET r=2: LET b=10: LET a=100: LET f=0: LET z=l>1 AND l<21: BEEP 2,10: CLS : PRINT AT 7,5;o$;AT 8,6;"MOVE: O-P   BOOST: A": PRINT AT 15,3;q$;d: PRINT AT 10,2;p$ AND (z=1);AT 10,19;STR$ l AND (z=1): PRINT PAPER 4; FLASH 1;AT 11,4;n$ AND (l=21): PAUSE 50: PAUSE 0: GO TO 1+10*(l=21)
9 LET b=b*(b<11)+10*(b>10): NEXT i: GO TO 1: DATA "THIS IS STARSHIP    , FIND 21","PRESS ANY KEY.  POINTS:"
10 RESTORE : READ x,y,v,w,b,a,l,d,k: DIM l$(5,31): DIM m$(5,31): READ n$,o$,p$,q$: FOR i=1 TO 5: LET m$(i)="     "+CHR$ 16+CHR$ 6+CHR$ 19+CHR$ 0: READ m$(i,12 TO ): NEXT i: DATA "\::\::\:.","\.'\.'\.'\::\::\::\::\::\::\..","\::\::\::\: \ :\: \ :\: \: \::\: ","\'.\'.\'.\::\::\::\::\::\::\''","\::\::\:'": PAPER 0: BORDER 0: INK 7: GO TO 8

***Line sizes**********************************************************

The game is presented to category EXTREME-256.  To count the number of characters in every line, first I will do the count without abbreviations.  And only in those lines having initialy more than 256 characters, I will use the rule for abbreviations in ZX Spectrum:
Every letter that is at the beginning of a new line or immediately after a colon ":" or the statement "THEN" is immediately replaced by the corresponding command by the ZX Spectrum interpreter, as follows:
a = NEW     n = NEXT     b = BORDER     o = POKE     c = CONTINUE     p = PRINT     d = DIM     q = PLOT  e = REM     r = RUN      f = FOR        s = SAVE     g = GO TO        t = RANDOMIZE h = GO SUB  u = IF    i = INPUT   v = CLS      j = LOAD       w = DRAW     k = LIST         x = CLEAR     l = LET     y = RETURN m = PAUSE   z = COPY

I use BasinC as Ide, and solid blocks characters are replaced in the source code by a combination of 3 characters beginning by “\”.
For counting purposes I will replace those 3 chars by a single “\”
Following those criteria all lines are under 256 characters:

***The lines with abbreviations are the following:
1Lm=1+INT (RND*26):Ln=1+INT (RND*3):Lo=INT (RND*5):Fi=1 TO 5:Lp=(RND*30)*(f=0):Ll$(i)=""+m$(i) AND f=1:Ll$(i,1+p)=".":pAT r-1,0;" ":Lr=21-(q*20)/s:Lr=r*(r<21)+21*(r>21):pBRIGHT 1; INVERSE 1;AT r,0;"A";AT 20,0;"|";AT 21,0;"S";
2o23692,9:Ln=n+6*(q<1):pl$(i):pBRIGHT 1;AT 21,m;("\"+"\\\\"( TO RND*4)+"\") AND (n=i):pBRIGHT 1;AT 21,m;("\"+"\\\\"( TO RND*4)+"\") AND (n+1=i):pINK 5;AT 21,m+2;"O" AND (o>2)*(n+2=i):p
3pAT 0,0;"Boost:"; PAPER 4;"          "( TO B); PAPER 2;"          "( TO 10-B):pAT 0,17;"Air:";a;" "; OVER 1;AT 0,21; PAPER 5;"          "( TO a/10); PAPER 2;"          "( TO 10-(a/10)):Ik=1 THENIb>0 THEN OUT 254,22: OUT 254,16: OUT 254,0
4Lk=IN 65022=190:Ly=y-1+2*(k=1)*(b>0)-1*(k=0):Lx=x+((IN 57342=190)-(IN 57342=189))*(x>0)*(x<31):Lw=w-1:Lb=b-1*(k=1)*(b>0)+2*(k=0)*(b<10):Lz=(w<>y) OR (v<>x):Ld=d+1:I(q<1 AND i=5) THENLf=f+1
5Lg=(ATTR (y,x)>64) OR (ATTR (y+1,x)>64) OR (y>19):Ly=w*g+y*(g=0):Lg=ATTR (y,x):Lh=ATTR (y+1,x):Lx=v*(g>64)+x*(g<64):La=a-1+16*((g=5) OR (h=5)):La=a*(a<=100)+100*(a>100)
6pAT w,v;" " AND z;AT w+1,v;" " AND z; INK 3;AT y,x;"W";AT y+1,x;"o":Lv=x:Lw=y:Lq=q-1:Lc=9-2*(y<1 OR a<1)-1*((g=6) OR (h=6)):Gc: DATA 15,17,15,17,10,100,0,0,0,"WELL DONE YOU ARE ALIVE!","### ASTRONAUT KERL ###"
7Fi=1 TO 30: BEEP .03,i+10:Ni:pFLASH 1; PAPER 2;AT 11,0;,,,,,,,,,,;AT 11,8;"YOU HAVE NO AIR" AND (a<1);AT 12,4;"YOU ARE LOST IN SPACE!";AT 13,6;"FOREVER ...UNLESS";AT 14,2;"SOMEONE TYPE RUN 10 + ENTER";AT 15,6;"LEVEL:";l;"  POINTS:";d: STOP 
8Ll=l+1:Lq=75*(1+l):Ls=q:Lr=2:Lb=10:La=100:Lf=0:Lz=l>1 AND l<21: BEEP 2,10:v:pAT 7,5;o$;AT 8,6;"MOVE: O-P   BOOST: A":pAT 15,3;q$;d:pAT 10,2;p$ AND (z=1);AT 10,19;STR$ l AND (z=1):pPAPER 4; FLASH 1;AT 11,4;n$ AND (l=21):m50:m0:G1+10*(l=21)
9Lb=b*(b<11)+10*(b>10):Ni:G1: DATA "THIS IS STARSHIP    , FIND 21","PRESS ANY KEY.  POINTS:"
10 RESTORE : READ x,y,v,w,b,a,l,d,k:Dl$(5,31):Dm$(5,31): READ n$,o$,p$,q$:Fi=1 TO 5:Lm$(i)="     "+CHR$ 16+CHR$ 6+CHR$ 19+CHR$ 0: READ m$(i,12 TO ):Ni: DATA "\\\","\\\\\\\\\\","\\\\\\\\\\\","\\\\\\\\\\","\\\": PAPER 0:B0: INK 7:G8

Download

Download
astrokerl.tap 3.3 kB
Download
astrokerl.bas 2.5 kB
Download
astronaut-kerl-instructions.pdf 185 kB
Download
astronaut-kerl-code-explanation.pdf 44 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.