My Preliminary Survey of Text-Adventure Development Systems

Hi guys,

I’m a fan of point-and-click adventure games, but things like animation, voice-acting, and a music score are beyond my means. Fortunately, I just discovered the IFComp for text games and would like to enter it, but I’ll need to choose a development system before I attempt that. This is my preliminary survey of all the multi-platform systems I could find. Let me know if I missed anything of significance. (I’m leaning towards TADS 2 right now.)

AdvSys

Full-sentence parser; LISP-like syntax; minimal library code; minimal documentation spread across three files; no debugger; UI minimally supports Glk, but could provide more if it targeted the Magnetic VM.

Alan 3

Full-sentence parser; English-like syntax; capable library code; well-documented; no debugger; UI supports much of Glk.

Dialog

Full-sentence parser; Prolog-like syntax; library code still in development; documentation still in development; symbolic debugger; UI supports some of Glk.

Inform 6

Full-sentence parser; ALGOL-like syntax; capable library code; well-documented; symbolic debugger; UI supports all of Glk if targeted to Glulx.

I7

Full-sentence parser; English-like syntax; capable library code, but much of the code is opaque and written in Inform 6; well-documented; symbolic debugger; UI supports all of Glk if targeted to Glulx.

Hugo

Similar to Inform 6, but UI only provides minimal support for Glk.

TADS 2

Full-sentence parser; C-like syntax; capable library code; well-documented; source-level debugger; UI supports all of Glk and has more features in its native UI.

TADS 3

Similar to TADS 2, but the library is more elaborate and opaque, and the debugger only runs in Windows.

ZIL

Similar to AdvSys, but it targets the Z-Machine.

1 Like

There’s always more stuff to find in the off-brand, bottom-shelf, and dollar-store equivalents of the scene.

A few others that also qualify as multi-platform and are more-or-less currently supported:

  • ScottKit (Scott Adams format)
  • Adventshark (Scott Adams format)
  • DAAD
  • Adventuron

If this is your first attempt at writing a parser-based text adventure, I recommend writing it in Inform 7, which is far and away the most popular language for writing such games.

The way you describe the languages leads me to suspect you already have experience writing software. In that case, as you know, it is extremely rare (and IMO unwise) to “pick” a programming language in the way you’re describing here. Most people just use whatever language their peers are using to solve their problem domain, and that’s great, actually.

Imagine a smart expert in linguistics, totally new to programming, doing a write-up like this for C, Java, Python, JavaScript, C#, Swift, Ruby, PHP, and Rust. The linguist could probably identify advantages and disadvantages in syntax and structure for all of these languages, but without familiarity with the problem domain and the language community, the linguist might be as likely to pick Haskell or LISP over any of the others, based solely on the features of the language. (“What’s a debugger?”)

Now, I know you’re not making that mistake… you’re looking at output formats, debugger support, similarity to other languages you know, breadth of the standard library, etc. Those are good criteria for choosing a general-purpose programming language, but those probably aren’t the most important features in this case.

Consider querying a database. You could do it in C or in LISP, but the industry has discovered that using a declarative query language is better, and SQL is by far the most popular language for doing it, despite the fact that SQL doesn’t have much in the way of step-wise debugging support. If you’re querying a database, trust me, you should just use SQL. (At a minimum, you should learn SQL before attempting to query a database in another language.)

Similarly, you can implement an Android app in C#, but you should almost certainly implement it in Kotlin or Java instead. You can serve HTML over HTTP in Haskell or LISP, and they’re great languages, but you’ll quickly find yourself re-inventing a templating language, when you could have just used a language that’s designed for that, off the shelf, giving you access to a community of people to answer questions, solve problems, and share libraries of code.

Text adventures aren’t like other programs you’ve written that run step by step from beginning to end; they’re programs to cooperatively generate text, incorporating commands from the player while subtly guiding the player how to use the correct commands to win. Coding a parser-based text adventure is mostly about declaring data (what are the rooms and objects in the game) and a rules engine of events that fire when certain conditions occur. If you’ve implemented a rules engine in a C-like language before, I think you’ll find that being C-like is actually worse.

Write your first game in Inform 7. It’s weird, but you’ll learn a lot. Write your second game in TADS 2 or whatever. (Or, heck, try porting your first game from Inform 7 to TADS 2, and see how it feels.)

5 Likes

Adventuron

Full-sentence parser. Well documented. No containers. Colourful text. Gamebook and parser modes available. Lots of tutorials. Compiles to pure HTML or targets 8-bit platforms. Database style coding (tables of locations, connections, events, objects, etc).

I spent a couple of afternoons with Inform 7. It’s impressive, but I’ve never seen another programming language that disguised its structure to that degree.

The code is very readable, but, ironically, I had a hard time seeing what I was actually coding. I think I7 transpiles its code into Inform 6 before it generates the byte-code, but I couldn’t find a way to see that code first, or understand what it’s doing afterward, without using the Nitfol debugger, which is too low-level for me.

1 Like

It does, though the generated I6 is very messy and not very readable (and I wouldn’t recommend trying to read it unless you’re doing low-level debugging). You can find it in [project].inform/Build/auto.inf.

1 Like

You may like this article: Inform 7 for Programmers.

2 Likes

Thanks, I didn’t find that one.

1 Like

