Text Adventure Development System: Difference between revisions

Content deleted Content added
Fixed formatting
Adding some content, probably needs further editing. "Interpreter" changed to "virtual machine".
Line 8:
in place of simpler systems like AGT ([[Adventure Game Toolkit]]).
 
However, [[Graham Nelson]]'s [[Inform_programming_languageInform programming language|Inform]] has, since its release in 1993,
slowly gained popularity and superseded TADS in the last half of the 90s.
Nevertheless, TADS 2 has been maintained and updated at regular intervals by its creator, [[Michael J. Roberts]], even after it became freeware in July 1996.
Line 15:
supports it.
 
Recently, TADS received a major overhaul with the release of '''TADS 3''', which is a complete rewrite of the TADS engine, only retaining the platform-dependant code to ease [[porting]].
TADS 3 has many new features, such as its efficient dynamic objects (with [[automatic garbage collection]]), structured [[Exception handling|exceptions]], native [[UTF-8]] strings, and many useful function classes.
and many useful function classes.
 
==TADS games==
Games written in TADS are compiled to a platform-independent format that can be played on any computer for which a suitable [[interpretervirtual (computer software)|interpretermachine]] (VM) exists. Such interpretersvirtual machines exist for most platforms, and in this respect, TADS closely follows the example of the original [[Infocom]] [[Z-machine]], as well as modern languages such as [[Java programming language|Java]] and [[C_sharp_programming_languageC sharp programming language | C#]].
 
Whereas the TADS 1 and 2 interpretersVMs had to [[parse]] the commands entered by the player, before sending the results on to the game, TADS 3 employs a more general-purpose virtual machine, where the command-parsing is done by the game code itself, akin to Inform. The rationale for this is that it is easier to customize the parser.
 
==The Programming Language==
TADS 2 is based on [[C programming language|C]], with bits of [[Pascal programming language|Pascal]].
 
A [[Hello world program]] isn't that simple to write in TADS 2, because TADS 2 requires a working [[world model]] to compile.
 
#include <adv.t>
#include <std.t>
&nbsp;
replace commonInit: function
{
"Hello World!\n";
quit;
}
&nbsp;
startroom: room; // We must define a startroom object.
 
Of course, the goal of TADS 2 is to make Interactive Fiction (and not Hello World programs) simple to implement, and in pursuing that goal it succeeds.
 
Nevertheless, TADS 3 dispenses with the requirement of a working world model, and also abandons the Pascal elements of the language.
 
function main(args)
{
"Hello World!";
}
==Further reading==
* [[Interactive Fiction]] in general.
* [[Inform]] is another interactive fiction design system that is comparable to TADS in terms of power, flexibility, portability, and popularity. Another well-regarded system is [[Hugo programming language|Hugo]], though it is not nearly as widely-used as either TADS or Inform.
 
==External links==
* The TADS page: [http://teladesign.com/tads/ The TADS page]
* Official web site: [http://www.tads.org/ The official TADS web site]
* [http://wurb.com/if/platform/2 TADS 2] and [http://wurb.com/if/platform/39 TADS 3] games on Baf's Guide
* TADS 2 interpreters for several platforms: [http://mirror.ifarchive.org/if-archive/programming/tads2/executables/ TADS 2 interpreters for several platforms]
* [http://www.tads.org/t3dl.htm TADS 3 interpreters for DOS, Windows, and source for Unix: http://www.tads.org/t3dl.htm]
* [http://www.hypertads.org/ HyperTADS], a MacOS multimedia interpreter for TADS 2 and 3: http://www.hypertads.org/
* [http://www.firthworks.com/roger/cloak/tads/index.html "Cloak of Darkness" in TADS] (A sample game coded in several languages, to demonstrate the coding of each): http://www.firthworks.com/roger/cloak/tads/index.html
* [http://lists.v-space.org/listinfo/tads3/ The TADS 3 mailing list]