TADS 2 - actor-dependent doors/obstacles?

I’ve studied TADS a bit but I’m fairly new to actually coding for it. I’m trying to lay the groundwork for a game project, and one of the things I’d like to have is doorways/passageways that block or permit travel based not on the state of a door object, but the properties of the actor trying to pass through them. (Specifically, based on their size, but I can think of a few other types of obstacles this behavior could be used for.) The simplest approach I can see for implementing something like this is putting a check in the destination property, but I’m not clear on whether I can just declare the method as destination(actor) and get the actor which is making the attempt as an argument. Is it possible to do this? Is there some other way to find that out if it isn’t?

Not an answer to your question, just a new question: Why use TADS 2? It’s completely obsolete.

TADS 3 is more powerful, and is currently supported. If it’s too complex for your taste (no blame – it’s too complex for a lot of people), you may want to try Eric Eve’s adv3Lite, an alternate library that uses the T3 compiler but has a simpler workflow and also some nice extra features. Both are very well documented. For download links, try http://ericeve.livejournal.com/.

I’m avoiding TADS 3 because just looking over the documentation made my head spin. TADS 2 is, aside from some clunkiness and limitations, simple enough to be easily picked up (at least with my particular programming background) but full-featured enough to be extensible to do basically everything I want quite simply - except for the part where it kinda looks like I’d have to rewrite adv.t to get the move methods to pass an actor. I’m looking at WorldClass, which does have that functionality but seems a little over-complicated in other ways (though nothing on the level of TADS 3,) but I suppose it wouldn’t hurt to take a look at adv3Lite while I’m at it.

You might like adv3Lite. The syntax is very C-like, and in fact identical to the standard T3 syntax, but the library is simpler than the adv3 library that ships with T3.

Also, Inform 6 is still viable and supported. It’s different from T2 in its syntax, and nothing at all like Inform 7, but … well, it was the first IF language I learned, and I have a lingering affection for it. If you’re looking for something that’s less convoluted than T3, I6 might work for you. One advantage of I6 is the wide availability of interpreter software, including web browser play and play on Android devices. I don’t know if T2 has any equivalent, but if you’re looking to the future when your game is released, the web browser and Android interpreter thing is worth knowing about.

Yeah, I’ve looked at Inform, but I don’t care for the model or the language. (And Inform 7 seems like a bad joke where code-to-content ratio is concerned…) TADS 2 I like because the syntax is instantly familiar to someone who started learning to program when the primary languages were still C and Pascal (but with less bookkeeping than either) and the object model just makes sense for an adventure game. I’ll investigate some other options, but I did notice that T3 has a handful of features that would be useful for my project, so I might give it another go and just see if I can find a more manageable text than the full library reference…

(If I were up to writing a parser, though, I’d almost be tempted to just do the whole thing from scratch in Smalltalk…)

As far as portability, I’m not too worried - there’s at least one project out there (Gargoyle) that will run both TADS 2 and 3 games quite well, and I’m not desperately concerned about browser or mobile devices.

The first time I tried to learn T3, the rather chaotic state of the documentation baffled me. (Bear in mind, I’m not a real programmer, just a bumbling amateur.) I feel the best way to approach it would be to read Eric Eve’s “Learning TADS 3.” It’s fairly straightforward, and fairly comprehensive. The Library Reference Manual is great for finding certain details, but until you understand the system the LRM is a bear. The LRM is automagically constructed based on the detailed comments in the library source code, but that’s all it is – there’s nothing in it of a tutorial nature.

If you’re curious about what T3 code looks like, you can go to this page (http://musicwords.net/if/pepper.htm), scroll down, and download the source code for the game. Eric and I co-wrote the game, with the result that the indentation style is not 100% consistent. The more complex bits, especially the reporting of what happens when a certain magical item is used, are entirely Eric’s brilliant work. I did more of the design and the basic stuff.

I would suggest to read “Learning TADS 3” or “Learning TADS 3 with Adv3Lite” first, depending on which library you would like to target. Those books will take you through the learning process in systematic manner, explaing gradually the language and the library. Chapters 1-7, 9 and 14 are the core in my opinion.

(Ah, Jim was quickier than me…)

If you were working in TADS3, I’d suggest something like this to prevent someone from traveling from Room1 to Room2 based on the actor’s size…

Room1 : Room
 west : TravelMessage
        destination = Room2
            return (!traveler.size > 3); // People larger than 3 can't get through
            "The door is too small and you are too big. ";

Caveat: Like Jim, I am self-taught and not a programmer. (And unlike Jim, I’m still very much a newbie). But I’ve been building a game in T3 for a while now and starting to get more comfortable with it. There is probably a more elegant way to do this using a door object itself, rather than the direction property of the room, but I haven’t done that, whereas I know that the above code actually does work.

I don’t know if there’s anything analogous to the above in T2. I also don’t know anything about Adv3Lite, but I definitely would recommend heeding the advice of the good folks on this forum.

Best of luck,


Also, with regards to T3 documentation, you should definitely also check out the Tourguide and Getting Started in TADS3. Along with LearningTADS3, those three manuals have taken me deep into development, and I have only occasionally had to dive into the Library Reference Manual. I couldn’t imagine trying to learn TADS directly from the LRM.

Blargh, I give up. Even “Learning TADS 3” is making my head spin. No disrespect to the folks behind it, but T3 just screams “second-system effect” - and adv3Lite doesn’t actually appear to address that much. I’m going back to TADS 2, maybe WorldClass…

I would rather say “reasonably complete”, but well…