Classic Computer Magazine Archive COMPUTE! ISSUE 60 / MAY 1985 / PAGE 40

Space Dodger

Matthew Marullo

Try to evade menacing alien ships in this fast, colorful action game. Originally written for the T1-99/4A with Extended BASIC, adaptations have been added for the Commodore 64, unexpanded VIC-20, Apple II series, and Atari. The Commodore, Apple, and Atari versions require a joystick.

Get ready for a game which demands extremely sharp eye-hand coordination and judgment of time and distance. "Space Dodger" is an addictive test of your physical reflexes.

When you type RUN, there's a brief wait while the program initializes. Then the game opens with your spaceship on the left side of the screen, superimposed over a random starfield. On the right side of the screen is a lineup of several colorful alien ships. When the action starts, the aliens begin moving toward your ship at different speeds. Your job is to avoid a disastrous midspace collision that will turn your vessel into a lump of smoking metal.

To dodge the reckless aliens, you'll have to move up or down. But don't move too far and try to escape the screen—the boundaries are guarded by cuboids (cube-shaped asteriods) zipping along at the speed of light. The cuboids are even more dangerous than the alien ships because they travel too fast to dodge.

Moving Up The Ranks

The longer you evade the oncoming aliens, the more points you gain. However, you won't see your final score until you crash and the game ends. At that time you're also ranked according to your value to the Space Service: Space Cadet, Corporal, Sergeant, Captain, or Major.

Every time you advance a rank, the game pauses briefly before it continues to the next level. When it restarts, you'll notice the alien ships fly across the screen even faster. Your score adds up faster, too.

But beware—Space Dodger is not as easy as it looks. Chances are you'll play for quite a while before you even advance beyond Space Cadet.

TI Version

Control your ship with the keyboard: Press the E key to move up, the X key to move down. You can achieve finer control by repeatedly tapping the keys, rather than holding them down.

Space Dodger is one of the fastest BASIC games we've seen for the TI, and it makes good use of the built-in sprite graphics and collision detection.

Commodore 64/VIC-20 Versions

Plug a joystick into port 2 on the Commodore 64. When the game begins, press the joystick forward to move your ship up, and pull it back to move down.

Joystick controls on the VIC are the same as on the 64. Before loading Space Dodger, be sure to unplug any cartridges. VIC Space Dodger is in two parts. Program 3 is the loader, which creates the custom characters, then loads and runs Program 4. Type in and save both programs, using the filename "SD" when saving Program 4. If you are using tape, save Program 4 on the same tape, immediately after Program 3. Tape users also need to change, 8 to ,1 in line 30 of Program 3.

Both Commodore versions include three additional ranks beyond the lower levels—Lieutenant, General, and Master. The ships are created with multicolor sprites on the 64 and custom multicolor characters on the VIC. Ring modulation and filtering help produce the 64 version's uncanny sound effects.

Apple Version

Written entirely in machine language, Apple Space Dodger works on any Apple II series computer with any version of Apple DOS. The machine language in Program 4 must be entered with the Apple's built-in machine language monitor. You don't need to understand machine language to enter the program.

To type in Program 5, first enter the monitor by typing CALL—151. The Applesoft prompt (normally a]) will be replaced by the monitor's prompt, an asterisk (*). To enter a line from the listing, first type in the four-digit hexadecimal number, then type a colon (:) instead of the hyphen shown in the listing. This is the address where you'll enter the rest of the line. Type in the rest of the line after the colon, leaving a space between each two-digit number. After eight numbers, press RETURN and continue to the next line. If you want to review what you've entered to check for accuracy, you can list a block of data by typing the address of the first location in the range, then a period, then the last address, and then RETURN.

When you're done typing the program, save it on disk with this command:


Because it's difficult to type a listing this long without making errors, we've included a small checksum program (Program 6) which detects typos. To use it, load the machine language program from disk by entering BLOAD SPACE.DODGER, then run Program 6. If you have made a typo, it will tell you where to look to find the mistake.

When Program 5 is error-free, save a copy on disk. Then run it by typing BRUN SPACE.DODGER. Plug in a joystick, and push forward on the joystick to move your ship up, or pull back on the stick to move down. You have a total of three ships in each game.

Atari Version

Atari Space Dodger works on the 400/800, XL series, and new XE series computers. With a joystick plugged into port 1, you can push the stick forward to move your ship up, and pull back to move the ship down.

The Atari version's multicolored alien ships are created with an unusual implementation of player/missile (P/M) graphics. Ordinarily, the Atari can display a maximum of only four player shapes (or five if you combine the four missiles into an additional player). Each player can be only one color and is limited in width, but can be as tall as the entire screen. But in Space Dodger, one player is used for your ship, and the remaining three players are cleverly combined to make 12 multicolor alien ships.

The program takes advantage of a technique which allows multiple colors in overlapping players. All three alien players begin at the same horizontal location and are assigned different colors. The P/M shape data is then defined so that visible portions of the underlying alien players can be seen through "holes" in the overlapping players. Thus, each ship is actually a three-colored conglomerate of overlapping shapes. To create the effect of separate ships, the remaining P/M data is filled with zeros to make blank zones between each alien craft.

The result is 12 multicolor ships, but without additional programming tricks, they'd all have to move in unison. Moving one alien player without the others would destroy the carefully arranged multicolor effect.

To move the aliens at different speeds and horizontal locations, Space Dodger uses display list interrupts. Briefly, the Atari display list is a set of instructions that tells the computer what to display at a given point on the screen as the TV's raster beam sweeps from top to bottom. By manipulating the display list with machine language routines, Space Dodger makes its three overlapped players act like a dozen independently mobile shapes.

The fast, smooth motion of the alien ships is achieved by moving them only during the Atari's vertical blank interrupt (the short interval during which the TV's raster beam moves from the bottom of the screen to the top to scan another frame). Naturally, machine language is also needed to make this work.

You can learn more about using both types of interrupts in De Re Atari, published by Atari Computers, Inc., as well as COMPUTE!'s First Book of Atari and COMPUTE!'s First Book of Atari Graphics.

Program 1: TI Space Dodger

Reckless alien ships hurtling through space make life hazardous in "Space Dodger" (TI version).