Adventure Shell

Earlier this month I was busy separating the Games page of my website into two, since it now featured so many games it was becoming increasingly difficult to maintain and locate the individual programs. Rich Mellor came up with a very useful idea to split the page into “Adventure Games” and “Other Games”, since there are so many QL text adventures, including the Infocom routines and utilities for example, which let you play games created for other platforms.

Coincidentally, along came David Denham to port a very simple Adventure Shell program, which is basically a skeleton adventure program written in BASIC. The original by the late Tim Hartnell was in TRS80 and Commodore C64 BASICs, so David ported and anhanced it to QL BASIC, and added thorough documentation to make it easier to edit the program to create your own adventure games in BASIC.

While there are other adventure creation tools available for the QL, this one differs in that you don’t have to learn new software, you just take a skeleton program written in BASIC and change it to become whatever adventure you want. True, you won’t get the most advanced game ever, but it will set you on the roads to programming your own and crucially it’s well documented so if it doesn’t do what you want, you just edit a few lines of BASIC to make it do what you want! A tinkerer’s delight.

Having written it in BASIC you can compile it too with one of the QL BASIC compilers, to make it into a stand-alone executable program if you wish.

The map of an adventure game is created using simple numbers in a DATA statement. Say we need just 4 rooms for the adventure, numbered room 1 to room 4, it’s possible to map out the adventure just by putting a list of exits from each room in the data statements, programmed as North, South, East and West. The numbers are the room numbers to which each exit leads, so if room 1 has two exits leading South to room 2 and West to room 3, it’d just be:

DATA 0,2,0,3

0 means no exit in that direction. The program then takes care of navigation through the maze or cave layout.

Other DATA statements let you specify a list of monsters and objects, weapons and treasures to pick up and use, along with their value.

The program includes a simple interpreter to let you enter one or two word commands such as Go North, Grab Sword, or Fight Monster. The interpreter part is well documented and structured so makes it easy to add your own commands if you wish.

Even a “fight” routine is built in, so you can attack or be attacked by a monster.

Although not quite complete at the time of writing, apparently a playable example game is included and apparently I will feature in the game somehow as a monster. I am not looking forward to this L

Hopefully we’ll be able to feature a review of this program in a forthcoming issue – hope it lives up to expectations.

It will be available to download free of charge from the Adventure Games page on my website, http://www.dilwyn.me.uk/games/adventures/index.html