16K Cassette 24K Disk
by Glen Raffel
Arcade quality games don't necessarily have to be written in machine language. BASIC still holds opportunity for fast-paced games with colorful graphics. Siege contains several time-saving routines that speed up the action.
The player/missile graphics are contained in strings. By overlapping the string memory and the player/missile memory, you can use the quick Atari string commands to move the players. However, that only takes care of vertical motion. For horizontal motion, I wrote a short machine language program to read the joystick and move the player from side to side. This routine also eliminates the need for several time-consuming IF...THEN statements.
Instead of a normal playfield, I used redefined characters in GRAPHICS 2. I didn't have to transfer the entire character set into RAM because I only need a few characters for the display. Also, programs run considerably faster in GR.2 than in GR.7, GR.8, or even GR.0. The colors in GR.2 are just as varied as GR.7, and, with the four player colors, the screen comes alive. Finally, I used a flag variable to tell if a rock had been dropped, thus eliminating more IF ... THEN statements from the main loop.
You are the sole defender of the Trausberg castle wall. Hundreds of unwashed barbarians are swarming at the base of the wall. They are scaling the walls in a desperate attempt to invade the castle. Fortunately, you are equipped with an enormous supply of boulders, which you can drop on their heads to stave off their vicious assault.
You can move your man across the screen with the joystick. The trigger button releases the boulders. You start with three men, and your remaining men are displayed in the lower right corner of the screen. The START button begins the game. At first the game might seem easy, but after each round the barbarians move even faster. The fate of Trausberg is in your hands...
A | Dummy variable |
A$ | Sky characters |
B | Location of character set |
BASE | Hi Byte of new character set |
BOMB$ | Shape of the bomb |
BOMBY | Y position of bomb |
C$ | Wall top characters |
D$ | Start of P/M memory |
E | Loop variable |
E$ | Brick characters |
F$ | P/M buffer |
FL | Bomb drop flag |
L | Level |
M$ | Missile memory |
MAN$ | Shape of man |
MANX | X position of man |
MANY | Y position of man |
MEN$ | No. of remaining men |
P0$, P1$, P2$, P3$ | Respective player memory |
PM$ | Beginning of P/M memory |
S1$ | First monster shape |
S2$ | Second monster shape |
S1X | First monster x position |
S2X | Second monster x position |
S1Y | First monster y position |
S2Y | Second monster y position |
T | Loop variable |
V | X position of bomb |
X | Timing loop |
Z | Rate of ascent |
1 DATA 632,642,714,613,158,813,138,987
,800,486,365,447,413,317,70,7595
60 DATA 414,320,69,792,990,59,576,313,
540,479,91,571,480,614,715,7023
1199 DATA 539,927,383,568,701,79,443,9
43,793,349,381,276,800,868,129,8179
1330 DATA 343,443,456,453,238,668,929,
600,354,190,735,797,501,595,757,8059
1480 DATA 31,495,485,143,879,437,370,2
11,538,616,198,450,353,14,187,5407
5020 DATA 286,669,341,1296