A downloadable game

Category : PUR-80 

TITLE    : Subscan

PLATFORM : Oric Atmos

LANGUAGE : BASIC 1.1b

AUTHOR   : RAX

VIDEO    :

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

HISTORY:

This is a demake of the game Sub Scan for the Atari 2600.

In SubScan, the player controls a destroyer ship that moves horizontally across the ocean surface. The objective is to drop depth charges (torpedoes) to destroy enemy submarines moving below.

Submarines travel at different depths and changing speeds, making the game more challenging. The player must time their bomb drops carefully to hit the targets, as torpedoes fall slowly.


Gameplay Mechanics:

The movement speed of submarines will gradually increase from 0.5 to 1 - this prevents the player from predicting the perfect bomb drop timing and slightly increases the difficulty over time.

Do not drop two or more torpedoes in the same vertical column, as they create too much sound turbulence, allowing enemy submarines to detect and avoid them.

All ship systems are highly sensitive, so the correct key press duration must be applied when launching torpedoes and bombs.

The Bomb - Deep Reaper

The game features a tactical weapon called Deep Reaper.

Deep Reaper is the player's ultimate weapon, which can only be activated three times per game. When triggered, the system sacrifices one of the active (deployed) torpedoes, breaking it down into energy particles and transforming it into a destructive underwater pulse. This pulse instantly destroys an enemy submarine, if any, at the lowest level. If no submarine is in range, the radiation lingers on the ocean floor for a short time, potentially destroying a future submarine that crosses its path.

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


KEYS:

Arrow keys - Move left and right

Spacebar - Launch torpedo

Enter - Activate bomb

The maximum number of torpedoes on the screen is 4.

Scoreboard - There are three types of numbers on the scoreboard:

1.The leftmost digit shows the number of submarines remaining before the game ends (can also be considered as lives).

2.The middle digit displays the remaining Deep Reapers.

3.The rightmost digit shows the number of destroyed submarines, which can be considered as the player's score.

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

CODE:

0---------1---------2---------3---------4---------5---------6---------7-----78
0POKE#26A,10:PAPER4:CLS:D$="#')9b_B2/bb/bVbb#+;=b2a[#'1bb2##<bba>####7?+"'</bba>
1FORA=1TO48:T=ASC(MID$(D$,A,1))-35:POKE#B517+A,T:PLOT0,A/5,22:NEXT:PLOT2,9,0''
2X=20:INK7:Z$="   ":E$=" &'":L=10:P=.6:PLOT1,0,6:B=3:REPEAT:P=P-(.0002*(P<1))'
3X=X-(K=188ANDX<33)+(K=172ANDX>3):IFY(I)=0THENIFK=132THENY(I)=10:X(I)=X+2ELSE6
4XB=X(I):PLOTXB,Y(I),32:IFSCRN(XB,Y(I)+1)>32THENC=Y(I)+1:Y(I)=0:GOTO6'''''''''
5Y(I)=(Y(I)+1)*-(Y(I)<22):IFK=175ANDBTHENB=B-1:C=22:Y(I)=0ELSEPLOTXB,Y(I),40''
6IFW(I)=0THENIFRND(1)>.96THENW(I)=13+I*3:Q(I)=3:PING:PLAY1,0,1,7000ELSE8''''''
7PLOTQ(I),W(I),E$:Q(I)=Q(I)+P:IFQ(I)>35THENPLOTQ(I),W(I),Z$:W(I)=0:L=L-1''''''
8IFCTHENFORA=0TO3:Z=W(A):IFC=ZTHENSHOOT:PLOTQ(A),Z,Z$:W(A)=0:C=0:S=S+1ELSENEXT
9?@14,25;L;B;S:I=(I+1)*-(I<3):PLOTX,9," #$% ":K=PEEK(#208):UNTILL=0'''''''''''

0   POKE #26A,10  ' Stop system blinking cursor and the sounds when pressing a key

    PAPER 4       ' Sets the background color of the screen to blue

    CLS           ' Clears the screen

    D$ = "#')9b_B2/bb/bVbb#+;=b2a[#'1bb2##<bba>####7?+"  </bba>

                  ' D$ is a string containing encoded sprite data.


1   FOR A = 1 TO 48 ' Loop that modifies sprites/characters and draws the sky

        T = ASC(MID$(D$, A, 1)) - 35  

                  ' Takes the A-th character from D$, converts it to ASCII, and subtracts 35 to get a numeric sprite line value

        POKE #B517 + A, T  

                  ' Stores value T in memory at address #B517 + A

        PLOT 0, A / 5, 22  

                  ' Draws a pixel at column 0, row A/5 with attribute 22 (cyan color)

    NEXT

    PLOT 2, 9, 0  ' Sets an attribute at coordinates (2,9) with color 0 (INK = black), this is the line with the ship.


2   X = 20        ' Sets the player's initial horizontal position X

    INK 7         ' Sets the ink color to 7 (white) for the entire screen

    Z$ = "   "    ' Defines an empty string with three spaces (used to clear screen elements)

    E$ = " &'"    ' Symbols representing enemy/submarine

    L = 10        ' Initial value of L (number of submarines that can be missed)

    P = .6        ' Initial value of P (speed of submarine movement)

    PLOT 1, 0, 6  ' Draws a pixel at (1,0) with cyan color

    B = 3         ' Sets bomb counter

    REPEAT        ' Game loop

        P = P - (.0002 * (P < 1))  

                  ' Increases P by 0.0002 if P is greater than 1 - this is the submarine speed


