Alan 3 is where it's at

So, my first attempt at writing IF started with a relatively obscure MS-DOS program called the Computer Novel Construction Set. This is actually an insanely cool program, a few minor annoyances aside. What I really liked about it was it’s unique windowing system.

Room descriptions go up top in their own bordered window. Player actions are displayed in a separate one, events in another, inventory listing in a thin one along the bottom, and “what you see” next to that. Command line below all of that. What I loved about that design was messages would stick. If something just happened, that text might stay on the screen for a while while you did other things.

The manual is superbly well-written. Everything was clearly explained. I never really felt lost until I tried doing things that weren’t supported. This little miracle program is ideal if you’re just wanting to create a VERY old school adventure, as you don’t write code. All the creation is handled through menus (also well designed).

There’s one glaring issue with it, though: there’s no kind of variable support. It has booleans, essentially, as states. You can switch states ON and OFF with player commands and events. You can also create or destroy objects. You can really do a ton of things with just those systems by chaining a series of events after a command is entered. But it’s unwieldy. To do anything complex you’d need to diagram a series of state switching. I had a lot of fun tinkering with it, but it wasn’t enough.

EDIT: Just to be clear: Everything I’ve just said above pertains to the MS-DOS construction set, not to Alan.

Alan was my next find, and what a find it was. I only looked at it briefly, because Inform was in my “to check out” list. I jumped right into Inform (7) and I was having a great time. Right up until I tried to make a simple scene start after moving rooms.

You see, Inform (7) is awesome. In a monolithic “you’ll never understand it all” way. But it’s also seductive and deceptive. The seduction begins after you read through some of the manual and examples. Inform wants you to believe that even your grandmother can program games–you just type sentences, like plain english. I couldn’t believe it would be that easy. Of course, nothing ever is–right?

Yes, this post might be getting longer than I intended. So be it. I don’t believe in this “TLDR” that all the cool kids use. RTFM was our mantra back in the day, and I won’t abandon it.

The seductive nature of I7 lures you into thinking you can program just like La Forge can on the Holodeck. “Computer, create an algorithm that simulates candles in this room. Put a bookshelf there. Put a desk here, and a chair there.” And the Enterprise computational system would translate that extremely high level syntax into low level magic. After probably… an hour of talking like that, I bet you could have the main simulation done. The Computer fills in the blanks with lots of assumptions. Super cool stuff, and I imagine that in some ideal future down the line, that’s exactly what programming will be like.

And Inform 7 wants to be that, which is why it’s so deceptive. Because the position of words still matters, in ways that aren’t easy to figure out from the compiler. And it doesn’t escape the need for semi-colons and periods, and even colons. Keeping track of that is a minefield all by itself. No, the biggest issue comes when you write something that should absolutely make sense. Something you cobbled together from examples in the cook book, etc. But you forgot a period. Or, you tried to add a value to something that can’t handle it.

Because everything is named after regular, english words. At first this seems incredibly intuitive. Right up until you run into the dreaded: “I can’t find a verb I can make sense out of.”

This little error message hit me where it hurts all the time when I tried to break away from rote copying of the example lines. There are other messages that are also cryptic in that they don’t really tell you that your actual problem was you used a colon instead of a semi-colon. Instead it just tells you it doesn’t like the way you used “when” because when should have been at the beginning of the sentence. What?

This “natural language” approach is a great idea that I think bears more development, and not just in the IF realm. But it just breaks down so easily if you have to take a half hour to track down one mistake. I’m sure everyone has run into these situations and knows exactly the kind of helpless frustration you experience when you frantically try moving words around, or start blocking off snippets of code to isolate it. Do these problems exist in other languages? They do. But the syntax in these languages isn’t nearly as murky.

So I went back to Alan and started writing in it. Holy hell, what an improvement (for me, anyway). You still have access to features like rooms within rooms, defining your own verbs, and so on. But the syntax is clear and clean. It’s rare that I can’t track down where a mistake is, because it forces you to be clear and succinct in the first place.

Now, don’t get me wrong, you have to write more lines and learn some more structure here than you do with Inform. Personally, I think that’s a strength. I’d rather be forced to write another block or two in Alan than pin down one misuse of “instead of entering the school” because actors can’t enter locations.

Was this a rant? I’m not sure. I’m just sharing a little love for Alan 3, because I don’t see a section for it on these boards. And that’s a shame. It’s a great system.

8 Likes

Only commenting because this seems like a critique and alternative to Inform 7, but I’m wondering if TADS 3 (Adv3 or Adv3Lite versions) or QuestJS are on your radar at all.

I’m not saying you should switch from Alan to either of these; just wondering what other systems you’ve looked at before.

This sounds like a really good UI, at least for sighted players. I was poking at a similar thing a few years ago; it’s cool to know a system has found success with something similar.

This is the primary reason why I left Inform 7 for Adv3Lite. I didn’t know about the larger community here, and didn’t know there was a better documentation resource being worked on.