Have you worked with SQL? I often find that I’m writing it at two levels of abstraction: first, at the high level of declarative query, what data I want and how to join it together, and then, optionally, if I’m trying to optimize the performance of a query, I run an analyze on it to think about how the database decided to implement the query’s plan.

If you start trying to learn SQL by mentally translating all SQL queries into their query plans, you’ll miss the forest for the trees. “Look how SQL disguises its true structure,” you might say, as if SQL is a tool for disguising imperative query plans as declarative queries.

But SQL is not a disguise. The declarative queries are its true nature; the imperative code is the encapsulated implementation, which you consider only when optimizing performance, and even there, usually just by adding an index, not by rewriting the SQL.

So, too, it is with Inform. Inform 7 isn’t imperative code wearing a funny hat and mustache. If you’re mentally translating it into another language, even Inform 6, you’re missing the point.

4 Likes

Thanks for the feedback.

I’m going to give myself the rest of the week to design a small game before I choose a tool to implement it with.

Speaking of design tools, I plan to use the DOT language with Graphviz to create the puzzle charts that Ron Gilbert recommends, unless you guys have more suitable tools lying around.

Inform 7 is an amazing accomplishment; that said, it’s always put me off. Not really sure why. Perhaps, ironically, it just feels unnatural to me.

Since your primary interest is cross-platform, I’m going to take a wild stab and say you’re using some sort of *nix environment.

Though I personally disagree with dfabulich’s recommendation of authoring system, their points are valid. If you’d like plenty of community support, the ability to reach an audience on pretty much any system, and be able to work within your native *nix home, Inform 6 is the way to go.

ZIL is relatively new, but it seems to be growing in popularity. Since it targets the z-machine, you’ll have the same type of superior cross-platform availability.

Now a question back at you: What do you mean by AdvSys targeting the Magnetic Scrolls VM? I wasn’t aware its compiler could do that.

1 Like

It can’t. It was just the first system I took a look at, and after I looked a few more, I started wondering why it didn’t get much use.

It seems like it would be more attractive if it could use the graphic and sound capabilities Magnetic has along with Magnetic’s Glk interface. I don’t think anyone else is targeting the Magnetic VM.

So, too, it is with Inform. Inform 7 isn’t imperative code wearing a funny hat and mustache. If you’re mentally translating it into another language, even Inform 6, you’re missing the point

Except, unlike SQL, Inform 7 is indeed wearing a funny hat and mustache. SQL is what it is. You’re using SQL in SQL form. There’s no final boss underneath the robes. I7, on the other hand, uses sentence structure as its syntactic sugar, and I7’s main job is to take that and parse it into I6 code, then compile it into z-machine.

Some people like funny hats. Some people don’t. But don’t tell me someone isn’t wearing a funny hat when it’s sitting on their head.

1 Like

By that definition, every high level language is wearing a disguise.

4 Likes

Well, AdvSys is from the '80s. Until you mentioned it, I had never really dug into it; now I note that the author seems to have put up the original source on github. Who knows if it works as-is?

I’ve always been interested in the lesser-known systems, but I’m just peculiar.

Oh! Another thing you might try: Roger Firth’s Cloak of Darkness

That’s an implementation detail of the compiler. A compiler for the Inform 7 language doesn’t have to be implemented by translating to Inform 6 as a first step, or at all; Graham has given talks about how that translation process is changing in upcoming releases.

The first C++ compilers worked by translating C++ code into C code, which was then run through an existing C compiler. That detail may have been of interest to people working on the compiler, or writing very low-level code with it, but it wouldn’t have mattered to most people writing C++ code: they could have upgraded to a modern C++ compiler, which bypasses C, without noticing the difference.

By that definition, every high level language is wearing a disguise.

Even assembly is just a disguise, of course. But, as it happens, I like its jaunty little cap!

Still, I know my assembler outputs binary. My C compiler compiles to a low-level virtual machine before being compiled further. Only in rare cases is the disguise so thin as Inform 6-7. Unless I’m factually wrong about the current state of the compiler?

So my rhetorical response using my opponent’s analogy is still factually accurate? Excellent!

“Speaking of design tools, I plan to use the DOT language with Graphviz to create the puzzle charts that Ron Gilbert recommends, unless you guys have more suitable tools lying around.”

I built a puzzle dependency chart builder and it uses graohviz in the background but it should be easier to use that raw dot syntax.

(Needs a non mobile browser to load the editor)

https://eeyo.io/pdcbeta

1 Like

So my rhetorical response using my opponent’s analogy is still factually accurate? Excellent!

It’s still as inaccurate as ever: you’re obsessing over a detail of how a particular compiler is implemented, and using that as the basis for your objection to using the language it compiles, even though the language can (and will) be compiled differently by other implementations.

3 Likes

That doesn’t really apply in the case of I7, though; while it’s less common in the end story, many extensions rely heavily on inclusion of fragments of I6 code that in turn rely heavily on the precise structure of the underlying I6 libraries and the fact that everything transpiles to I6 as a first step. So people would absolutely notice if that stopped happening.

I don’t see that as all that unusual, though. Languages like TypeScript only ever transpile to JavaScript, because there is no need to go further; JS is already the standard language of the particular VM that they’re targeting, even though the browser has to further compile the JS before actually executing it. (It may be JIT, but it’s still compilation.)