AGT revisited

So here we are in 2003 and people are still writing games in AGT. Even more disheartening, they’re still writing terrible games in AGT.

–from Paul O’Brian’s review of Curse of Manorland, IFComp '03

Having sailed back three decades to reach the dusty shores of the Adventure Game Toolkit and thereafter returned, I wanted to report on my voyage. For personal and narrative reasons, I knew I wanted to use AGT for LAKE Adventure. The last time an AGT game was entered was 2003, so after two interceding decades, I felt it might be time.

AGT is historically influential because it was the first IF-creation system for non-programmers that achieved widespread use in the U.S. Jimmy Maher’s site The Digital Antiquarian gives a robust and thoughtful history of the software and its creators. While writing LAKE, I was often thinking about AGT’s successes as a coding platform and also about its downfall and quick supplanting by Inform (and TADS, though I know much less of that history). I wondered what, if anything, had been lost in its disuse, and if AGT offered anything that has been forgotten by more modern engines.

And for a while, AGT was truly at the vanguard for amateur authors. Its philosophy and fundamental structures are modeled after Colossal Cave Adventure and Infocom games, and AGT promised authors they could write games of similar complexity and scope. It was most characterized, though, by a plain-English coding style that in some ways feels like shorthand Inform 7. AGT was updated regularly, and by its last update in 1993, the Master’s Edition of AGT offered very readable code and even rudimentary support for multimedia—LAKE displays a DOS-compliant title image at the outset, for example. In 1988, AGT’s publishers began an annual contest for games created with the system. It ended the year immediately prior to the year the Interactive Fiction Competition began.

Here are toy examples of code that accomplish essentially the same thing. First, Inform 7:

"Picnic"

Grassy Meadow is a room.  "You're sitting in a grassy meadow. It's the perfect place to have a picnic."

The picnic basket is an openable closed container in Grassy Meadow.  The description of the picnic basket is "You can't wait to open this picnic basket and enjoy the lunch inside!"  Understand "lunch" as the picnic basket.

Rule for writing a paragraph about the picnic basket:
	say "You've brought your picnic basket. Your lunch is inside it."

Instead of opening the picnic basket:
	if the player is in Grassy Meadow:
		say "You have a delightful picnic on this beautiful day!";
		end the story saying "You win!";
	otherwise:
		say "This isn't the ideal place for a picnic."

Instead of eating the picnic basket:
	try opening the picnic basket.

Now AGT, Master’s Edition:

#INCLUDE stddefs.agt

ROOM [Grassy Meadow]
Grassy Meadow
END_ROOM

ROOM_DESCR [Grassy Meadow]
You're sitting in a grassy meadow. It's the perfect place to have a picnic.
END_ROOM_DESCR

NOUN [Picnic basket]
Basket
Picnic
You've brought your picnic basket. Your lunch is inside it.
LOCATION [Grassy Meadow]
CLOSABLE
NOUN_SYNONYMS lunch picnic
END_NOUN

NOUN_DESCR [Picnic basket]
You can't wait to open this picnic basket and enjoy the lunch inside!
END_NOUN_DESCR

COMMAND OPEN BASKET
Present [Picnic basket]
AtLocation [Grassy Meadow]
PrintMessage [You have a delightful picnic]
WinGame
DoneWithTurn
END_COMMAND

