X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=chapters%2F02.rst;h=f930ee829d61ebd8288178a7252f15d87376c0b3;hb=81deb40a92a715b3ef8037535806b01d4fe2f5fa;hp=0c02a871312eacddaafd5acd2d69cdea98fdeab8;hpb=95b5702817b987123d71d432f81eeb0c7101b59c;p=ibg.git diff --git a/chapters/02.rst b/chapters/02.rst index 0c02a87..f930ee8 100644 --- a/chapters/02.rst +++ b/chapters/02.rst @@ -83,6 +83,14 @@ 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 + pair: SimpleText; text editor + pair: TextEdit; text editor + pair: Windows; operating system + 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 @@ -95,17 +103,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 -: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). +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: @@ -130,6 +138,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 @@ -188,6 +200,10 @@ Follow these steps: double-click the file, it should open in NotePad so that you can see how it's written, though it probably won't mean much -- yet. +.. Generated by autoindex +.. index:: + single: batch file + 4. ``MyGame1.bat`` is an MS-DOS batch file (an old kind of text-only computer program, from the days before point-and-click interfaces) which runs the Inform compiler. Double-click it; a DOS window opens as the @@ -322,10 +338,18 @@ doing. There are four parts to the first line: off the top of the MS-DOS window. Press the space bar to continue the compilation. +.. Generated by autoindex +.. index:: + pair: Windows; operating system + The second line -- ``pause "at end of compilation"`` -- just prevents the window from closing before you can read its contents, as it otherwise would on Windows NT, 2000 and XP. +.. Generated by autoindex +.. index:: + single: batch file + You'll need to have a new batch file like this to match each new source file which you create. The only item which will differ in the new file is the name of the Inform source file -- ``MyGame1`` in this example. You @@ -334,6 +358,11 @@ can stay the same in each ``.bat`` file that you create. .. rubric:: Getting a better editor +.. Generated by autoindex +.. index:: + pair: NotePad; text editor + pair: TextPad; 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, @@ -348,11 +377,18 @@ 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) =========================================== +.. Generated by autoindex +.. index:: + pair: Mac OS X; operating system + Whereas our instructions for using Inform on a PC apply to just about all versions of Windows, on the Macintosh we need to be more precise. Our guidance here is specifically for Mac OS X, rather than for its predecessor @@ -375,6 +411,10 @@ your Mac OS X: run in the Classic environment of OS X; roughly speaking, Classic is an emulation of the older Mac systems. +.. Generated by autoindex +.. index:: + pair: Linux; operating system + * X11: based on a windowing system designed for the UNIX/Linux world. They need an X-Windows server to run, and their appearance and functionality may seem a lot different to what the Aqua user expects. @@ -444,6 +484,10 @@ Follow these steps: * select ``Open with`` and choose ``Other...`` + .. Generated by autoindex + .. index:: + pair: TextEdit; text editor + * in the ``Open with`` dialog, go to the ``Applications`` folder and select TextEdit. @@ -521,6 +565,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 @@ -693,6 +741,10 @@ that works really well, please let us know. .. rubric:: More about the editor +.. Generated by autoindex +.. index:: + single: syntax colouring + As well as the ones that we recommend, other good text editors are listed at http://www.firthworks.com/roger/editors/. One feature that's well worth looking out for is "hotkey compilation" -- being able to run the compiler @@ -728,6 +780,10 @@ with these mistakes, and about controlling how the compiler behaves, in .. 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