game of the month
by JAMIE SUTHERLAND
Valiant is a big, fast-scrolling maze adventure from the author of "Arena Racer" (Antic, May, 1985). You must find the Golden Sword, avoid the Invisible Ghouls, and somehow discover the Heroes' Exit. The BASIC program works on any Atari computer with 32K disk or 24K cassette.
"Beware the Invisible Ghouls! They suck the very strength from your sinews." The old man had whispered this warning last night in the the shadowy tavern. "Dimlit Forest is cursed," he croaked fearfully. "If you enter those vast, silent woods there is no way out ... except one almost too terrible to contemplate!"
But you are the daring adventurer Hardluck and you laugh in the face of terror. Already you have ridden through 500 miles of danger just to arrive at this last outpost on the edge of the dread forest.
No, words do not scare off mighty Hardluck so easily! You will seek whatever lies behind those old tales. The legendary Golden Sword, a prize worth a kingdom is said to be hidden somewhere in Dimlit Forest!
With light heart and head held. high you enter the forest. Soon the great trees of Dimilit are towering over you for mile after mile in every direction, an impenetrable green labyrinth of death. Too late you discover there truly is no way out except the one desparate route whispered to you in the tavern three long nights ago.
Now you have only one faint hope. You must find the Magic Key and use it to open the Doorway of Doom leading down to the Underground Fortress of Invisible Ghouls!
You know that once you have entered thr fortress you can begin searching for treasures and for more keys to unlock doors as you quest for the Golden Sword. Only after you have found the Sword will you seek the Heroes' Exit that is your one way out.
The Ghouls chuckle that your mighty strength will provide them with a tasty feast indeed. They bid you welcome as their bony fingers beckon you downward into the darkness ...
Check Listing 1 with TYPO II as you type it in. SAVE the program before you RUN it. Use the joystick to scroll the screen window. You can only move UP, DOWN, LEFT and RIGHT, the diagonals are not used.
You collect points for each treasure you take. But keep away from those Invisible Ghouls! Your 100 Strength Points will be ghoulishly sapped away from you until you have no strength left and die.
Your final score is based on the number of treasures you have taken and the number of Strength Points you have left.
The initial set-up is in lines 1000 to 1370. Here variables are DIMensioned and initialized, the character set is redefined, graphics modes and colors are set and the map is defined.
Lines 1350 to 1510 are small subroutines for picking up objects and erasing them, and for ending routines.
All the movement is controlled in lines 10 to 50.
10 Calls the machine language window routine.
20 Assigns the variable "S" to the value of the joystick.
30-40 Determine the direction you are trying to move in and assigns this to variables "XD" and "YD."
50 Permits movement if nothing is in the way.
60-130 Determine nature of obstruction, and act accordingly.
140 GOSUBs to the subroutine that displays your status (strength points, gold, etc.).
More experienced and adventurous programmers will be able to alter the scrolling display to suit themselves, or use it in other programs.
The machine language DATA is in lines 5000 to 5090. The fourth and fifth elements of DATA in line 5020 are the position of the window on the vldeo screen (256 * fifth element + fourth element), with 40320 being the upper-right corner of the GRAPHICS 1 screen.
The third element in line 5030 is the width of the window. This can be up to 20.
The sixth element in line 5040 is 20 minus the width of the window.
The second element in line 5050 is the height of the window * 20. The window can be up to 12 characters high.
The seventh element in 5070 is the width of the large display map. It can be up to 255. (In this case it is 70, the width of the dungeon.)
The second and third element in line 5090 is the location of the character in the center of the window, and the last in line 5080 is the internal value of the ATASII character to be used (Hardluck, spaces, doors, etc.)
The routine is called by the statement:
The DATA for the dungeon is stored in lines 5200 to 5680. It can be changed to create your own custom adventure. There are only a few guidelines to follow.
The "MAP" is stored in a 70 by 49 grid of characters in "S$." The way to set-up the DATA is to first draw the dungeon map on a piece of graph paper and then transfer it to the DATA statements. The vertical dimension of the map is limited only by your computer memory, but the horizontal dimension should remain 70, unless you change the machine routine accordingly.
The four rightmost and leftmost columns, and the top and bottom four rows must be "BRICKS," creating an outer frame.
The position of the door at the exit should remain the same, or the X, Y position check in lines 80 and 90 must be changed to suit the new position.
The lines of DATA should contain 70 characters each (these are HORIZONAL ROWS).
The following are characters used in DATA statements for the dungeon:
BRICKS = "A"
INVISIBLE GHOULS = "@"
TREES = "INVERSE L"
SPACES = "CTRL-,"
DOORS = "INVERSE CTRL-J"
KEYS = "INVERSE CTRL-C"
SWORD = "INVERSE CTRL-E"
The trees are somewhat more difficult to explain. They may be changed by inserting arbitrary numbers ranging from 1 to 32 in lines 5720 and 5730.
This is the second Antic Game of the Month from Jamie Sutherland, a Bend, Oregon high school junior. His debut, "Arena Racer," appeared in the May, 1985 issue.
Listing VALIANT.BAS Download