COMMAND OPEN BASKET
NOT AtLocation [Grassy Meadow]
PrintMessage [This isn't the ideal place]
DoneWithTurn
END_COMMAND

COMMAND EAT BASKET
RedirectTo OPEN BASKET
END_COMMAND

MESSAGE [You have a delightful picnic]
You have a delightful picnic on this beautiful day!
END_MESSAGE

MESSAGE [This isn't the ideal place]
This isn't the ideal place for a picnic.
END_MESSAGE

And here’s the transcript of playing the AGT version in Gargoyle:

Grassy Meadow
You’re sitting in a grassy meadow. It’s the perfect place to have a picnic.
   You’ve brought your picnic basket. Your lunch is inside it.

> x basket
x -> examine
You can’t wait to open this picnic basket and enjoy the lunch inside!

> take basket
You are now carrying the picnic basket.

> open basket
You have a delightful picnic on this beautiful day!

*** Congratulations. You have won the game. ***

Your score is 0 (out of 0 possible).
You have visited 1 locations (out of 1 in the game)

While the AGT code is longer and feels more cumbersome, I think it’s fairly readable—most code blocks should be fairly self-evident. The coding of special actions like OPEN BASKET in AGT are called “metacommands,” and they take the place of Inform’s Instead rules. Their structure is somewhat convoluted in terms of logic: multiple conditions are joined by an implicit AND, OR conditions are possible but confusing, and there is no ELSE structure available. The DoneWithTurn has the same effect as an Instead rule in Inform—it skips the parser’s typical processing. In this way, Inform’s Before rules are also possible in AGT; one would simply eliminate DoneWithTurn. AGT’s parser is also sophisticated: it parses words reasonably sensibly, including the ability to handle pronouns, direct objects, and multiple commands in a single line like TAKE LUNCH AND EAT IT.

So, what did I learn about AGT and its eventual failure? Is there anything to be learned about parsers in general, and when to choose one system over another?

I had hoped to be able to sing AGT’s praises and say that we have indeed lost something in our newer parser systems. But it simply isn’t the case. Perhaps the only two things I could genuinely praise about AGT are related. 1.) AGT’s documentation is outstanding. It is clear, readable, and replete with examples. 2.) The number of possible commands, actions, and ways to model and manipulate the story’s world in AGT are fewer than Inform 7, but they are enough to do ~90% of what we might ask a robust engine to accomplish. In Inform 7, there are often several ways to code something, and folks can discuss the purest implementations, but each requires the wording to be just so. And that “just so” wording isn’t always clearly documented or is only gleaned from the Inform Recipe Book, not Writing with Inform. There’s no question about how to word things in AGT. The commands are clearly listed and documented—you just need to look them up and hope the programmers presupposed the need for the case you’re currently trying to solve.

(I should say that AGT has a multiple-choice mode that might be able to be used for dialogue trees and the like, something which vanilla Inform still lacks. But I haven’t tried that feature in AGT.)

AGT, though, is fundamentally backward-looking. It was trying to allow authors to recreate some flavor of ADVENT from 1976 or otherwise Infocom games, which went belly-up in 1989. AGT mandates that a game have a score, for example, and its fundamental worldview about NPCs is that they largely exist to be killed, like the dwarf in Colossal Cave. (The default description of a creature’s death is a puff of smoke, the same as the dwarf’s.)

Inform’s initial coding structures were in many ways harder to read than AGT’s, as suggested by the I5 Designer’s Manual. But throughout that manual beats a deeper aspiration of what a text adventure could be, each section punctuated by philosophical epigraphs. In AGT, a game is a database. In Inform, a game is an ontology. It is a world.

AGT was also limited by two other factors. One was that its chief mode of dissemination, discussion, and collaboration was via the pre-Internet online service CompuServe. Inform, instead, was initially released on the soon-to-be much more widely available Usenet group rec.arts.int-fiction. As the Internet became dominant and online services (including BBSes) became increasingly dormant, AGT no longer had a community of authors and players who connected to each other as easily as before.

The other unfortunate factor is that, after the Internet boom, a lot of AGT games are … not good, or worse. Currently at IFDB, only two other AGT games have generated some reasonable interest and success in terms of reviews, the first being Cosmoserve by Judith Pintar. Interestingly, that game, like LAKE Adventure, is largely about someone interacting with a computer (and specifically a parody of CompuServe). It even features, as a parody, Wisconsin: The Adventure Game by fictional author R.J. Wright, whose initialed, alliterative name is eerily close to my own. IFDB ratings aren’t always an accurate picture of game quality, of course, but even Son of Stagefright by Mike McCauley, a winner of the annual AGT competition, has only garnered a single (five-star) IFDB rating.

No, instead the bad AGT games are much more famous. They include Detective (which later received the Mystery Science Theatre treatment) and, of course, The Incredible Erotic Adventures of Stiffy Makane. Prior to this year, only five AGT games had ever been entered into IFComp, and while none did particularly well, several were particularly bad, including last place in 1996 and third-last in 2003. I imagine that once enough people made an implicit assumption that any game created with AGT was likely to be amateurish and bad, whatever life AGT may have still had was quickly extinguished.

