TADS, short for Text Adventure Development System, is a specialized programming language and development environment designed for creating interactive fiction and text-based adventure games. It is primarily used on Windows, macOS, and Linux platforms, allowing developers to build rich narrative experiences with support for rooms, objects, and complex story logic. Developers can download the language and IDE from the official TADS website, which provides documentation, tutorials, and sample games to get started.
TADS exists to provide a dedicated framework for interactive fiction that combines storytelling and programming. Its design philosophy emphasizes readability, structured narrative management, and support for complex game logic while keeping syntax approachable for writers and developers. By providing built-in constructs for rooms, objects, and player actions, TADS solves the problem of building interactive stories without requiring extensive low-level programming, making it ideal for both hobbyists and professional interactive fiction authors.
TADS: Variables and Basic Syntax
The foundation of TADS includes variables, string handling, and basic output commands suitable for scripting text adventures.
gameMain: GameMainDef
{
author = "Alice Developer"
title = "Mystery Manor"
}
currentRoom = "Foyer"
playerName = "Adventurer"
display("Welcome, " + playerName + "!")This snippet declares game metadata, initializes variables, and outputs a welcome message. The syntax emphasizes readability and clear mapping between story elements and code, similar in concept to Inform 7 and Python scripting for interactive fiction.
TADS: Rooms and Objects
TADS uses objects to represent rooms and items in the game world, defining their properties and interactions.
Foyer: Room
{
desc = "You are standing in a grand foyer. Doors lead north and east."
}
Key: Thing
{
name = "rusty key"
location = Foyer
}Rooms and objects form the backbone of a TADS game. Each room can contain objects, descriptions, and exits. This object-oriented approach is similar to entities in C# or classes in Java, but specialized for interactive fiction.
TADS: Player Actions
Actions in TADS define how the player can interact with objects and the game world.
pickupAction: Action
{
verb = "take"
apply(obj)
{
if(obj.location == currentRoom)
move obj to player
display("You pick up " + obj.name)
else
display("You can't take that.")
}
}Defining actions allows players to manipulate objects in the game. The approach ensures modularity and clarity, similar to command handling in Python or event-driven logic in JavaScript.
TADS: Game Logic and Conditions
TADS supports conditional statements and procedural logic to control narrative flow and game events.
if player.location == Foyer and player.has(Key)
display("The door unlocks with the key.")
else
display("The door is locked.")Conditional logic allows the game to respond dynamically to the player's state and actions. This capability is comparable to branching logic in Inform 7 and typical procedural programming languages like Python.
TADS: Saving and Loading
TADS provides built-in support for saving and restoring game state, enabling persistence across play sessions.
saveGame("mystery.sav")
loadGame("mystery.sav")These commands allow players to pause and resume adventures seamlessly. Built-in persistence simplifies game management and is analogous to serialization in Java or C#.
Overall, TADS delivers a specialized, object-oriented, and readable environment for creating interactive fiction and text adventures. When used alongside Inform 7, Python, JavaScript, or Java, it enables authors to build maintainable, data-driven, and immersive narrative experiences. Its support for rooms, objects, actions, game logic, and persistence makes TADS a practical and powerful tool for interactive storytelling.