X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=chapters%2F02.rst;h=1d400174ff3edc46ae654edc6230536e11362534;hb=4381288eeb792adb3672ef747013c02815fa760a;hp=800190c1310e4cdd9701f17d011ea974edd839b3;hpb=f9eb50b5024de49b2df4b5daab471731840195d3;p=ibg.git diff --git a/chapters/02.rst b/chapters/02.rst index 800190c..1d40017 100644 --- a/chapters/02.rst +++ b/chapters/02.rst @@ -4,19 +4,15 @@ .. epigraph:: - | *C was a captain, all covered with lace;* - | *D was a drunkard, and had a red face.* + | |CENTER| *C was a captain, all covered with lace;* + | |CENTER| *D was a drunkard, and had a red face.* .. only:: html .. image:: /images/picC.png :align: left -.. raw:: latex - - \dropcap{c} - -onventional -- static -- fiction can be written using nothing more than +|C|\onventional -- static -- fiction can be written using nothing more than pencil and paper, or typewriter, or word-processor; however, the requirements for producing IF are a little more extensive, and the creative process slightly more complex. @@ -61,8 +57,8 @@ You will never need to look at it in the form produced by the compiler:: 0000000000000000000000000000168F000000000000010200000000362E3231 ... -but, as you'll notice from the full transcript in "William Tell" story on -page 219, the player will see the following:: +but, as you'll notice from the full transcript in :doc:`/appendices/c`, the +player will see the following:: The place: Altdorf, in the Swiss canton of Uri. The year is 1307, at which time Switzerland is under rule by the Emperor Albert of @@ -87,6 +83,11 @@ is a "text" (or "ASCII") file containing words and phrases which can be read -- admittedly after a little tuition, which is what this guide is all about -- by humans. +.. Generated by autoindex +.. index:: + single: IBM PC + pair: NotePad; text editor + How do you create that source file? Using a third software program: an :term:`editor`. However, unlike the compiler and interpreter, this program isn't dedicated to the Inform system -- or even to IF. An editor is an @@ -99,17 +100,17 @@ no fancy formatting features, no bold or italics or font control, no embedded graphics; it simply enables you to type lines of text, which is exactly what's needed to create an IF game. -If you look at the game source on the previous page, or in the "William -Tell" story on page 219, you'll notice ``Include "Parser";`` and ``Include -"VerbLib";`` a few lines down from the top of the file. These are -instructions to the Inform compiler to "include" -- that is, to merge in -the contents -- of files called ``Parser.h`` and ``VerbLib.h``. These are -not files which you have to create; they're standard :term:`library files`, -part of the Inform system. All that you have to do is remember to Include -them in every game that you write. Until you've a fair understanding of -how Inform works, you've no need to worry about what they contain (though -you can look if you want to: they're readable text files, just like the -ones this guide will teach you to write). +If you look at the game source above, or in :doc:`/appendices/c`, you'll +notice ``Include "Parser";`` and ``Include "VerbLib";`` a few lines down +from the top of the file. These are instructions to the Inform compiler to +"include" -- that is, to merge in the contents -- of files called +``Parser.h`` and ``VerbLib.h``. These are not files which you have to +create; they're standard :term:`library files`, part of the Inform system. +All that you have to do is remember to Include them in every game that you +write. Until you've a fair understanding of how Inform works, you've no +need to worry about what they contain (though you can look if you want to: +they're readable text files, just like the ones this guide will teach you +to write). So, we've now introduced all of the bits and pieces which you need in order to write an Inform adventure game: @@ -134,6 +135,10 @@ write an Inform adventure game: because it's a binary file not meaningful to human eyes, neatly discourages players from cheating). +.. Generated by autoindex +.. index:: + single: IF Archive + All of those, apart from the editor, can be downloaded for free from the IF Archive. One approach is to fetch them individually, following the guidance on Graham's page: visit http://www.inform-fiction.org/ and look @@ -141,6 +146,8 @@ for the "Software" section. However, if you're using a PC or a Mac, you'll find it easier to download a complete package containing everything that you need to get started. +.. _inform-windows: + Inform on an IBM PC (running Microsoft Windows) =============================================== @@ -169,12 +176,12 @@ Follow these steps: In order to make the download small and fast, these folders include just enough to get you started as an Inform designer -- the compiler and interpreter programs, the library files, the ``Ruins.inf`` example file - from the *Inform Designer's Manual*, and a template for your own first - game. A few other folders are included as placeholders where you could - later download additional components, if you wanted them. As soon as - possible, you should download the *Inform Designer's Manual* into the - ``Inform\Doc`` folder -- it's an essential document to have, and has - been omitted from this download only because of its 3MB size. + from the |DM4|, and a template for your own first game. A few other + folders are included as placeholders where you could later download + additional components, if you wanted them. As soon as possible, you + should download the |DM4| into the ``Inform\Doc`` folder -- it's an + essential document to have, and has been omitted from this download only + because of its 3MB size. 3. To verify that the downloaded files work properly, use Windows Explorer to display the contents of the ``Inform\Games\MyGame1`` folder: you will @@ -233,7 +240,7 @@ Follow these steps: 9. Using the same techniques, you can compile and play ``Ruins.inf``, which is held in the ``Inform\Games\Download`` folder. RUINS is the game used - as an example throughout the *Inform Designer's Manual*. + as an example throughout the |DM4|. .. rubric:: Setting file associations @@ -314,8 +321,8 @@ doing. There are four parts to the first line: .. note:: On the command line, you sometimes also see a compiler :term:`switch` - such as ``-S``, used for controlling detailed aspects of how the - compiler operates. Rather than do that here, we find it more + such as :option:`-S`, used for controlling detailed aspects of how + the compiler operates. Rather than do that here, we find it more convenient to place any necessary switches at the very top of the source file, as we'll explain in the next chapter. @@ -336,6 +343,10 @@ can stay the same in each ``.bat`` file that you create. .. rubric:: Getting a better editor +.. Generated by autoindex +.. index:: + pair: NotePad; text editor + Although NotePad is adequate when you're getting started, you'll find life much easier if you obtain a more powerful editor program. We recommend TextPad, available as shareware from http://www.textpad.com/; in addition, @@ -350,6 +361,11 @@ the file -- and it compiles there and then. You can also run the interpreter with similar ease. The convenience of doing this far outweighs the small amount of time needed to obtain and configure TextPad. +.. index:: + single: Apple Macintosh + +.. _inform-apple: + Inform on an Apple Macintosh (running OS X) =========================================== @@ -419,13 +435,13 @@ Follow these steps: In order to make the download small and fast, these folders include just enough to get you started as an Inform designer -- the compiler and interpreter programs, the library files, the ``Ruins.inf`` example from - the *Inform Designer's Manual*, and a template for your own first game, - which you may copy and rename each time you begin a new Inform project. - A few other folders are included as placeholders where you could later - download additional components, if you wanted them. As soon as - possible, you should download the *Inform Designer's Manual* into the - ``Inform/Doc`` folder -- it's an essential document to have, and has - been omitted from this download only because of its 3MB size. + the |DM4|, and a template for your own first game, which you may copy + and rename each time you begin a new Inform project. A few other + folders are included as placeholders where you could later download + additional components, if you wanted them. As soon as possible, you + should download the |DM4| into the ``Inform/Doc`` folder -- it's an + essential document to have, and has been omitted from this download only + because of its 3MB size. 3. To verify that the downloaded files work properly, use the Finder to display the contents of the ``Inform/Games/MyGame1`` folder: you will see @@ -521,6 +537,10 @@ Follow these steps: .. rubric:: Setting file associations +.. Generated by autoindex +.. index:: + single: Infocom + The business of first starting the interpreter, and then locating the story file that you want to play, is clumsy and inconvenient. Fortunately, when the system first "sees" the Zoom interpreter (which is a nice Aqua @@ -601,8 +621,8 @@ There are three parts to the second line: .. note:: On the command line, you sometimes also see a compiler :term:`switch` - such as ``-S``, used for controlling detailed aspects of how the - compiler operates. Rather than do that here, we find it more + such as :option:`-S`, used for controlling detailed aspects of how + the compiler operates. Rather than do that here, we find it more convenient to place any necessary switches at the very top of the source file, as we'll explain in the next chapter. @@ -724,10 +744,14 @@ write a Z-code file. *Do not worry about this*: the rules are easy to learn, but just as easy to break, and all Inform designers inadvertently do so on a regular basis. There's some additional information about dealing with these mistakes, and about controlling how the compiler behaves, in -"Compiling your game" on page 189. +:doc:`15`. .. rubric:: More about the interpreter +.. Generated by autoindex +.. index:: + single: Infocom + One of the big advantages of the way Inform works is that a compiled game -- the Z-code story file -- is portable between different computers. That's not just from one PC to another: exactly the same story file will