A downloadable game

10 Line BASIC Challenge    

=======================

Category : PUR-80 

TITLE    : Probe

PLATFORM : Oric Atmos

AUTHOR   : RAX

LANGUAGE : BASIC 1.1b

VIDEO    :

-------------------


Story:

You are a cadet at the Space University. To defend your diploma, you must board the simulator and demonstrate skills in spacecraft management.

You have to make your way in space between the stars and the newly formed small galaxies.

-----------------------

CODE:
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
6IFRND(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
RUN

0PAPER0:INK7:FORA=0TO15:READV:POKE47368+A,V:NEXT:DATA0,28,56,63,63,56,28,0,54

    PAPER0 - set screen color black

    INK7 - set int white

    FORA=0TO15:READV:POKE47368+A,V:NEXT - change charset (sprites)

    DATA0,28,56,63,63,56,28,0,54 - character definition data 

========================

1HIRES:POKE#26A,10:Q=14:P=-14:X=231:Y=100:M=0:L=0:W=200:H=200:DATA0,25,45,14

    HIRES - switch to hires screen mode

    POKE#26A,10 - hide command prompt and disable keyboard sound

    Q=14 - border size len 

    P=-14 - border size len (for moving backwards - bottom) 

    X=231 - player start X pos

    Y=100 - player start Y pos

    M=0 -  mode to show char (sprite); 0 - use paper color

    L=0 - level

    W=200 - max x pos of screen

    H=200 - max y pos of screen

    DATA0,25,45,14 - character definition data 

==========================

2REPEAT:CURSETX,Y,3:CHAR33,1,0:K$=KEY$:Y=Y+(K$="A")-(K$="Z"):X=X+1:GOSUB6

    REPEAT  -   start iteration

    CURSETX,Y,3 - set player position

    CHAR33,1,0  - print chip

    K$=KEY$ -  read key

    Y=Y+(K$="A")-(K$="Z") - change player Y pos

    X=X+1   -   change X pos +1

    GOSUB6  - subroutine "create new galaxy"

=========================

3IFX=232THENX=12:Y=RND(1)*160+20:INKRND(1)*7+1:GOSUB8:L=L+1:CLS:PRINT"Level:"L

    IF X=232 THEN - if player X is at the end ot the screen 

        X=12    - new player X pos

        Y=RND(1)*160+20 - random Y pos

        INKRND(1)*7+1 - random screen color

        GOSUB8  - subroutine "print border and create stars"

        L=L+1 - level up

        CLS - clear text box (3 lines of end of the screen)

        PRINT"Level:"L - print level

========================

4CURSETX,Y,3:CHAR33,1,1:IFK$=" "THENZAP:M=1:GOSUB7:M=0:GOSUB7:DATA32,29,0

    CURSETX,Y,3 - set player pos

    CHAR33,1,1 - print player char (sprite)

    IFK$=" "THEN - if is pressed space

        ZAP - laser sfx

        M=1 - set the laser visualization mode ( 1 - show ) 

        GOSUB7 - print laser subroutine

        M=0 - set the laser visualization mode ( 0 - delete ) 

        GOSUB7 - print laser subroutine

        DATA32,29,0 - - character definition data 

========================

5T=X+6:UNTILPOINT(T,Y+2)ORPOINT(T,Y+3)ORPOINT(T,Y+4)ORPOINT(T,Y+5):EXPLODE:END

    T=X+6 - calc X pos right of the ship

    UNTILPOINT(T,Y+2)ORPOINT(T,Y+3)ORPOINT(T,Y+4)ORPOINT(T,Y+5) - until the player collides with a star 

    EXPLODE - explosion sfx

    END - end

========================

6IFRND(1)*100<3THENCURSETRND(1)*W+30,RND(1)*190,3:CHAR34,1,1:RETURNELSERETURN

    new galaxy subroutine

    IF RND(1)*100 < 3 THEN -if rand(1-100) < 3 then create galaxy

        CURSET RND(1)*W+30,RND(1)*190,3 - set random galaxy pos

        CHAR34,1,1 - sprint galaxy char (sprite)

        RETURN - return

    ELSE

        RETURN - return

========================

7CURSETX+6,Y+3,M:T=60+(X>170)*(X-170):DRAWT,0,M:DRAW1,1,3:DRAW-T,0,M:RETURN

    laser subroutine

    CURSETX+6,Y+3,M - set laser position right of the ship

    T=60+(X>170)*(X-170) - calc laser len

    DRAWT,0,M - draw 1st len

    DRAW1,1,3 - move y+1 pos

    DRAW-T,0,M - draw 2nd len (backward)

    RETURN - return

========================    

8PING:CURSET10,0,3:FORA=0TO7:DRAWQ,Q,1:DRAWQ,P,1:NEXT:DRAW0,199,1:FORA=0TO7

    subroutine "print border and create stars"

    PING - ring bell sfx

    CURSET10,0,3 - set start pos

    FORA=0TO7 - draw 7 couples of lines (top)

        DRAWQ,Q,1 - 1st line 

        DRAWQ,P,1 - 2nd line 

        NEXT - next

    DRAW0,199,1 - draw a vertical line on the right side of the screen 

    FORA=0TO7 - draw 7 couples of lines (bottom)

=======================

9DRAWP,P,1:DRAWP,Q,1:NEXT:FORA=0TO99:CURSETRND(1)*W+30,RND(1)*H,1:NEXT:RETURN

        DRAWP,P,1 - 1st line 

        DRAWP,Q,1 - 2nd line

        NEXT - next

    FORA=0TO99 - print 99 star

        CURSETRND(1)*W+30,RND(1)*H,1 - print random star

        NEXT - next

    RETURN


Download

Download
PROBE.tap 591 bytes
Download
probe.txt 5.4 kB

Install instructions

INSTALLATION INSTRUCTIONS

1. Download the zip file from here: http://www.petergordon.org.uk/oricutron/files/Oricutron_win32_v12.zip

2. Copy the file PROBE.TAP to the Oric\tapes folder

3. Start the emulator oricutron.exe

4. Type CLOAD"PROBE.TAP" and press enter

5. LIST to show the program

6. Type RUN to play the game

Keyboard controls: 'A'=UP, 'Z'=DOWN, 'SPACE'=FIRE

Development log

Leave a comment

Log in with itch.io to leave a comment.