question about ALAN 3.0

Hello. As some of you may know, I am primarily a user of TADS 2 and 3. However, I discovered ALAN (v3.0) a few days ago. I have a question, however: How much is possible in this language? I looked at the manual and the “cloak of darkness” example, and it seems like a cutdown version of TADS 2. It doesn’t seem capable of routines (functions, rules, etc.), nor does it seem capable of multiple inheritence (E.G. An object that is both a container and a supporter).

Hi!

Sorry for the late reply, I just spotted your question now.

It’s true that ALAN 3 cannot manage all the things for example TADS 2 can, but it doesn’t fall much behind.
It is possible to implement an object that is both a container and a supporter, for example a table object that can have something on it and drawers inside it. Refer to the standard library quick reference txt file for this example.
Generally though, you’re right in that it’s not possible to have one object belong to multiple classes (except through inheritance: object-> door-> locked_door, or actor-> animal-> predator etc).

There are rules but they might be somewhat different from how they are understood in TADS; IDK for sure as I am not that familiar with TADS. Anyway:

  • FOR EACH statements make something happen on a class level:

    FOR EACH predator, IS hungry
    DO
    MAKE predator attack.
    END FOR EACH.

  • there are also WHEN rules:

    WHEN floor IS vacuumed AND livingroom IS cleaned AND dishes ARE washed
    THEN SCHEDULE afternoon_nap AT livingroom AFTER 0.

    WHEN treasures_left OF my_game = 0
    THEN SCHEDULE winning AT hero AFTER 0.

It’s true there are no functions as such.

Actors can be made to act according to scripts.

It’s possible to schedule single or repeated events, every turn or after a number of turns, etc.

The standard library defines a huge number of default verbs.

The library also defines object, actor and location classes and attributes:

  • objects: container, supporter, door, window, liquid, lightsource, piece of clothing, device, weapon
  • also, the library for example differentiates between not reachable and distant objects, making it possible to talk to a not reachable NPC (when the hero is for example tied up to a chair) but not to a distant one; also it is possible to throw something into a not reachable object (like a basketball to a basket) but not to a distant one. etc.
  • locked doors can have matching keys, easily programmed
  • containers don’t take just any objects but what is defined through the ‘allowed’ attribute.
  • clothing can be worn in layers: you cannot put on a shirt if you’re wearing a jacket, etc.
  • locations: lit and dark locations are accounted for
  • actors: it’s easy to make NPCs follow you
  • conversation is easy to program

The biggest asset of ALAN is probably its simple grammar which is somewhere halfway between the natural language approach of I7 and a traditional programming language (but you probably already knew this):

THE ball ISA OBJECT AT yard

VERB kick
DOES ONLY
IF ball AT yard
THEN “You kick the ball accidentally over the fence.”
LOCATE ball AT greener_side.
ELSE “You don’t feel like kicking the ball now.”
END IF.
END VERB.

END THE ball.

The author of the system, Thomas Nilsson says that with ALAN, the author rather describes, than codes, what will happen in the game.

If there is something specific you might want to know, please do ask!

-Anssi

Hi Anssi.
Thanks for the reply.
I’ve actually been experimenting with ALAN. I think the approach of a “hybrid” language (part natural language, part programming language) actually works: It’s not exactly a programming language (like TADS or I6), but not based on natural language (like I7).
I know a fair bit of the ALAN syntax now. In fact, I’ve considered using ALAN to write my work in progress.