Why hasn't there been a port of Colossal Cave Adventure to TADS 3?

AGT, Inform 6, Inform 7, Hugo, TADS 2, ZIL, Dialog and a few others (probably) have all had ports of the classic Colossal Cave Adventure released for them, but why not TADS 3? With the advanced world model and parser, you’d think there’d be one, but apparently not. It would also be the perfect project (IMHO) to demonstrate the differences between ADV3 and ADV3Lite to newcomers.

3 Likes

Congratulations! You just volunteered.

11 Likes

David Baggett’s version (BAGG0350) was a port to TADS 2 in 1993. This is available for the Atari ST and any generic TADS 2 interpreter.

David Picton’s version (PICT0350) was a port to TADS 2 in 1996. This is available for any generic TADS 2 interpreter and also includes versions with 550, 551, 580, 701 and 805 points.

Perhaps you could start with one of these and port it to TADS 3? The source for both is available on IF Archive.

6 Likes

Ha, I almost said “Whoops, you’re wrong!” when I realized the version I was thinking of was TADS2 (like Garry said). Yeah, would be a good project!

2 Likes

This would SEEM like the perfect job for AI – just convert from one programming language to another. (I have used AI-assistance to write TADS3/ADV3LITE code for games and it does a pretty good job with the basics although needs tuning, but its descriptions are getting better if not a bit over the top.) However, there is considerable evidence using AI to convert from language “A” to language “B” does not work (see research from Accenture et al) and it is better to distill out the algorithms/heuristics/etc. and then let AI write it in the target language.

Having said all that, I gave it a shot anyway (GPT-5) and here is the response it gave:

Based on my analysis of the TADS2 files and research into TADS3/ADV3LITE conversion, I need to provide you with a detailed explanation of why this conversion cannot be completed as requested.

Detailed Analysis and Conversion Limitations

After thoroughly examining all the .T files in your project and researching TADS3/ADV3LITE conversion requirements, I must inform you that this conversion cannot be completed for the following critical reasons:

1. Fundamental Incompatibility Between TADS2 and TADS3

TADS3 is not backward compatible with TADS2. The systems are fundamentally different:

  • TADS2 has a built-in parser and command loop

  • TADS3 requires custom parser implementation using libraries like ADV3LITE

  • Syntax differences are extensive and incompatible

  • Object model and inheritance systems are completely different

2. Complexity of Your Codebase

Your project contains 13 TADS2 files with significant complexity:

  • CCR-ADV.T (3,689 lines) - Core adventure framework

  • CCR-ROOM.T (4,603 lines) - Room definitions and logic

  • CCR-ITEM.T (1,146 lines) - Item definitions and behaviors

  • CCR-NPC.T (1,096 lines) - Non-player character AI and movement

  • CCR-VERB.T (1,006 lines) - Custom verb definitions

  • CCR-STD.T (675 lines) - Standard game functions

  • Plus 7 additional supporting files

3. Specific Conversion Challenges

Parser and Command System:

  • TADS2 uses built-in deepverb classes and automatic command parsing

  • TADS3 requires manual implementation of command handling

  • Your CCR-VERB.T contains 50+ custom travel verbs that would need complete rewriting

Object Definitions:

  • TADS2 syntax: class CCR_item: item;

  • TADS3 syntax: class CCRItem: Thing;

  • Property syntax and method definitions are incompatible

Game Logic:

  • Complex NPC movement algorithms in CCR-NPC.T

  • Treasure scoring system with intricate point calculations

  • Cave closing and endgame mechanics

  • All require complete architectural redesign

4. Manual Conversion Requirements

This would require:

  • Complete manual rewrite of all 13 files

  • Architectural redesign of the entire game system

  • Parser implementation from scratch using ADV3LITE

  • Extensive testing to ensure game logic preservation

  • Estimated effort: 200-400 hours of expert TADS3 development

5. Why Automated Conversion is Impossible

  • No automated tools exist for TADS2→TADS3 conversion

  • The systems are too fundamentally different

  • Game logic and parser integration are too complex

  • Each file would require individual analysis and rewriting


So, good luck to the human who takes this on!!! (Hint: It will not be me.) :rofl:

-Mitch

1 Like

I certainly wouldn’t trust AI to make this conversion, but I think Chat-GPT has done a pretty good job of summarizing the difficulties here. Although not everything it says is correct, and some of the difficulties appear a little overstated. It’s nonsense to say, for example, that you’d need “Parser implementation from scratch using ADV3LITE” since Adv3Lite has its own parser that does at least as much of the work as TADS 2’s does (even if it presents a somewhat different interface to the programmer), and I also doubt the necessity of an “Architectural redesign of the entire game system”. But it’s true that the conversion would need a good deal of work to be done by hand.

As it so happens, I’ve now made a start on doing that work (not sure how far I’ll get with it though!). A lot of it has proved pretty straightforward (though time consuming), but there are places where I’m still trying to puzzle out what the TADS 2 code is aiming to do.

13 Likes

Cool.. go Eric!

I will always root for John Henry over the Steam Drill.

F$%#@ that Steam Drill.

5 Likes