Inform 7 is still a coding language, yes, but I prefer how TADS 3 is more explicit about it.

This would be the deal breaker for me. I like to make games that stray quite far from conventional parser mechanics (which is why it’s shamelessly taken me a while to finish a game lol), so I would need a lot more than just booleans.

3 Likes

Just a quick reply, the stuff you mentioned was pertaining to the MS-DOS program (Computer Novel Construction Set). I edited a line in there to make that clear.

Alan absolutely has support for variables and pretty much everything else you could want. I don’t know if there was any confusion on your end or not, but I’m going to err on the side of caution. The organization of my comments in the original post could be much better!

Haven’t looked too closely at TADS, as the syntax looked a little too dense. Or maybe it was ADRIFT. Anyway, one of those uses heaps of parentheses, which brought back traumatic memories of trying to program in LISP! I’ll take a second look at TADS though.

2 Likes

Ohhhhhhhh, okay lol.

I can’t get ADRIFT working on my OS, so I’m far from an expert, but you might be thinking of TADS. ADRIFT works with a UI for creation, I think. Not sure if it supports scripting of any sort. I’m working off of a decade-old memory of using it on a Windows machine, though.

Lol, yeah, we have parentheses, braces, brackets, double-brackets, two kinds of quotation marks, preprocessor logic, macros, and more! I’m mildly irked that it’s not a strongly-typed language, but it’s hardly a deal breaker for me.

I’m gonna look up Alan 3 syntax, because I’m curious to see how it’s structured, if the amount of symbols in TADS 3 is a bit much, in comparison.

EDIT: Oh!! That’s a cool syntax!! It reminds of BASIC, kinda, where it uses keywords instead of symbols! I think there was also a mapping program for IF that used a similar syntax!

3 Likes

Yeah, I didn’t think about the resemblance to BASIC. Maybe that’s why I like it so much. Brings back memories. Anyway, I’m guessing you’re either a linux or apple type. But either way, it runs fine on linux for me. If you do decide to mess around with Alan, get the V2 standard library, and the Alan 3 tarball. It’s critical that you skim the manual for the standard library, in particular this little block which you must add to all source files.

Failure to do so results in no compile.

THE my_game ISA DEFINITION_BLOCK
END THE.

IMPORT 'library.i'.

And I’m sure you’ll figure the rest out from there.

3 Likes

Nice article. I agree with your main points re Inform and Alan. However, you should have mentioned that you were talking about Inform 7, not Inform 6. Inform 6 is a completely different programming language. It is object oriented and is somewhat similar to Alan, Adrift and TADS. I would hate Inform 6 to get a bad name because of Inform 7.

7 Likes

One of these days, I gotta learn PunyInform and Inform 6, just for exploration purposes, if anything else.

5 Likes

It’s a pretty steep learning curve, but it’s worth the journey, even if only to get your game deployed to the maximum number of platforms.

4 Likes

So what you’re saying is: I should masochistically do a speedrun crash-course to learn it? :wink:

3 Likes

I was probably exagerating. The basics are pretty easy to learn, especially if you’re already a programmer, which you are. Some of the really fancy stuff can take a bit more effort, but it’s crucial that you understand the basics first.

PunyInform is a bit more restricted, but not excessively so. In the first three PunyInform jams, people have written reasonably good games in just three weeks. Some of the authors have been first timers.

3 Likes

Good catch, I fired up an edit and threw a couple of 7’s in there for good measure. Hopefully nobody will get confused!

3 Likes

Dialog also can be compiled to Z-machine binaries and should run on as many platforms as Inform-made games. I need to try to write more than hello world with it, but I really like what I read in the manual.

2 Likes

True, pure UI, no scripting. That is both its strength and weakness.

Nice comparison :smiley:

Alan sounds very intriguing. Can Alan games be played online?

3 Likes

That’s true, but Dialog wasn’t mentioned in the post I was responding to. ZIL is another that compiles to Z-code. I think that both Dialog and ZIL will compile to smaller files than standard Inform 6 and PunyInform, but all four produce tiny files compared to Inform 7. Most Inform 7 games are compiled to Glulx and that won’t run on any retro platforms.

But this is probably a bit off topic.

2 Likes

I really have NO idea. It’s a great question, though. I think gargoyle reads alan game files, and it may have support on other interpreters. The most unfortunate thing about alan is scarce documentation (although what is available is certainly good) and support. The mailing list is a graveyard at his point, and many links end up in 404-ville.

I used gargoyle to process Inform 7 files, and it worked well. Haven’t tried it for Alan, since there’s no need. Alan comes with the compiler (alan) and the interpreter (arun). I edit everything in vim, or right now while I’m in the process of building a custom library, in geany (any tabbed editor will do).

I’m a graybeard dinosaur who literally does most things out of a pure xterm window, and only fire up gui applications when I’m not on that command line.

There’s probably a way to do it by hosting it on a server, and emulating a unix environment.

3 Likes