Home | Contents | KwikPik |
T H E G H O S T W R I T E R | |||||
---|---|---|---|---|---|
Now Castle Rathbone is ready to offer up its final secret. For buried deep in its depths, there are not just one but two terrific programs. Fiendish, eh? One you're already familiar (and frustrated) with but you've probably not even noticed the other. Yes folks, not only is Castle Rathbone one of the most difficult adventures you've ever played, it's also an adventure generator in disguise. Gasps of amazement - cries of, well I never - slapped thighs and blow me downs! It's true and now I'll show you how you can write your own amazing adventures using this clever and clandestine program. All you'll need to bring with you are your imagination and a devilish sense of humour. First though, we have to unravel the secrets of Castle Rathbone. I hope you're now as puzzled about how it works as you were about solving it. Let's take a look at the program
|
LEVEL BEST Ask seasoned adventurers who writes the best adventures and nine times out of ten the answer that comes back will be Level 9. Their games will contort your cranium and burst your brain cells - they're complex, full of surprises and, best of all, they're well written. To underline their commitment to good adventure writing, Level 9 has generously offered five of their top games to the writers of the best five adventures created with The Ghostwriter. So, you could be the lucky winner of Emerald Isle, Colossal Adventure, Adventure Quest, Dungeon Adventure and the brand new, Red Moon. And if the best of the five knocks us all out, it'll be published in the pages of YS. You may never achieve the standards Level 9 has set but you can strive ... | ||||
ACTION STATIONS Here is a step-by-step guide to setting out on your own adventure. At a glance you can see the stages you should follow but it you need more detail, always refer to the full instructions. |
listing between lines 3000 and 5000. Czech? Serbo-Croat?
Total gibberish? No, it just looks that way 'cos we've sneakily
encoded the data so's you can't cheat when you're playing the
game. In fact, these lines contain all the location descriptions
and messages printed by the program. Before we go any
further, we'll have to decode these lines. Take a look at lines 400 to 430 - this is the machine code routine that unscrambles the encrypted lines. It works by intercepting the Speccy's PRINT routine, decodes the statement enclosed in quotes and then prints the correct message or location description on the screen. Your first job is to delete the lines from 400 to 430 from Castle Rathbone (making sure, of course, that you have a back- up copy of the program). Then type in the decoder program below and run it. You'll now have a copy of Castle Rathbone in which all the location descriptions and text messages are in English. This will be your working copy of the program, so you |
should now delete the short program you've just typed in and
save a copy of the new readable version.
THE INNER WORKINGSIt'll help to think of the adventure as being split into three parts. The lines up to line 3000 contain the adventure controller and it does just that - completely controls what happens in the rest of the program. The lines from 3000 to 5000 contain the location descriptions and the text messages. Finally, the lines starting from 9000 contain all the data used in the program.When you come to creating your own adventure, you'll have to delete parts of Castle Rathbone but don't do anything yet - all will be revealed. In the meantime, though, you'll need Castle Rathbone to show you how to construct your own data. As soon as you understand how everything works, follow the course laid down by Action Stations and you'll soon have your very own adventure. | |||
GHOSTWRITING A STEP-BY-STEP GUIDE | ||||
---|---|---|---|---|
THE IDEAThe hardest part of writing any adventure comes right at the beginning. But it can also be the bit where you can have most fun. Think of it - creating your very own worlds, planets, time-zones. This is the bit where your imagination will have to go into overdrive. You'll need to rack your brains to come up with a story line and scenario. Let's face it, if you haven't got a good idea, you're not going to end up a good adventure. But once you've come up with the world's most fantastic, never before imagined, mega mind-blowing adventure you can get on with the job of coding it.THE MAPYour first step is to draw a map of your brave new world. This'll help you when you come to creating the data and it'll give you a visual reminder of what you should be doing. When you've drawn the map, number each of the locations and stick to those numbers. Once you've decided on the number of locations, you must change the value assigned to the variable LOCATE at line 9010.And remember, your map doesn't have to be flat and dull. Set parts of the adventure on different levels, put in secret passages so that rooms connect that normally wouldn't. Create a true labyrinth! PRIMARY LOCATION DESCRIPTIONSNow you have your map, you can start describing the locations. This is where your way with words will set the tone for the whole adventure. Will it be dark and mysterious or everyday and funny? If you're short of ideas, think about your favourite periods of history and try to write a scenario set in that time. Or how about basing your adventure on your favourite book? If it's good enough for The Hobbit ...Also, try to make your descriptions as visual as possible. Remember you are the player's eyes - he sees only what you tell him to see. But be careful that you don't include in these primary descriptions anything that is likely to change on subsequent visits. If you want to put an object into the room that'll have to be picked up, don't describe it here. When you're ready to enter your descriptions, first delete lines 3500 to 4090 from Castle Rathbone. Now you must enter your primary location descriptions at lines 3500, 3520, 3540 and so on for locations 1,2,3 ... If you've written very long location descriptions it's an idea to split the PRINT statements over several lines. SECONDARY LOCATION DESCRIPTIONSThe next job is to write another location description. For example, if your first location reads, "You're on the bridge of an intergalactic starship. Facing you are banks upon banks of instruments and controls. The main ship's computer hums |
efficiently in the background etc ...", you won't want to read all
of that every time you enter the bridge. Once is enough! So, your
secondary description should read "You are on the bridge of the
starship". The location descriptions are printed by the lines 2450 and 2455 and you can enter the secondary location descriptions at lines 3510, 3530, 3550 and soon for locations 1,2,3 ... LOCATION CONNECTIONSOnce you've entered all your location descriptions, the next step is to join them all together. You do this by constructing the Data statements that'll tell the program what commands take you to which location. If you have a look at Castle Rathbone, you'll find the location connections at lines 9300 to 9372. As you can see from line 9040, the size of the array that holds the data for the connections is determined by the variable LOCATE into which you've put the number of locations.Each connection to another location is made up of a four character code. The first pair of characters is a code number of the location you'll end up in by going in the chosen direction. So, if an entry reads "01050302042100", then: 0105 means 'NORTH' leads to location number 5 0302 means 'EAST' leads to location number 2 0421 means 'WEST' leads to location number 21 00 signifies the end of the data for that location. To connect up the locations in your adventure, follow your
|
map and produce a data statement for each location similar to the
ones in Castle Rathbone.
OBJECTS AND TREASURESWe now come to the important list of objects and artefacts that are to appear in your adventure. First, decide what you want - gold doubloons, swords, half-eaten sarnies, an alien's toe-nail, you name it, you can include it. Now choose where it's going to be placed and you're ready to put them into your program.The Data statement for each object comprises of a description of the object followed by a number. This number corresponds to the location where the object first appeared. If you don't want the object to appear straight away, simply make the number equal 0. When you want the object to make its appearance, then use action codes J or K in an action table entry. If an object is being carried the number will be -1. The program changes that automatically when you pick up or drop an object. It's very important that when you come to write the dictionary of words that the program will recognise, you include a word or words for each object. If you don't the player's going to have a tricky time telling the program to pick it up! Also don't forget to count up your objects and change the variable TNOBS at line 9020.
MESSAGES AND RESPONSESAn adventure, if it's good, has got to give you the impression that it knows what you're up to all the time. That means it'll often have to respond to the actions and inputs of the player with something a trifle more intelligent than the normal "You can't do that!" or "I don't understand". These responses will also take the form of hints and warnings to the player about what they are doing (or not doing).Now, you'd have to be a pretty good planner to know all your messages from the beginning. But fortunately, it doesn't matter as you can add new responses as fresh ideas occur to you. But what Sort of messages do I put in? I hear you ask. To show you how flexible it is, here's an example. Say the player has 'A LAMP' and 'A BOX OF MATCHES'. Rather than respond to 'LIGHT LAMP' with just an OK, the message could read "The room is now brightly illuminated" or "Don't be a Wally. You can't light an electric lamp with matches". As always, you're in control and you decide what you want to happen. When you're ready to add your messages, delete lines 3000- 3305. Now write your messages and then enter them in the program at lines 3000, 3005, 3010 and so on. These lines correspond to message numbers 1,2,3 ... and must go here as they're called by the program at line 2605. Take a look at Castle Rathbone lines 3000 to 3305 if you're not sure what sort of messages you'll need. FLAGS AND COUNTERSThe primary function of flags is to let the program keep track of what's going on. They are held in the array F(). They record all the important happenings. Perhaps you can think of them as on/off, true and false switches. For example, if you're in the attic in Castle Rathbone, the program has to know whether the skylight is open. So, there is an entry in the Status table that checks if F(12) is set. If it is, then the program prints the message at line 3135. In the same way, there is another entry in the Status table that'll print the message "There is a rope fixed to the battlements" when F(18) is set ON, that is to 1. |
If you want to see how the Flags were used in Castle Rathbone,
use the program that decodes the Action table from Rathbone
Revisited. You'll then see where the tests on the Flags occur. Here's a full list of the Flags that were used in Castle Rathbone. It should help you to see how many Flags you'll need in your adventure. When you've decided how many you want, change the DIM F(21) statement at line 9065.
THE DICTIONARYThis is where your program becomes word perfect. The dictionary must contain all the words that it recognises. You'll see from the one in Castle Rathbone (Lines 9400-9474) that its dictionary is quite large but yours needn't be this big. In fact, the smaller the vocabulary, the faster the program. (Is this why Troubleshootin' Pete talks so fast? Ed). Just remember to keep the direction commands identical to those in Castle Rathbone (North, South, East, West, Up, Down). As for the rest, well, you have a whole language to choose from!You'll notice that each of the words in the dictionary data statements is preceded by a two digit number. This is the code used by the rest of the program. If two words have the same meaning, you should assign them the same code number and treat them as one word. When the player enters something, the routine at line 2000 searches through the dictionary until it finds a match for the words entered. When a match is found, the program then tries to match the prefixed code to an entry in the Action table. But before we look at that, don't forget to count up the total number of words and then change the value assigned to the variable WORDS at line 9015. ACTION TABLEPrepare for action. Take a look at Castle Rathbone lines 9086- 9199 and you'll see a series of strange looking Data statements. These are the action table entries. When the player types in a command like 'TAKE ROPE', the program finds the code for each word from the dictionary. It then searches for an entry in the action table where the first four characters are the same as the two codes for the words input. When it finds the right entry, it carries out the tests in the entry, such as 'is the rope here?' You couldn't take it, after all, if it wasn't in that location. If all the tests prove positive, the appropriate action is performed - 'get the rope' and then 'print the message OK, YOU'VE GOT THE ROPE'.Now you can construct a series of actions for your own adventure using the Test and Action tables. The sequence for each entry is as follows: two codes for the input - the numbers at the front of each word in the dictionary. This is followed by a series of tests from the Test table. Then an asterisk to signify the end of the tests. Then a series of actions (from the Action table). Finally, don't forget to put an asterisk at the end of the entry as well. |
So an entry for 'TAKE ROPE' in Castle Rathbone could he as
follows:
|
STATUS TABLEThe entries in the Status table in lines 9240 to 9270 look virtually the same as those in the Action table but they serve a different purpose.There are really two main differences. One, the Status table entries don't have the codes for WORD inputs at the front of the entry and two, the Status table is only scanned each time the player enters a new location or when one of the entries in the Action table ends in a B, C or E.
DEBUGGINGAnd finally, never send your adventure out into the unsuspecting world without thoroughly testing it first. It can be frustrating enough when you can't finish an adventure 'cos it's too tricky - think how frustrating it is if there are bugs preventing you from completing it. The world will never be unsuspecting twice! |
Home | Contents | KwikPik |