★ CODING ★ 16. BREAKDOWN OF WITCH HUNT ★ |
Writing Adventure Games on the Amstrad - 16 - Breakdown of witch hunt - objects |
OBJECT 0 - THE PLAYER In AKS the player is considered to be a special type of object. The player object is defined in a similar way to all the other objects although any description statements will never be printed by AKS. The initial position of the player can therefore be defined using the position statement. Witch Hunt starts the player off at location 1, the middle of the village green. Unlike other objects, it makes no sense to start the player object off at a special location (ie. either location 0 — carried, or location -1 : nowhere). The player object may be given names (using the N statement) and suitabilities (using the S statements) to allow reference to the player character in the game. It makes no sense to allow the player to get himself (by 'S.GE,*') or wear himself (by 'S,PO') whereas it may be desirable to allow the player to examine himself (by S,EX,'.description'). Witch Hunt, however, sticks to the more conventional adventure game format and does not implement actions on the player by the player. 11510 DATA O,0 OBJECT 1 - HAT The witch's hat can exist in two states depending on the value of the 'hat full of water' flag (flag 8). As far as the hat object is concerned these states are just different descriptions —one for each state of flag 8. The hat starts off at location 23 (position 23 — 'P,23'). The hat is fundamental to completion of Witch Hunt and the player can get an important hint by examining it. Note that the hat may not be put on when full of water ('S,PO,*-F8'). 11530 DATA O,1 OBJECT 2 - TOAD The toad has two states, toad and goatherd, implemented in an identical manner those of object 1. When in the goatherd state (flag 3 is T) this object may not be picked up ('S.GE.'-FS'). Names are defined for both states to allow the object to be examined in either state. The description given depends on the state of the object. 11630 DATA O,2 OBJECT 3 - DUCKS The ducks object can be referenced by the names 'duck' or 'ducks'. It is important not to make a scenario too fussy about small details of the vocabulary. In general a plural object should be made to recognise its singular form. 11720 DATA O,3 OBJECT 4 - CHEESE
11770 DATA O,4 OBJECT 5 - LOAF 11840 DATA O,5 OBJECT 6 - MOUSE The mouse object exists in three states:
The current state and description of the object is controlled by only one flag, the 'mouse fed' flag (flag 7). If the mouse has not been fed the cheese this flag has the value F and the mouse is in state 1. On feeding the mouse this flag is set to T. After feeding the mouse, but before picking it up ('*F7.-C6), the object is in state 2. Once the object has been picked up ('*F7.C6'), it enters state 3. The sequence of transitions from state to state is fixed as 1-2-3. This object is known by the names cheese or mouse. Another cheese object already exists so a condition must be attached to the recognition of the name. The mouse may not be handled before it has been fed; by which time the real cheese object has been Zapped Out to nowhere. Therefore, when the mouse has been fed (flag 7 is T) it is valid to refer to the mouse object by the cheese name. This is implemented by the 'N,mouse,cheese,*F7' statement. 11900 DATA O,6 OBJECT 7 — BELL 11960 DATA O,7 OBJECT 8 - GOATS The goats object is a red herring. Examination of the goats will just confirm the genuine disappearance of the goatherd. 12030 DATA O,8 OBJECT 9 - PRIEST The priest may be described as doing one of three things depending on whether the bell has been rung (flag 1) and whether the hat is on the priest's head (flag 2). The sequence of state transitions is 1-2-3-1. 12080 DATA O,9 OBJECT 10 - SACK OF FLOUR Note that the initial position is 'nowhere' (location -1), 12150 DATA O,10 OBJECT 11 - WOODCUTTER When the player first encounters the woodcutter (“-V25'), he is given the first description. If the player is also wearing the hat (object 1) on this first encounter ('*-V25.W1') the first two descriptions are given. The first description will appear in the object list, indented as normal. The second description will appear underneath the object list and will not be indented. This is another way implementing an event in AKS. Subsequent descriptions of this object will only give the third description. 12220 DATA O,11 OBJECT 12 - CAT 12290 DATA O,12 OBJECT 16 - BLACKSMITH The blacksmith object may be in one of two states dependinq on whether he has been put in the stocks or not (ie. flaq 10 is T or F respectively). 12530 DATA O,16 OBJECT 17 - STOCKS The stocks have no function other than as something for the player to examine. The description given depends on flag 10 in the same way as object 16. 12600 DATA O,17
|