Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 9, NO. 7 / JULY 1983 / PAGE 222

Cavern quest: an adventure game for the Bally Arcade and Commodore Vic 20. Bruce Jaeger.

The Bally Arcade (or Astrocade) is probably the most undersung of the home computer systems, and undeservedly so. The color graphics and sound capabilities were, and in many cases still are, years ahead of the competition, both in the cartridge games and with Bally Basic. The most serious limitations have been the small, calculator-style keyboard and the mere 1800 bytes of RAM.

Was I crazy then, to attempt to write an adventure game for the Bally? Perhaps. But i tried, and I think you will enjoy the result.

I knew that no magic was strong enough to fit any kind of traditional Adventure game into those 1800 bytes. In addition, a novice at the Bally keypad could take days to type in "Take the Amulet," so I elected to use joystick 1 for input.

The scenario of the game is straight-forward. Jesse James, the Robin Hood or Attila the Hun of Missouri (depending on your point of view), has hidden a treasure deep in a cave, and you want to go in, find it, and bring it out. That's it. No magic birds, sword-wielding ogres or dissembling oracles. Not only would that have been quite a task in 1800 bytes, but it turns out that a simple, realistic exploration of a three-dimensional cave is difficult enough, thank you.

The cavern passages do not form a traditional maze, as there is often more than one path to the trasure, and any path is liable to loop back on itself--sometimes in an inexplicable way. Make a map. The Program

The first third of the program generates the passages of the cave, using the random number generator, so unlike most adventure games, the cave is different each time. Also at this time the various artifacts of the James boys are strewn about, and the treasure hidden. It takes about half a minute or so for the computer to do its work.

The rest of the program is the playing section. The player enters the cave, and is told whether passages lead north, south, east, west, up or down. Pushing the joystick forward is the equivalent of saying Go North, and the other compass directions correspond.

As you will never get both an Up and a Down choice at the same point, a simple pull of the trigger (or firing button) suffices to indicate climb or descent. Then it is simply a matter of wandering through the cave, keeping track of where you are, finding the treasure, and making your way out again.

To make the cavern as large as possible none of the fine Bally sound effects or graphics other than color changes have been used. Because of the restricted memory, it is also important not to type in any spaces between commands, except as noted in lines 54 and 55. Vic Version

I have included a translation of Cavern Quest for the Vic computer (or any other regular Basic computer, with modifications), as Bally Basic code is often difficult to translate. The cavern can be made much larger if you wish, by increasing the value of variable B in line 15 to as much as your available memory will allow.

Again, I have used no sound effects or fancy graphics, to make translation of the program into other dialects of Basic easier. The POKEs in lines 15 and 260 change the Vic screen and border colors, and the joystick subroutine at line 1000 is obviously peculiar to Vic. For Pet or Commodore 64, substitute the keyboard subroutine at 1000. For other microcomputers, simply write your own subroutine that returns V=1 for north, V=-1 for south, J=1 for east, J=-1 for west, and R=1 for up and down.

The TI$ in lines 240 and 1005 refers to the built-in real-time clock. This is not a necessary part of the game, but it is interesting to see how long you have been lost!