The thing is, AGT isn’t bad. It’s perfectly serviceable. And I might even recommend it if it wasn’t such a pain in the ass to deal with. I wrote the AGT code in Visual Studio Code, but all the compiling has to be done in DOS. I was somewhat astonished to learn that the DOS implementation of the AGT interpreter and the AGiliTy version, which is used in modern interpreters like Gargoyle, aren’t exactly the same. (AGiliTy is largely the same and its small changes are generally better.) And then there was the matter of making sure LAKE Adventure could be easily played for the Comp, which required a lot of fiddling to make DOSBox run on a webpage while also giving offline players a file they could use for one of three interpreters.

Beyond that, it took a reasonable amount of rejiggering to make AGT compatible with modern IF players’ expectations. The most interesting example is that one does not X anything in AGT to examine it. Instead, you must EX it (so, EX DRESSER rather than X DRESSER). Similarly, there’s no concept of the player, so X ME has to be jury-rigged, along with a bunch of other verbs that Inform has already cheerfully prepared for you.

So, my two takeaways from the AGT experiment that might be helpful for other parser authors are:

1.) You can make a good game / story with any competent development system. The issue of “Which system should I choose?” occasionally pops up in the forums. And the answer usually is: Whichever one makes the most sense for you to use. I guess I’ll add to the chorus of voices and say I agree. I think my only addition (also suggested by others) is that the choice should be Inform 7 by default. It’s the most widely used, highly tested and highly capable. But if the natural-language code doesn’t make sense, of if you need to accomplish a very specific task (such as displaying an image with every room, in which case Adventuron would be my clear choice), pick whatever contemporary system speaks to you. Top-ten Comp entries have been created in Inform, TADS, Dialog, ADRIFT, Hugo, Quest, Adventuron, and apparently now AGT.

2.) Maybe more importantly: It’s not the quality of the parser, it’s the quality of the response messages that matters. This is another case where Inform shines—its default messages are clear and typically helpful in terms of why an action did or didn’t work (and what it may have accomplished). Here is my absolute least favorite thing about AGT (in DOS only):

? EX ALIEN
You see nothing unusual.

I would argue that in a game like LAKE Adventure, an alien would indeed be something unusual. It’s just a bad error message, and while there are many messages that can be altered in AGT’s Master Edition, “You see nothing unusual” is hard-coded in. Particularly when a player enters a verb or noun that isn’t part of the game, I believe a game should either directly (“VERB isn’t used in this story.”) or cleverly (“You don’t remember the last time you saw a NOUN, but it certainly wasn’t around here!”) indicate as such. Good default responses and error messages serve double duty: they lend tone and flavor to the narration, and they let the player know if they’re on the right track. Most systems I know of allow authors to override the default responses (or, in the case of AGT, create new, more helpful responses in line with contemporary expectations). Authors should take advantage of that. For AGT, it’s a necessity.

AGT is a good language, and it could even still be relevant today if a.) there was a compiler for contemporary OSes and b.) there was an easy way to have the story play on a web page. But personally, while I enjoyed my expedition, I don’t think there’s a proven need to return. (However, if you disagree, or if you’re simply curious, I’ve placed the source code online for your perusal.)

And yet, the strangest thing happened in this year’s Comp: after a twenty-year drought, two AGT games were entered, the other being Creative Cooking by @Piergiorgio_d_errico. (And technically that game uses MAGX, a more-advanced offshoot of AGT.) And somewhat recently on the forums, @GusCE6 has been working on modifying the AGT engine and creating a game. I’d love to hear their thoughts on why AGT was their choice for game development.

