Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 9, NO. 10 / OCTOBER 1983 / PAGE 266

Mercury Mine: a strategy game for Atari. (can be used with 5th-6th graders) Sol Guber.

In the August, 1982 issue of Creative Computing, Mac Oglesby published a game called 'Droids for the Pet. I have taken the idea and modified the game for use on the Atari system. It is an educational game for fifth and sixth graders. My modification, Mercury Mine, includes an option to play using a joystick and an option to play against the computer.

Let me explain the game briefly. The screen display is a field of diamonds on which are four robots represented by the numbers 1, 2, 3, and 4. Any robot can pick up diamonds for any player.

The players (up to four) take turns moving the robot of their choice. You get one point for each diamond picked up, and the high score wins. The robots move in the eight directions shown on the right side of the screen. Figure 1 shows a typical start of the game. The robots begin at random locations in the field of diamonds so every game is different.

If you want the computer to play in a multiplayer game, type COMPUTER when the game asks for the name of a player.

To play the game, each person must choose which robot he wishes to mine diamonds for him. After the choice is made, he must choose which direction the robot is to go. The robot will continue in that direction until he can pick no more diamonds, that is until he encounters a blank in the field, a boundary, or another robot.

The object is to pick up the largest number of diamonds possible without giving the next person a better move than you have had. This is what makes the game fun. With four people playing, it is very hard to set yourself up for a good move because someone else will probably take advantage of the situation before it is your turn again. It is, however, possible to have teams.

The computer, when it is playing, will always pick the next best move. It will pick up as many diamonds as possible, but it does not check more than one move ahead, so it may make a foolish move that will set the next person up for an excellent move.

When the joystick option is selected, the joystick must be plugged into port 1. There is no provision for use of more than one joystick. When the joystick option is used, a black square appears on the robot numbers on the right side of the screen. The player moves the square to the appropriate robot number by moving the joystick. Pressing the trigger chooses the robots to be used in that turn.

After a short pause, the choice is written on the bottom of the screen. A pink square then appears on the directions on the right side of the screen. As the joystick is moved, the square rotates over the directions possible for motion. When the pink square is on the direction in which you wish the robot to move, the trigger is pressed.

The direction is then written at the bottom of the screen, and the robot moves in that direction, mining the diamonds until he can go no further, at which point the score is updated.

Commands can also be entered from the keyboard. When the name of the player appears, he enters the number of the robot he wishes to use and the initials of the direction in which he wants him to travel. and enable the graphics in the normal manner. The area in memory used for the player/missile area is doing double duty; it serves as the player/missile area and also as the area in memory for storage of a string variable. To fool the system into using this area for two things at once, several things must be done.

Memory locations 134 and 135 are the pointer to memory where string variables are stored. Locations 140 and 141 are the pointer to the actual data storage location. The first dimensioned variable. The system allocates memory for it and puts it into the string variable table.

The memory needed for the player/missile graphics is then calculated, and its location determined. This memory location is transformed into a hi and low address part and is stored in the variable table. Thus, when A$ is used in the program, the actual data are stored in the missile graphics area, and the changes are transformed into pictures on the screen. Since there are four players available, each with its own color or shape, much more information can be put on the screen.

Once the players are set in memory, it is a simple job to move them onto the visible part of the screen. It is also easy to move them up or down by use of the string variable as in line 6700, which moves the square down the screen (up in memory).

To fit the game into 16K, delete lines 3500-3700 and line 3000.