Starting with version 2.2.4, the TADS character-mode interpreter provides a degree of compatibility with games written for HTML TADS. This allows you to write a game using some of the new HTML features, and still play the game on character-mode versions of the interpreter. So, players that use systems where HTML TADS is not yet available can still play your game to some extent.
Although the standard TADS interpreter doesn't understand most HTML formatting sequences, it does recognize a few HTML markups, and it removes any that it doesn't recognize from the text, so that players won't see HTML source code in the output. This won't let you get the full effect of games written for HTML TADS, but you can at least run HTML games and see the plain text that they display. For games that make moderate use of HTML formatting features, the degradation can be quite reasonable. Note that HTML interpretation only occurs when the game displays a "\H+" sequence, which only an HTML-enabled game would do, so non-HTML games are not affected by this processing in any way.
The character-mode version supports all of the character-code markups (the sequences that begin with an ampersand, such as "&"). Note that most character-mode consoles and terminals don't actually support all of these characters; the character-mode interpreter will try to provide a suitable system-specific rendering of the markups when possible, and will replace any unrenderable markups with a system-dependent "missing character" glyph. The DOS US character set (code page 437), for example, is capable of displaying about half of the standard ISO Latin-1 character markups correctly, uses approximations for about 30% of these, and uses blanks for the remaining 20%. DOS code page 437 does not contain many of the characters beyond the basic ISO Latin-1 character set, so most of the mathematical symbols and Latin-2 characters can't be displayed in this character set.
In addition, the character-mode interpreter supports the following tags:
Note: version 2.2.3 of the character-mode interpreter recognized HTML markups when "\H+" was in effect, but simply ignored all markups. Starting with version 2.2.4, the character-mode interpreter provides the limited support described above.
In addition to the markups mentioned above, TADS 3 supports the following:
Note that if you embed HTML resources into your .GAM file, character-mode interpreters older than version 2.2.3 won't be able to read your .GAM files. Character-mode interpreters version 2.2.4 and later will simply ignore embedded HTML resources. See the resources documentation for details.
Of course, some authors won't be concerned about compatibility. If you want to write a game that takes full advantage of the new features that HTML TADS offers, you won't want to limit yourself by trying to maintain compatibility with the standard interpreter. These guidelines are only for authors who want to offer some amount of compatibility.
There are two strategies that you can employ when writing a game for compatibility: you can use features that degrade gracefully in the standard interpreter, or you can use special-case code to support the two different interpreters.
Regardless of the approach you choose for compatibility between HTML TADS and the standard TADS interpreter, you should test your game frequently on both systems as you develop it. This will help you catch compatibility problems quickly as they arise, which has two benefits: first, you won't accumulate a huge and daunting pile of extra work at the end of your game development process; and second, you'll quickly develop a sense for what sorts of things to do and what to avoid, which will make it easier to write for maximum compatibility as your game progresses.
Similarly, SOUND and IMG markups can often be used purely for atmosphere. If you use your sounds and images to add detail and audio and visual impact to your game, rather than to provide essential information, the standard TADS interpreter can omit these and still leave the game fully playable.
You should be careful of the more complex formatting tags, such as <TABLE> or <BANNER>, the omission of which would substantially alter the layout of your text.
For an example of both of these techniques, refer to the status line code in adv.t. First, this code uses conditional compilation to define either the traditional status line code, or a new version that uses the <BANNER> tag to implement a status line. Second, the HTML version of the code checks at run-time to see if the full HTML feature set is supported, and if not, it falls back to the old status line code.