As for me, as I said, the choice was both narrative and personal. The personal bit is that in LAKE Adventure, in the opening acts, you are in fact wandering the ruins of My First Game, written 1989-1991, with all its attendant cliches. I cut out a lot of the pointless in-jokes and obviously terrible puzzles and code. But a lot of my thirteen-year-old writing, including the original overarching plot—get to the birthday party!—remains. That’s my bedroom you’re starting in, my red dresser you open, my ridiculous red glasses that you’re wearing. My Vendex computer on which I made the original game is on the porch, and it’s there in LAKE Adventure, too. Go ahead, X COMPUTER, PLAY GAME, and MAKE GAME. But look out the window; it’s a nice summer day outside. See the cat on the deck? That’s my cat. Her name is Christmas. You should pet her and tell her I say hello from almost three lifetimes later.

24 Likes

I can’t say much on GusCE6’s effort (we have philosophical divergences about improving direct from DOS-based AGT’s Turbopascal source instead of improving Magx and eventually Agility (because of the hardcoding, improvements must be done in both compiler and 'terp(s) instead of only one of the two parts involved in IF, and VM-based programming in general, a type of forking whose invariably lead to mutually incompatible environments) but, as historian, as you surely have already read in the sort of “AGT postmortem” I posted here in past, I thank you for your telling of your experience with AGT back then, whose confirm, albeit not prove, my hypothesis about the undeserved bad rep of AGT, stemming from the limited peer rewiew and feedback of the era, mid-'80s to early '90s, prior of the large-scale availability of Internet, whose lead to the crop of objectively bad games, stemming from the lack of peer review and lack of feedback (often from the young coder’s immediate environment, e.g. high school classmates…)

Thanks again for opening a debate on revisiting the merits & demertis of AGT, and

Best regards from Italy,
dott. Piergiorgio.

4 Likes

Thanks for elaborating on your experiences with AGT. Very interesting.

I had a brief flare of AGT-curiosity a good while back. The poor quality of the games, the shallowness of implementation, and the stunningly unhelpful failed-command responses you also mention quickly disillusioned me.

I put up a poll on IFDB asking for the best of AGT which gave only a few results: AGT must plays? - an IFDB Poll

But I have had some good times with a few AGT-games:

Congratulations on your IFComp result! LAKE is a great game and a touching story.

8 Likes

This is a big problem for systems that are easy to use - idiots will use it. Quest is the same.

Inform and TADs require a fair bit of initial effort, which helps to weed out the idiots and you are left with better authors who tend to make higher quality games.

3 Likes

Pixie, an old hacker/coder saying is that security by obfuscating never works…

As noted in my post, the bad games rep was established prior of the 'Net boom, because many of these bad games started to circulate in the BBS circuits (eg. Fidonet), roughly during late 80s and early 90s timeframe.
during mid-90s many of these bad games ended in the shareware/freeware CD collection, then in the early 'Net archives, not few of them later ending in the gmd.de/if-archive FTP site, then today in our IF archive.

Best regards from Italy,
dott. Piergiorgio.

1 Like

A fascinating initial post. I never took the step up to Amiga, ST, or DOS back in the day so only heard about AGT games from other players and authors at the time. There was a real desire for a 16-bit, easy-to-use adventure writer back then and AGT and its various tweaked versions were popular with several people in our UK community.

For obvious reasons, I dislike some of the terms and assertions there. There is something wonderful about a tool that is so easy to use that it gives virtually anyone, even people who aren’t programmers or writers, the opportunity to experience creating their own virtual world. For many people it might be the only work they have ever created and shared with others.

I don’t play Inform games but I do spend a lot of time playing and exploring old games in these more archaic systems, You can usually find something interesting in “bad” games. At the very least they usually provide a little snapshot of time or a window into the life or interests of the author.

8 Likes

I remember I had a text game authoring system for C64 back in the day. I don’t remember the title of it, and honestly never used it to produce anything more than a single room. But it could parse two word commands.

1 Like

The big two for the C64 in the UK were The Quill and the Graphic Adventure Creator (GAC). Over a 1,000 games were written using them. And that’s just the ones that made it out of the bedroom.

2 Likes

also Quill, GAC (and later PAW) has their share of bad games, at least one being plainly the product of a teen with too many hormones and somewhat escaped in the wild and ended in the 'Net (thankfully I forgot its title, but surely I have fished that from WoS, because was a Spectrum one…)

Best regards from Italy,
dott. Piergiorgio.

1 Like

I wouldn’t want to derail an AGT thread by further digressing to talk about Quill and GAC… so getting back on to topic…

I see the original post mentions that you need to EX rather than X in AGT games. I’ve not played an awful lot of AGT games. The ones I have gone back to play are mostly ones created by people I knew back in the UK community at the time, but I can remember using X without an issue.

For example (quickly firing up the games to check) in Bob Adam’s Helvera , Sue Medley’s Oklib’s Revenge or Clive Wilson’s …Dread, using X is fine. I presume it’s not too hard to code the use of X as a synonym for examine, even if it’s not the default in the system.

Both those games started out as ZX Spectrum/Amstrad games created with systems like the aforementioned Quill/PAW and ADLAN. Looking at the brief snippets of code you posted I can see why moving to AGT from the earlier 8-bit systems wasn’t too traumatic for those authors.

I am surprised there are only about 150 AGT games listed on CASA (including earlier GAGs ones). A reflection, no doubt, of the decline in popularity of purely text adventures as we moved into the 16-bit era.

1 Like

The Sir Ramic Hobbs author, Gil Williamson, wrote a book Computer Adventures - The Secret Art which is quite good too. He was still selling new copies of it recently as I bought mine a couple of years ago; although he does include a letter that points to this very site as a more up-to-date source of advice and tips. [For the UK crowd, Gil collaborated with the famous Paul Daniels on the magician’s own adventure game!]

2 Likes

X works in AGiliTy (and therefore modern terps like Gargoyle) automatically. But in DOS, only EX works out of the box. It’s easy to make a verb synonym, so it’s not a big deal. It was just interesting to me to discover that X apparently wasn’t a universal abbreviation back then.

2 Likes

I think it was TADS that popularized the idea of X for EXAMINE. Infocom never did it. [wrong, see below]

4 Likes

Probably popularised it, but certainly it was common in the UK scene earlier than that.

Our community ended up with some obscure abbreviations too. Particular the two-word parser authors. It was common for LOUN (look under), LOBE (look behind) etc. to be used. (Never liked those!)

2 Likes

It’s weird how little conventions come about and get spread. The whole concept of “X ME” was alien to me until I came across this forum. It’s not something we used to code into adventures back in the day, in our little corner of the adventure scene.

7 Likes

Drifting into X…

if we consider that X came from the UK scene, I should point that Inform, at least from version 2, supports X:

Verb "examine" "x" "read" "watch" "descri" "check"
                                     * noun                           -> ExamineSub;

and everyone here known that Graham Nelson IS a British subject… so the british origin of X as eXamine seems more confirmed.

OTOH, TADS2’s earliest adv library, 1991 vintage, already has X, predating Inform 2 by a pair of years:

inspectVerb: deepverb
    verb = 'inspect' 'examine' 'look at' 'x'
    sdesc = "inspect"
    doAction = 'Inspect'
;

Provisionally, as Historian, I’m inclined to think that X has british origins, in the days of Quill, perhaps also because of the keyboard of the Sinclair Spectrum, back then the most popular 8 bit computer in UK (I fess up: albeit back then I prefer Commodore machines, I acquired a Spectrum for playing UK text adventures… ending being the “one-man fire brigade” when The European Computer Flame (re)ignites in debates) and MJR’s has introduced it to the US IF scene.

Best regards from Italy,
dott. Piergiorgio.

3 Likes

Infocom did it in Arthur in 1989, at least. Maybe in a few other of their late games; I can’t remember.

2 Likes

From the creation of v5 onwards, I think they definitely did it.

1 Like

I think you’ll find that there’s over 250 AGT games. I know I have a lot that aren’t on CASA. The two main platforms were PC and Atari ST. Some worked on one and not the other, depending on the version of AGT that was used.

2 Likes

roughly confirm: my AGT binary (that is, story files) directories contains ~70 different IF, not counting different version (for example, lost in space and tossed in space are the same story, changing only the (copyrighted) PC & NPC names and generally removing the references to the copyrighted setting)

oh, the celebrated bad (A)IF, Detective and Stiffy Makane aren’t included in this on-system collection…

Best regards from Italy,
dott. Piergiorgio.

1 Like