09f25a1255a7e0bb3f10b29c9ffd1ab586108b36
[ibg.git] / appendices / d.rst
1 ===================================
2  Appendix D -- "Captain Fate" story
3 ===================================
4
5 .. only:: html
6
7   .. image:: /images/picC.png
8      :align: left
9
10 .. raw:: latex
11
12     \dropcap{c}
13
14 aptain Fate is our third and final game; it's a little longer and more
15 complex than its predecessors. See "Captain Fate: take 1" on page 119,
16 "Captain Fate: take 2" on page 131, "Captain Fate: take 3" on page 147
17 and "Captain Fate: the final cut" on page 157.
18
19 Transcript of play
20 ==================
21
22 .. literalinclude:: /examples/Fate.txt
23    :language: transcript
24
25 Game source code
26 ================
27
28 .. literalinclude:: /examples/Fate.inf
29    :language: inform6
30
31 Compile-as-you-go
32 =================
33
34 "Captain Fate" suffers from the same difficulty as "William Tell": if 
35 you type the code sequentially as you read through the guide, the game 
36 won't compile until you reach the end of Chapter 13. To compile and test 
37 as you go, add these stubs to the end of the game file when you reach 
38 the end of Chapter 10:
39
40 .. code-block:: inform
41
42         ! ================================================================
43         ! TEMPORARY DEFINITIONS NEEDED TO COMPILE AT THE END OF CHAPTER 10
44         Room    cafe;
45         Object  clothes;
46
47 Replace those stubs with these at the end of Chapter 11:
48
49 .. code-block:: inform
50
51         ! ================================================================
52         ! TEMPORARY DEFINITIONS NEEDED TO COMPILE AT THE END OF CHAPTER 11
53
54         Room    toilet;
55         Object  clothes;
56         Object  costume;
57
58 and with these at the end of Chapter 12:
59
60 .. code-block:: inform
61
62         ! ================================================================
63         ! TEMPORARY DEFINITIONS NEEDED TO COMPILE AT THE END OF CHAPTER 12
64
65         Room    toilet;
66         Object  clothes;
67         Object  costume;
68         Object  coin;
69         Object  coffee;
70         Object  food;
71         Object  menu;
72
73 At the end of Chapter 13 the game is complete, so you can delete the 
74 temporary stubs.