Reunifying Zork

Given that the Zork trilogy was necessary because the entire MDL game wouldn’t fit into one Z-machine game at the time, maybe combining the three Zorks in ZIL would be fun.

2 Likes

I’ve done the 285 points MDL-version from 14th of June, 1977 in ZIL. I havn’t released the source code yet but aim to do that. In this I tried to be very faithful against the original MDL (same structure and disposition). My goal, eventually, is to make the 387 points from July 1th, 1977, the 500 points from December 12th, the 500 points + endgame from April 1978 and finally the 616 points + endgame from 1981 - All in ZIL.

Help would be appreciated and I’ll happy to offer the Zork 285 as a starting point!

2 Likes

Combining the three would be a slightly different project with maybe some difficulty to include Zork 3 that have a definit different “feel” to it.

It’s also not clear how they should be merged. If you just put them together as is, all you have is three separate chapters living in the same story file. Little or nothing you do in an earlier chapter affects the later chapters.

If you merge them together into one single game, you have to change things. Possibly quite a lot. How do the Wizard’s spells interact with the Zork I and Zork III bits? (Particularly after you get the wand, and can cast the spells yourself.) What about Zork III’s invisibility potion? What happens if the Wizard encounters the thief? Things could get messy…

1 Like

Very nice!

It might also be interesting to make a “version that never was” that fixes bugs that may still be in the game, and incorporates some improvements from Zork I-III. The most obvious would perhaps be the alternate solution to the Loud Room?

Yes, Loud Room and maybe the Zork 1 solution to the exorcism where you need to perform the ritual with the right items instead of only assemble them and type “exorcism”.

I thought that was already fixed in later versions?

One thing I believe changed in Zork I was how deaths are handled. In Zork I, early in the game you are simply resurrected and placed into the forest, with your inventory scattered. It isn’t until you’ve reached the temple that the game instead turns you into a ghost.

I liked that. It gave a feeling that the stakes had been raised. But I believe MDL Zork always turns you into a ghost?

And then, of course, there is the unsolved mystery: Should you be able to fight the cyclops or not? :grin:

Maybe you’re right. I look at a walkthrough that uses the Zork I solution, but I suspect the original one also works. I could certainly be wrong because I’ve played a lot of the older ones lately.

I’d play it for sure.

This sounds like the biggest challenge to me, reconciling the newer commercial parts to other parts. IE, what does the Adventurer give the demon, for instance.

Should be up to it by 500 points or so!

At least, open the strange passage for any/every cyclops solution

The reason I’m wondering is because the game does define a set of fight messages for the cyclops. I’m not sure which versions they’re used in, though. I did play a Fortran port of Zork (possibly the 2.7M Macintosh version available from the IF-Archive, but I’m not sure) where you could fight the cyclops.

It wasn’t possible to beat him that way, though.

Ah, got it. I wonder how that came about. Perhaps the original intent was to give varied “combat-esque” feedback for a futile act? I find the story of the Cyclops’s implementation kind of mysterious since Marc Blank didn’t seem to know much about the mythology involved.

The reason why the intention is unclear to me is because of the way it’s written. Both the MDL and ZIL versions define a list of “villains”: The troll, the thief and the cyclops. But at least in the ZIL version, whenever it loops through the list it skips the last element, i.e. the cyclops.

So even if you were able to initiate combat with him - his action routine prevents you - he probably wouldn’t fight back. (In the unreleased version of Mini-Zork I, the cyclops had been removed from the villains list, along with his combat messages. Probably to save space, but the consequence was that now the thief wouldn’t fight back!)

Just for fun, I once made a quick attempt once to “fix” the loops and remove the code that prevented you from starting a fight with him. As I recall it, it kind of worked… but since the cyclops is unarmed, he couldn’t defend himself and so he died instantly. Clearly not the intended behavior!

2 Likes

There’s also the matter of the Treasure Cabinet. Do only the items from part one go in there? Wouldn’t items be strewn around the entire world that have to be placed there too?

On paper, (namely, the infocom fact sheet…) an ZGU (Zork Grand Unified) can easily fit in the 512k .z8 format, and also the 384k .z7, and with some “squeezing” effort even in the 256k .z5 format.

My estimate is based on that the library is more or less common, and that we have a vastly more efficient abbreviation-finding algoritm, and this offset the larger binaries of the z8/7 format

OTOH, on reimplementing the unified Zork, that is, in Inform, surely fit the z8/7 formats, and with Puny library, the .z5 format, because Inform is somewhat better than ZIL (and ZILF) in code generation.

so, my estimate is, that is 99,95% possible (the 0,05% is about the ZILF .z5 case) but I stress that I’m not an expert on computability theory (is this the correct english term ?)

Best regards from Italy,
dott. Piergiorgio.

If you’re talking about coding from scratch, I suspect this is possible in ZIL because the original games are often - in the nicest possible way, and due to the knowledge and skills of the Imps - over engineered in places. The example that springs to mind is the trap door in the white house. A single routine with a True or False flag could be used to trigger the “someone closes the trap and bolts it behind you” but instead there’s code in all sorts of places. :yum:

Adam

It’s not important, but I’m not sure that Inform compiles to “leaner” code.

Anyway, Zork I-III should, without problem, fit in z5. The games are about 90kB each and about 25kB is library code ==> 25 + 65 x 3 = 220KB.

I thought this also. Inform, even Puny, would have to compile to a slightly larger file size by its design. Surely?

It’s probably just a few K but that could make all the difference. :slightly_smiling_face:

That aside, I’m sure it’s possible for either to create a combined game.

Adam

The usual estimate is that Inform compiles source code less efficiently, because Inform 6 is a higher-level language. In ZIL you write code that compiles more directly to Z-machine opcodes, so you can hand-optimize.

Also, the I6 standard library is bigger than Infocom’s “standard” library. But the flip side is that this allows game code to be simpler, because objects can rely on more shared library features. So this is a tradeoff. It’s a better tradeoff in larger games; the more objects that use a given library feature, the more you save.