Well, I would certainly take Eric Eve over GPT-5 for ADV3LITE… or GPT-20 for that matter.

And, at the risk of getting in over my head, I am willing to help out, Eric, if there is something you think I might be able to do to assist this project (unless this is a personal labor of love, which I get). I did write some games in TADS2 20+ years ago so, while rusty, might be able help. I just would not try to do this alone…

-Mitch

3 Likes

I’d certainly welcome some co-operation on this at some point. I have a vague plan to create a GitHub repo for it once it reaches a point when that might be useful, but a couple of things would need to happen first: (1) tidying up what I’ve done and commenting it so anyone else might have a fighting chance of seeing what I’m doing and (2) releasing the next version of adv3Lite, since working on this Colossal Adventure port has prompted several tweaks to adv3Lite which my game code now uses.

I’m working from the TADS 2 polyadv port. My aim is to concentrate first on getting the original 350 point version working more or less (at which point some help with testing and bug fixing would certainly be welcome). I’ll then see about extending it to the other versions, which is certainly something a collaborator could help with

-Eric

5 Likes

Count me in, Eric.

-Mitch

1 Like

It’s early days yet, but I’ve now got as far as an implementation of the original 350 point game that can be played through to a winning ending, although it’s far from complete (e.g., no dwarves or pirates yet) and there may well be plenty of bugs. I’ve created a new repo for it at EricEve/poladv-adv3Lite: An adv3Lite of the TADS 2 polyadv port of Colossal Cave. This is partly for the benefit of anyone curious to see how the work is progressing but also to enable anyone who may be interested to contribute.

While I’ve been trying to keep to the contents of the TADS 2 source (in terms of rooms, objects, puzzles and scoring), I’ve chosen to retain various TADS3/adv3Lite features that make for a better player experience, such as the status line exit lister and pathfinding (which enables the GO TO command). I also intend to overall the hints to be a bit more helpful. This will allow the finished product to offer a player experience that’s distinct from the TADS 2 version and arguably a bit better suited to a modern IF audience.

Note that if you want to try out the implementation you’ll need to download the latest version (2.2.1.1.2 or later) or adv3Lite from EricEve/adv3lite: Source code and documentation for adv3Lite, an alternative library for use with TADS 3. You may also want to obtain a copy of the TADS 2 source, which can be obtained from the IF Archive.

There is much more work still to do on this than has yet been done. This includes:

  1. Completing the implementation of the 350-point version of the game (not least with dwarves and pirates, but also with any other features I may have passed over in the TADS 2 source) and by completing the hints (there are only two so far - or rather 2 Goals in TADS 3 parlance)
  2. Checking out the ‘plumbing’ in the TADS 2 files ccr-std.t, ccr-thx.t, advmods.t, ccr-fun.t, and maybe one or two others. I’ve made quite a substantial start on this, but there’s still quite a bit more to do. I suspect some it may not need adapting into the adv3lite version since it may be aimed at functionality that’s already in adv3Lite, but I never got very far into TADS 2 (since TADS came along just as I started looking at it), so this may be an area where someone with greater familiarity with TADS 2 may be able to help.
  3. Testing what’s been done so far (at each stage).
  4. Extending the implementation to the other versions (550-point, 551-point, 701-point and 701+) present in the TADS 2 version.

These need not necessarily be tackled in this order. In particular what to do about (2) may become gradually more apparent as I/we come to implement game features that rely on it and work out how to obtain the same effect in adv3Lite.

Strictly speaking I should say adv3Liter, since I’m basing my polyadv implementation on that subset of the library which should (with the addition of a few adv3Lite extensions) suffice to implement an old game like Colossal Cave.

@ucode81 Help with any of the above would be welcome, but might you like to look at implementing the dwarves and pirates as a starting point? Most of the code for that should be contained in npcs.t which might limit the extent to which we could be working across each other as this project progresses. Or you might like to start by checking out what I’ve do so far.

4 Likes

Noted the jump in version number in a month and wow… how many improvements stemming from the Venerable XYZZY !!

later I’ll look at the improvements in the library, y’know the drill…

Best regards from Italy,
dott. Piergiorgio.

1 Like

Sure @Eric_Eve . I will take a look at this and see about taking care of the dwarves and pirates. I will d/l the TADS2 source for it so I can see where they come in as it has been awhile.

But a little clarification: You are using adv3liter and not adv3lite? I haven’t touched that “lighter” version so would need to understand what is not there vs what I am used to…

-Mitch

1 Like

I have both the old TADS2 source code (plus old GAM file running) as well as your latest adv3lite library.

I had to adjust the paths to the 3 extension files you added but otherwise first time compiled and runs, so that part was easy. I guess I will find out what is missing as I start porting dwarves and pirates.

I have another project I want to finish first but that is close to completion.

-Mitch

That all sounds great. The section on “Core and Optional Modules” in Part 1 of the Library Manual explains what’s not in adv3Liter, but mainly it’s most of the actor (and conversation) stuff, scenes and sense regions, none of which would have been in TADS 2. I’m continuing to work on other parts of adv3Liter polyadv in the meanwhile, so you may want to grab the latest version once you’ve finished your other project and want to come back to it.

4 Likes