Classic Computer Magazine Archive COMPUTE! ISSUE 46 / MARCH 1984 / PAGE 92

TRIDENT

C O. Dickerson

Join the crew of the USS Trident as they test their skills to the limit in a naval simulation. As missile officer, you have only a limited arsenal available to stop wave after wave of enemy missiles. Joystick required for Atari and 64. The 64 version must be entered using MLX (presented elsewhere in this issue). See the "Automatic Proofreader" article on page 60 before typing in this program.

You are missile officer aboard the USS Trident, the world's newest and most powerful nuclear submarine. Suddenly, the Priority One Channel signals a red alert: The enemy has launched an all-out attack.

You don't know it, but this is actually a drill. Since the Trident is completely computerized, your only information on the world outside the sub comes from your status console. It's a simple enough matter to keep missile officers like you on their toes: Program the computers to simulate an attack.

You're not only fighting for your theoretical country, but for that next promotion, too!

The enemy missiles come in waves, increasing in number and speed with each new attack. You must meet this massive assault alone, matching the speed and power of your computer against an onslaught of simulated juggernauts. Your defensive missiles can hover in ambush or rocket through the atmosphere at twice the speed of anything the enemy can launch against you. But even with such weapons at your disposal, you know that lightning reflexes and all your skill will be required to repel the attack.

Inside The Trident Computer

"Trident" is an arcade-style game making extensive use of machine language. It will run in 24K RAM on the Atari. Three machine language routines are used, stored in a string. A$ contains "Textplot II" by Mark Grebe (COMPUTE!, December 1982); it is used to place numerical data in the various screen readouts. M$ contains D. K. Titchenell's MOV$ (COMPUTE!, March 1983). This routine speeds up initialization and clears the P/M graphics area. The third routine, stored in D$, is the actual game routine. It reads the joystick, keeps track of the incoming missiles, homes them in on the target, handles their movement, and detects collision.

If all is well, D$ returns a 17 PEEK(207), directing the program to reexecute the routine. A 16 indicates a missile has gotten through and the game is over. A value of 1-15 is returned when an incoming missile is destroyed. This number is used to indicate which missiles were destroyed and to compute the score.

Because this program does make extensive use of machine language, a five-line BASIC routine is included (beginning at line 1000) to aid in verifying each DATA line. After entering the program and before typing RUN, type GOTO 1000. If screen output matches the chart below, DATA statements have been entered correctly; you can delete lines 1000-1020 and RUN the program. If there is a discrepancy, the line with the incorrect DATA will be indicated by the number to the left.

Line No. Check No. Line No. Check No.
515 4701 585 3829
520 4304 590 4282
525 4139 595 4278
530 4147 600 4378
535 4403 605 4480
540 4417 610 4003
545 4465 615 4648
550 4191 620 4718
555 4416 625 4685
560 4733 630 4365
565 4620 635 1094
570 4609 640 4931
575 4714 645 2326
580 2841

Launching Your Missile

To stop the incoming wave of enemy missiles, release an antimissile from your base (centered in the radar grid) by pressing the fire button on joystick 1. Use the joystick to direct the antimissile toward the nearest incoming missile as shown on the radar screen. Once you have picked off the incoming missile, you are ready to release another antimissile from your base. Be sure to keep your antimissiles on the radar grid.

If you destroy all missiles in an incoming wave, you move to a higher difficulty level where the frequency and speed of the missiles are increased. If you lose, start over by hitting the fire button.

Console Indicators (from top to bottom)

Number of antimissiles launched

Score

Number of missiles in the wave and number of missiles destroyed

Incoming missile speed

Scoring begins at two points for each incoming missile destroyed, increasing by one with each new speed level. A bonus is given for each antimissile not used during the wave. Thus, if each hit counts four points and you are able to destroy four incoming missiles using only three antimissiles, your score for that wave is 20 (4 points for each missile destroyed plus a bonus of 4 points for the antimissile you didn't use).

Incoming missiles speed toward the base at center screen in the Atari version of "Trident."

Notes On The Commodore 64 Version

Kevin Martin, Editorial Programmer

To stop the incoming missiles, you must direct your defensive missile to its target with a joystick plumed into port 2. Once you destroy one of the enemy missiles, preparations are made by the computer to launch another antimissile. If you destroy all the incoming missiles in one attack wave, you are moved on to a higher difficulty level where the speed of the incoming missiles is increased. If you lose you can start over by pressing the fire button.

The (64 version of "Trident" is similar to the Atari version. It is written entirely in machine language and must be entered with MLX, the machine language editor program found elsewhere in this issue. Re sure you read the MLX article and understand how to use that program before you start typing the data for Program 2. MLX requires that you input the starling and ending addresses for your machine language. For Trident, the starting address is 49152 and the ending address is 51659. After typing in Trident, be sure to use the MLX Save option to store a copy of your work on tape or disk. After saving, you can load it back into the computer by typing:

LOAD "TRIDENT",8,1 for disk

or

LOAD "TRIDENT", 1,1 for tape.
   To run Trident, type:
SYS 49152

The Commodore 64 version has one major enhancement. II allows you to choose a level of difficulty, which determines the speed of the incoming missiles. Each successive level has an increased speed. You have four choices, which can be selected by pressing the appropriate function key:

f1: Beginner
f3: Intermediate
f5: Advanced
f7: Expert