Infocom Games on Glulx Interpreters?

This may be the wrong category to post this in but it has everything to do with games playing on interpreters, so I don’t think I’m too far off.

My question here is more about the possibility of “converting” existing zcode games as Glulx, assuming you don’t have the source code. I say “converting” in quotes because I realize direct conversion is not possible.

What I mean is let’s say you have a “z5” file. Can that somehow be wrapped up as a ulx and/or glborb that would play via a Glulx interpreter?

I’m guessing no on that but figured I would ask. My next and related question would be since we have the ZIL source code for many Infocom games, could that ZIL code be compiled into Glulx instead of into zcode?

The main question here is really the title of this post: can Infocom games be converted somehow to play on Glulx interpreters?

2 Likes

Zilf doesn’t compile to Glulx so either that compiler needs to support it. One other option would be to reverse engineer the Infocom gane into Inform6 syntax with a tool like Reform and then painstakingly fix the code to finally compile to Glulx.

Why?

3 Likes

Excellent question since I realize this can seem a little odd.

The main rationale for this question were some classes where we want to focus on only one interpreter and ideally one that is, broadly speaking, the future (Glulx). But there was a desire to also leverage the past on that (which is where the Infocom part came in).

The other part of this is that the class will be working on designing an interpreter and there was a desire to (1) do that in Glulx but (2) be able to run Infocom games on that interpreter.

We actually started on this path with a Z-Machine interpreter, which made it easier, but the desire was for the Glulx platform ultimately.

3 Likes

To be clear, “painstaking” here means “almost as much work as reimplementing the game from scratch.”

could that ZIL code be compiled into Glulx instead of into zcode?

If you wrote a new compiler, probably. This is a lot of work. You’d still have to fix up some of the ZIL code by hand.

Yet another option is to write most of a Z-machine interpreter in Glulx code and then glue a Z-code game file on the end. This is, guess what, a lot of work. Performance would be pretty terrible too.

3 Likes

If that’s the desire, then you could focus on the Glk layer, as it’s the “future”, but you can also then plug in a Z-Machine interpreter.

1 Like

I can point that Zilf can compile in .z8 format ? the lone reason of recompiling in glulx Infocom games I can see is for the large margin of improvement given by glulx (4 GB minus 128-256K… so, a massive overkill, IMVHO) and I guess that for Infocom games the 256/384 KB (among other increases, esp. object attribuites) given by Z8 format can be enough (the most ambitious project I can surmise is merging together the three Zorks into a ZILF version of the original MIT Zork, albeit with the recent movie, I can’t exclude that Trinity is now seriously considered by improvers)

Best regards from Italy,
dott. Piergiorgio.

1 Like

An Z-machine interpreter running in Glulx actually exists:

http://ifarchive.org/indexes/if-archive/infocom/interpreters/zig/

It worked the last time I tried it, but I don’t know how usable it is overall.

2 Likes

Nifty! I’ll check that out. That’s interesting just in itself. Much thanks for pointing this out.

Hah, I’d entirely forgotten that. (Twenty years…)

Amazingly, that is not the only Z-machine written in Glulx: GLUZMA - implementation of Z-machine in Glulx