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

Barrier Battle

Heath Lawrence

Here's an exciting, challenging game for the VIC, 64, TRS-80 Color Computer, Atari, and Apple. Try to outwit your opponent and plan ahead—things get dicey at the end.

An article about writing arcade-style games (COMPUTE!, February 1983) piqued my curiosity enough to make me write this simple, but challenging game. It uses a redefined character set and the technique of POKEing character locations from that article. I found that toying with the simple commands provided yields some satisfying results.

That tutorial did an excellent job of explaining this method, so I won't go into it in any great detail here.

The following is a basic explanation of the setup of the program and a description of game play. There is also a variable list for anybody who wants a more thorough understanding of the program.

Game Strategy

The object of "Barrier Battle" is to build barriers, using your joystick, and to cut off your opponent so that he of she runs but of room and collides with a wall or barrier.

By pressing the trigger, you can create a hole in your barrier. You can do this five times. This can be a very helpful strategy because escape routes become quite scarce near the conclusion of the conflict. At the bottom of the screen you can see how many holes each player has left.

A player is destroyed when he or she hits one of the side boundaries (the Atari symbols) or one of the player-built barriers.

The end of the game is marked by the appearance of the victorious player jumping for joy in the center of the screen. The winning player's identity is then revealed (in case of a close call) and the option to play again is offered.

Playing Tips

At the beginning of the game it is a good idea to cut yourself a large part of the playfield to maneuver in. In the long run, it is the player with the most real estate left who is victorious.

When you find yourself out of room, try pressing the trigger and moving back and forth. This will only delay the inevitable, but it may stall long enough for the other player to smash into a barrier.

Variable List
SCR Screen Memory Start address.
SIDE,WALL,BARR,BLANK Player wall and blank characters which appear on screen when POKEd into SCR.
LN Length of a single screen line.
VECTR,DIR Variables that contain current player distance and direction.
LOC,POS Current location of players.
M,N Joystick variables.

"Barrier Battle," Color Computer version.

Program Rundown (Atari Version)

Lines 94-115. Set starting address for screen memory. Assign characters to variables. Set start positions and directions for both players. Set line length.

Lines 200-240. Set stick variables. Check sticks and assign direction.

Lines 300-312. Move players. Check for collisions. Check trigger to see if hole should be created.

Lines 1000-1016. Routine to alter the char-acter set.

Lines 5000-5006. Boundary routine (from Richard Mansfield's sample program).

Lines 6000-6012. Display winner and display play again?

Lines 6030-6038. Explosion sound and game over display.

Lines 7500-7520. Instructions and opening music.

In the Atari version of "Barrier Battle," the white player is about to crash into the wall.

Notes For Commodore 64, VIC-20, TRS-80 Color Computer, And Apple Versions

Jeff Hamdani, Editorial Programmer

In "Barrier Battle," you must maneuver your barrier in an effort to contain jour opponent. The fire button on the joystick (or the space bar for the versions using keyboard) allow. you to leave spaces (holes) within your barrier Clever use of this, feature lets you corner your opponent and still leave yourself a means of escape You can create a maximum of five holes in each game.

The VIC and 64 versions of Barrier Battle are similar to the Atari version. However, in the Commodore versions, the characters are not redefined. Instead, the existing graphic characters are used to draw the borders and the barriers. After you or your opponent crashes, the winner is picked, and you are asked if you want to continue or quit. To continue, press the trigger button on your joystick, or press the Q key to quit. Since only one joystick can be used on the VIC-20, the second player must use keys I, J, K, and M to move up, left, right, and down, respectively.

Like the Commodore versions, the TRS-80 Color Computer version draws the barrier with existing graphic characters. In this version, use the left and right joysticks and their fire buttons for movement and spacing, respectively.

Unlike the other versions, Barrier Battle on the Apple is over when you or your opponent wins four rounds. The barriers are drawn on the low-resolution graphics screen. Paddles were chosen to control each player's movement Direction is based upon the change of the values in functions PDL(0) and PDL(1). A positive change of more than eight units will move you to the right. A negative change of more than eight units will turn you to the left. If you find that the paddles are too sensitive (or not sensitive enough), increase or decrease this number (8) in lines 340 and 400 to suit you.

Players have gone opposite ways in the Apple version of "Barrier Battle."