3       X = X - (K = 188 AND X < 33) + (K = 172 AND X > 3)  

                  ' Moves X based on keyboard input (188 and 172 are left and right arrow keys)

        IF Y(I) = 0 THEN    ' If Y(I) is 0 (no active bomb dropped by the player) 

            IF K = 132 THEN ' If key 132 (fire) is pressed

                Y(I) = 10   ' Starts moving down

                X(I) = X + 2  ' Sets the object's X position relative to the player

            ELSE  

                6           ' GOTO 6, skips torpedo movement


4       XB = X(I)           ' Temporary variable for the current torpedo position

        PLOT XB, Y(I), 32   ' Clears the torpedo at position (XB, Y(I))

        IF SCRN(XB, Y(I) + 1) > 32 THEN  

                  ' Checks if there is a submarine below the torpedo

            C = Y(I) + 1  ' Stores value C (this is the screen row where the torpedo collides with the submarine)

            Y(I) = 0  ' Stops torpedo movement

            GOTO 6  ' Jumps to label 6


5       Y(I) = (Y(I) + 1) * -(Y(I) < 22)  

                  ' Increases Y(I), but limits it to 22 (screen boundary)

        IF K = 175 AND B THEN  

                  ' If key 175 (enter) is pressed and bombs remain (B > 0)

            B = B - 1  ' Decreases the bomb count

            C = 22  ' Sets C to 22 (position of the bottom row for explosion)

            Y(I) = 0  ' Stops torpedo movement

        ELSE  

            PLOT XB, Y(I), 40  

                  ' Draws the new torpedo position (40 = modified sprite of the torpedo)


6       IF W(I) = 0 THEN            ' If W(I) = 0 (no active enemy at this position)

            IF RND(1) > .96 THEN    ' 4% chance to spawn a new enemy

                W(I) = 13 + I * 3   ' Sets initial value for W(I)

                Q(I) = 3            ' Defines initial enemy position

                PING                ' Plays a bell sound as preparation for the next command

                PLAY 1,0,1,7000     ' Plays a continuous sonar-like sound

            ELSE  

                8  ' GOTO 8  Jumps to label 8 if no enemies are on screen


7       PLOT Q(I), W(I), E$  

                  ' Erases the enemy from the screen

        Q(I) = Q(I) + P  

                  ' Moves the enemy to the right

        IF Q(I) > 35 THEN  

                  ' If it moves off-screen

            PLOT Q(I), W(I), Z$  

                  ' Clears its old position

            W(I) = 0  ' Resets its position

            L = L - 1  ' Decreases remaining submarines


8       IF C THEN           ' If there is a collision (C is set)

            FOR A = 0 TO 3  ' Loop through all submarine positions

                Z = W(A)    ' Temporary variable for the current submarine X position

                IF C = Z THEN  ' If C matches W(A) (enemy is hit)

                    SHOOT  ' Plays shooting sound

                    PLOT Q(A), Z, Z$  ' Clears the enemy

                    W(A) = 0  ' Removes the enemy

                    C = 0  ' Resets collision

                    S = S + 1  ' Increases score

                ELSE  

                NEXT

  

9       ?@14,25;L;B;S           ' Displays values of L (remaining submarines), B (bombs), and S (score) on screen

            I = (I + 1) * -(I < 3)  ' Updates index I for the next iteration of submarines and torpedoes

            PLOT X, 9, " #$% "      ' Draws the player

            K = PEEK(#208)          ' Reads keyboard input

    UNTIL L = 0  ' Continues loop until all submarines are gone



Main Variables:

D$ - String array containing encoded characters, which are decoded during program execution.

A - Loop counter used for iterating through D$ and various operations in the program.

T - Temporary variable storing the numerical value of ASCII characters from D$ after modification.

X - Player’s horizontal position on the screen.

Y(I) - Vertical position of a torpedo.

X(I) - Horizontal position of a torpedo.

XB - Variable storing the temporary horizontal position of a torpedo.

C - Variable used for handling collisions or interactions with objects.

P - Movement speed of an object or player, decreasing over time for more realistic physics.

B - Number of available bombs.

L - Number of remaining submarines. Can also be viewed as number of lives.

S - Score counter / number of destroyed submarines.

K - Keyboard input reader.

I - Index used in loops and for managing arrays related to torpedoes and submarines.

W(I) - Vertical position of an enemy submarine.

Q(I) - Horizontal position of an enemy submarine.

Z - Temporary variable used in the loop for collision detection.

E$ - String containing special characters for submarine sprites.

Z$ - Empty string used for clearing characters from the screen.

Published 19 days ago
StatusReleased
AuthorBASIC 10Liner
GenreAction
Tags10liner, 8-Bit, basic, oric-atmos

Download

Download
SUBSCAN.tap 665 bytes
Download
subscan.txt 9.6 kB
Download
code.jpg 163 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 SUBSCAN.TAP to the Oric\tapes folder

3. Start the emulator oricutron.exe

4. Type CLOAD"SUBSCAN" and press enter

5. LIST to show the program

6. Type RUN to play the game

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

Comments

Log in with itch.io to leave a comment.

Impressive, very good!

Very nice! :)

very good