Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.ruhr-uni-bochum.de!news.uni-stuttgart.de!uni-regensburg.de!lrz-muenchen.de!informatik.tu-muenchen.de!Germany.EU.net!howland.reston.ans.net!newsfeed.internetmci.com!ncar!uchinews!kjfair
From: kjfair@midway.uchicago.edu (Kenneth Fair)
Subject: Re: I can't learn Inform
X-Nntp-Posting-Host: ngrh-34.rh.uchicago.edu
X-Kook-Number-2: 14
Message-ID: <kjfair-0604961707580001@uchinews.uchicago.edu>
X-Kook-Code-2: (Grubor+++)*2 Boursy+ Palmer+++++++
Sender: news@midway.uchicago.edu (News Administrator)
Organization: University of Chicago School of Law
X-Newsreader: Yet Another NewsWatcher 2.2.0b6
References: <1996Apr5.162245.5280@rgfn.epcc.edu> <4k6jtn$244v@thor.cmp.ilstu.edu>
Date: Sat, 6 Apr 1996 23:07:58 GMT
Lines: 112

In article <4k6jtn$244v@thor.cmp.ilstu.edu>, ceforma@rs6000.cmp.ilstu.edu
(Christopher E. Forman) wrote:

>Andrew C. Plotkin (erkyrath+@CMU.EDU) wrote:
>: There have been many complaints about the Inform manuals. It's hard
>: for beginners to get started with them. Unfortunately, everyone who
>: reads them either A) gives up or B) becomes proficient at Inform on
>: their own, and thus loses the ability to explain it to other
>: beginners. :-)
>
>A great many of the complaints about Inform's manual are, IMHO,
>unjustified.  Graham really has done an excellent job with them.  The
>problem with writing I-F is that you have to learn everything at once --
>you need to learn how to create rooms and objects, handle compass
>directions, build actions, create puzzles, set up timers and daemons,
>develop NPCs, and plan a scoring system.  Admittedly, this isn't all
>done at the same time, but until a programmer learns maybe half of these
>things, there's really not much he/she can do.

I'll speak as one who is currently learning Inform.  (Just started two days
ago!)  Learning Inform is like learning any other programming language;
you have to learn about 3/4 of the language sorta all at once.  It's
very important to start very very small and build on to that core bit
by bit.

I'd heard a number of complaints about Graham's manual before I started.
I've found them to be mostly unjustified myself.  I must add the 
disclaimer that I'm not a complete programming novice.  I have sorta
taught myself C/C++ and taken a course in object-oriented programming
using Scheme (a LISP derivative).  While I'm certainly no programming
whiz, I at least understand most of the concepts of OO and know basic
C syntax.

The one thing that is maybe a bit misleading is the exercises.  I tried
to do the first few and found I couldn't.  The reason was of course
that they often made use of tricks that weren't really covered until 
later in the manual.  But then I stopped trying to solve the exercises.
Instead, I tried to figure out in my mind what the solution might sorta
look like, without worrying about crossing all of the i's and dotting
the t's (or vice versa), and instead used the answers as more code
examples to tear apart and decipher.

I have a feeling that the manual will be more valuable to me as time
progresses, since Graham seems to have included many practical problems
and their solutions in the manual (how to code a light source, for
example).

Actually, the biggest problem I have with the manual right now is that
I haven't printed it out yet.


>: Pretty much. There's a lot of other sample code on ftp.gmd.de. But the
>: only way you'll get a hold of it is to create a room, put the player
>: in it, make that work, add an object, and continue from there.
>: Whenever you get stuck, read the relevant chapter of the manual, and
>: the two following chapters. :-)
>
>Precisely.  And start with something simple first, rather than trying to
>write a huge game at the outset.  (The competition is great for short games
>of this sort.)

I just took some place that I knew (my alma mater, Rice University),
drew a map of it, and started coding locations.  I just took the "Ruins"
code from the manual and substituted my own description and voila!
Instant Main Quadrangle.  Then I thought I'd add the hedges, so I
took the mushroom, changed it to "hedges", and boom!  There they are.
Then I added a location, and another, and another.

Then I got ambitious.  I thought I'd add a routine to have a random
message appear when you cross the street from one location to another.
So I created a function CrossStreet, had it pick a random message like,
"You wave to a friend as you cross the street," and had n_to, etc., call
it before they returned the place being traveled to.

Actually, I think what I'm going to do is create the whole map first.
Just make it more of a wandering travelogue.  First the rooms, then
a few static objects, then some stuff to pick up and drop, maybe a
backpack, maybe put in a couple of doors to open and close, a key or two,
and so on.  Then I'll try playing around with light sources.  (Right
now my player is glowing!)  Then I'll code a squirrel.  A nice, simple,
stays in one place and only does a couple of things squirrel.

All along the way, I'm trying to throw in my bits of knowledge about Rice
that I got as a tour guide.  A joke here, a humorous reference there. 
Maybe throw in an "xyzzy" verb just to learn how to change the grammar. 
Perhaps then I'll put in a simple "find x object and use it at y place"
puzzle.  I'll leave NPCs for last.

The nice thing about Inform programming is that the libraries give you
and amazingly complex world right out of the box.  I can already walk
around, look at stuff, climb a couple of things, save, quit, and restore
without much effort on my part at all.  Once you get the hang of looking
at the program as an exception to the default rules, it makes the problem
much easier to deal with in your mind.  You just have to think, what
do I want this to do special?

It also makes it easier to look at other source code.  Generally, most
of the "normal" exceptions you want to do have been done by someone
else and can be referred to in their code.  Plus, because of the 
object oriented nature of Inform, you can get quite a lot out of
20-30 lines of code.

Anyway, expect to be hearing more from me (probably pathetic newbie
questions) in the near future!

Ken

--
KEN FAIR - U. Chicago Law  | Power Mac! | Net since '90 | Net.cop
kjfair@midway.uchicago.edu | CABAL(tm) Member | I'm w/in McQ - R U?
  "I'm sorry to have written such a long letter.  I did not have 
   time to write a short one."    - George Bernard Shaw
