TADS Overview
TADS is a set of programming tools specially designed for writing adventure games. TADS consists of:
- A programming language, which resembles C and Java. TADS is a powerful object-oriented language with high-level string and list datatypes and syntax specially designed to make adventure game object definitions concise and readable.
- A compiler, which reads a set of source files written in the TADS programming language and produces a portable binary game file. Once you compile your game, you need only give players the compiled binary file; you don't need to distribute your source files to let people play your game. A compiled game file is completely portable - you can simply copy the file to any computer that has a TADS interpreter and run it.
- A library, which provides a set of generic adventure game definitions. The library is written in the TADS language, so you can change it or even completely replace it if you want to go outside the usual conventions. The library provides a large set of object class definitions for the kinds of things that often appear in IF games, and you can use the library classes directly or use them as building blocks to create more customized object types.
- On some systems, an interactive debugger, which lets you examine your program's execution in order to find and fix programming errors. The debugger lets you step through your source code a line at a time, examine variables, set "breakpoints" to stop execution at particular points in the code, and monitor variables to catch specific value changes. The debugger gives you a direct view of the inner workings of your program as it executes, making it much easier to track down logic errors, or just to understand how a piece of code works.
- An interpreter, which a player uses to run your game. TADS interpreters exist for many operating systems, and each version has been customized to conform to the look and feel of its operating system. Since the interpreter provides the human interface, and each interpreter is customized for its system, a TADS game automatically adopts the correct local look and feel for each system it runs on.
If the interactive fiction community agrees on one thing, it's that you're much better off using one of the existing IF systems to write a game than you would be using a general-purpose language like C++ or Java. Hundreds of non-commercial IF games have been released over the past decade or so, and practically all of them were built with one of the popular IF systems. That's not to say that it's impossible to write a game "from scratch" in Java or C++ or some other general-purpose language; it's just that it's a ton of work. Most people who set out to write a game from scratch end up spending so much time on the basic infrastructure that they never get around to actually writing a game. The main reason most people would consider writing from scratch is that they want maximum flexibility - but most authors have found that the best IF systems are powerful and flexible enough that there's not much reason to go it alone.
Once you decide you want to use a dedicated IF development language, you'll need to pick a system. Several excellent systems are available, and which one is best for you depends on your needs and tastes. So we won't try to tell you which one is best; instead, we'll just tell you about some of the strengths of TADS.
Multimedia Capabilities
TADS can be used to create pure text games, as well as games that mix text, graphics, and sound. TADS uses HTML to specify formatting - this gives you the ability to display JPEG and PNG graphics; control text fonts, sizes, styles, colors, alignment, and layout; play WAV, MIDI, and MP3 sounds; divide the screen into "frame"-like areas; and create clickable hyperlinks that allow players to enter commands with the mouse.
The multimedia features are fully supported on Windows and Macintosh, and the TADS approach to multimedia ensures "graceful degradation" on other platforms that only offer text-only interpreters - in other words, even if you use the full multimedia features of TADS, your game will still work on text-only interpreters, just without the graphics and sounds and fancy text formatting. The adjustment to a text-only environment is largely automatic; in many cases, you won't have to pay any attention at all to the differences between the text and multimedia interpreters when writing a game (in other words, you won't have to write lots of conditional code for text vs. multimedia).
Infrastructure
A major reason to use a system like TADS, rather than a more generic programming language like BASIC, C++, or Java, is that the specialized IF systems give you a ready-made infrastructure that would take months (at least) to build from scratch with a general-purpose language, and months more to test and debug to the same level of quality as the best systems. These infrastructure pieces aren't optional - players are accustomed to the capabilities of games produced with the major systems, and few will put up with games that don't live up to the same standards. Some of the features that TADS gives you with little or no work on your part:
- Saving and restoring game positions
- Multi-turn "undo" to take back moves
- Automatic text formatting (word wrapping, collecting runs of whitespace, punctuation spacing)
- Command recall and editing, text buffer scrollback (on most systems)
- User-controlled text file capture of game transcript
- Bundling of graphics and sounds into the compiled game file for easy single-file distribution of multimedia games
- Optional binding of a compiled game into the interpreter executable for easy single-file distribution to players who don't want to download a separate interpreter program
Portability
Games written with TADS are instantly portable - without so much as recompiling - to most major operating systems: Windows, DOS, Macintosh, numerous varieties of Unix, and more. After you compile your game, you simply distribute the compiled binary file - no one ever needs a copy of your game's source code, and no one ever needs a different version for a different operating system.
The source code for TADS, written in C and C++, is freely available, so even if an interpreter isn't already available for your system of choice, you could port it there. The TADS source code was originally designed for easy portability and has had its portability honed with years of experience on a wide range of systems.
Command Parser
TADS provides a pre-built, powerful, highly customizable command parser. Writing a command parser from scratch could alone consume months of programming effort, and like the infrastructure features, the parser is an area where players have high expectations. The TADS parser provides automatic resolution of ambiguous noun phrases, multiple nouns per command, phrases like "all" and "all except," multiple commands per line, commands directed to other characters, "again," abbreviated words, pronouns, complex verb structures ("pick up the box with the tongs"), numbers, quoted strings, and punctuation.
World Model
In addition to these basic infrastructure features, though, the IF systems give you a detailed world model, with a large set of pre-defined objects. TADS provides an object-oriented library of object classes that you can use directly to define the objects in your game, and which you can subclass to customize the TADS world model. TADS includes library classes like these:
- Rooms (locations in the game)
- Doors
- Items that can be carried
- Items that are fixed in place
- Containers, surfaces, things that can be opened and closed, transparent containers
- Keys and things that can be locked
- Chairs and beds
- Vehicles
- Actors (characters)
- Dials, switches, and buttons
- Clothing
- Lights
- Food and drink
- Things that can be read
Author-friendliness
Another important benefit of using a specialized IF system instead of a generic language is that the IF systems are designed with the game author in mind. TADS was designed from the ground up as an adventure programming system:
- The TADS language has special syntax that makes game objects easy and concise to define
- The language has strong typing at run-time for easy error detection, but dispenses with compile-time type declarations, so program entry is quick and modification is easy
- The object model is simple and flexible
- The language has special concise syntax for especially frequent operations like displaying strings
- Object definitions automatically create dictionary entries for the parser
- Object definitions integrate easily with the command execution model to make custom behavior easy to program
Easy License Terms
TADS is free, and there are no restrictions on games you create using TADS. You're free to give your games away, distribute them as shareware, sell them commercially, or do anything else you want with them. You can even include the TADS interpreter executable with your game, even if you're selling your game commercially.
There are two major versions of TADS currently in circulation: TADS 2 and TADS 3.
TADS 2 is the older generation of the system. It's been around since the early 1990s, and has been steadily expanded and improved over time. TADS 2 has been used to create around two hundred publicly released games.
TADS 3 is the new generation of the system. It was under development for several years, and was officially released in late 2006. It's a completely new system, built from the ground up to provide a modern, robust programming environment. TADS 3 builds on what we learned from past versions, and greatly expands the richness of the "world model" that serves as the foundation of each game.
How do you choose which version to use?
First, be assured that TADS 2 is still very much alive, so don't feel forced to switch to the new system just because it's newer. True, most of the new feature work we're doing now is in TADS 3, but TADS 2 is still available and is still actively supported. There's a large community of TADS 2 experts, and a growing community of TADS 3 experts, so you should have no problem getting advice and help solving technical problems for either system.
The choice of which version should therefore come down to your needs and interests. TADS 3 is the more powerful system; you can create a much more elaborate simulation with it, and it has many built-in features that go beyond what's in the earlier versions. On the other hand, all this extra power makes TADS 3 the more complex system. There's a lot more to learn.
For many people, TADS 2 has plenty of power and flexibility, and its relative ease of learning makes it the right choice. For others, TADS 3's extra power is worth the steeper learning curve.
Both TADS 2 and TADS 3 are free, so if you're not sure which is right for you, you can always look at both. Take a look at the documentation - both systems have tutorials for new users.
You can find more information about each system on its own page on this site:
