Test-driving TADS 3

2011-03-23

After taking Inform 7 out for a spin, it was time to look into its primary competitor, TADS 3. The procedure was the same: take the toy, retro-style text adventure I wrote last year and see what it takes to port it, more or less intact, to one of the big authoring systems. As with I7, I installed the official development environment. The difference is that the TADS 3 Workbench doesn't have a Linux port. But the Windows version runs just fine under Wine (with exceptions -- don't try accessing the manuals from the Help menu), so it was just as easy: download -> install -> go. Which, by the way, is why I didn't insist on that part last time: there's nothing to say about it.

Well, there is one difference: T3 gives the option to start with an example game, and comes with much more documentation to boot. Despite this, it was a slow start. In order to do anything remotely advanced, I had to peruse three manuals (Learning T3, the T3 Tour Guide and the Library Reference), and then there was stuff I could only figure out by grepping through the standard library. That, by the way, is a method recommended by the developers themselves, but it might not be for everyone.

On the plus side, TADS 3 works. I could hardly bring myself to take a break once started, and progress was steady, if slow, with only minor annoyances along the way. Another reason for the slow going, in my opinion, is that the code is sprawling. Not verbose, mind you -- it just seems to gobble screen space like crazy for some reason. Compare:

	living: Room 'Living room'
	    "This is you one-room apartment in eastern Bucharest.
	    A couch and an old TV set are on opposite sides of a coffee table."
	    north = balcony
	    northwest = kitchen
	    west = hallway
	;

	+ Chair, Heavy 'couch' 'couch';
	+ Surface, Heavy 'coffee table' 'coffee table';
	++ Thing 'remote control' 'remote control';
	++ Thing 'beer bottle' 'beer bottle' "It's empty and sad."
	    dobjFor(Drink)
	    {
		verify() { }
		action() { "You turn the bottle upside-down. It's really empty!"; }
	    }
	    dobjFor(Break)
	    {
		verify() { }
		action() { "On second thought, you need to return it intact."; }
	    }
	    dobjFor(Open) { verify() { } action() { "Too late, alas!"; } }
	;
	+ OnOffControl, Heavy 'tv set' 'TV set'
	    "Unfortunately, it's broken. Again."
	    dobjFor(TurnOn) { action() { "Unfortunately, it's broken. Again."; } }
	    dobjFor(Watch)
	    {
		action()
		{
		    "You look at the blank TV screen for a while.
		    It's actually better than most channels.";
		}
	    }
	;
	DefineTAction(Watch);
	VerbRule(Watch)
	    'watch' singleDobj : WatchAction
	    verbPhrase = 'watch/watching (what)'
	;

with the original Javascript:

	current(room(
		"Living room",
		"This is you one-room apartment in eastern Bucharest."));
	tv = thing("TV set", "Unfortunately, it's broken. Again.");
	thing("couch").$use = thing("couch").$sit_on =
		"You rest on the couch for a few moments. Aah, comfy!";
	thing("coffee table");
	thing("remote control").is("portable");
	bottle = thing("beer bottle", "It's empty and sad.").is("portable");
	bottle.$drink = bottle.$use =
		"You turn the bottle upside-down. It's really empty!";

	exit("North to balcony").altname("n").to(room("Balcony"));
	exit("Northwest to kitchen").altname("nw").to(room("Kitchen"));
	exit("West to hallway").altname("w", "out").to(room("Hallway"));

	tv.$turn_on = tv.$switch_on = tv.$use = tv.description;
	tv.$turn_off = tv.$switch_off = "It's already very much off.";
	tv.$watch = function() {
		say("You look at the blank TV screen for a while.");
		say("It's actually better than most channels.");
	};

which is half as long, even with the behaviors I had to implement myself. Speaking of which, another upside of T3 is the enormous amount of default functionality. Even automatic exit listing is packaged in and can be activated manually or at the start of the game. Extensions are supported as well, though I couldn't figure out where to get any. Assuming somebody needs to extend this beast at all...

Long story short, I ended up working on the port for nine hours, with a single break, during which time I implemented the whole first section of the game, minus some behaviors related to the cat -- there are quite a few, and some of the manuals may not be entirely up to date anymore. Call me biased (hello? professional programmer here), but TADS 3 looks great so far.

Sadly, it appears to have fallen by the wayside. In the IFComp 2010, only one game used this platform. There were more games (three!) using exotic options than this solid, established authoring system that was used to create many award-winning titles. The rest, of course, used Inform 7. And I can't help but think that I should have payed more attention for the past few years: is the IF community turning into a monoculture?

Tags: , ,