Exercises & Samples

Learning TADS 3 With Adv3Lite contains a number of exercises. Suggested solutions to some of those exercises are given here. These may either be used in conjunction with the exercises or simply studied separately as samples of code illustrating various parts of the adv3Lite library. The sample games provided are as follows:

Exercise 11 is primarily an illustration of Rooms, TravelConnectors and TravelBarriers. It also contains an example of a vehicle and a travel-pushable.

Exercise 13 is primarily an illustration of various kinds of Container. It also illustrates certain aspects of action handling and defining new actions in the course of implementing things with the various kinds of container.

Exercise 15 - Bomb Disposal is primarily an illustration of Fuses and Daemons. It also illustrates starting and ending a game, and the use of InitObjects, CollectiveGroups, Consultables and more action handling.

Exercise 17 - Light Sources is primarily a demonstration of various kinds of light source. Note that while it shows how to create a fueled light source from scratch, in practice it might be easier to use the fueled light source extension. This example also illustrates how to modify VerbRules (the grammar applicable to various actions) and how to define an AMUSING option.

Exercise 18 - Bedsitterland is primarily an illustration of nested rooms (such as Platforms and Booths), including restricting reaching in and out of them.

Exercise 19 - Locks and Gadgets is primarily an illustration of Lockable items, keys, and various types of gadgets and controls such as dials, levers, switches and sliders. It also contains a further example of implementing an AMUSING option.

Exercise 20 - Lighthouse is primarily an illustration of implementing NPCs (Non-Player Characters), including conversation and the use of ActorStates and AgendaItems.

Exercise 21 - Sense & Sensibility is primarily an illustration of SenseRegions and the sensory connections they provide. It also illustrates the used of MultiLocs, Noises and Odors, as well as a simple NPC and another travel-pushable. It shows how to create a SoundEvent class from scratch, but in practice this might be more easily done by making use of the Sensory extension.

Exercise 22 - Attachments is primarily an illustration of various kinds of Attachable class, albeit in the context of what is probably the most complex game of any of the examples here.

Exercise 23 - An Eventful Walk is primarily an illustration of EventLists, Menus, Hints and Scoring, although it also includes a couple of examples of simple Scenes.