
New Tricks for an Old Z-Machine, Part 3: A Renaissance Is Nigh - doppp
https://www.filfre.net/2019/11/new-tricks-for-an-old-z-machine-part-3-a-renaissance-is-nigh/
======
egypturnash
Damnit now I wanna kick back with a good drink and some paper to slowly draw a
map upon and have another go at _Curses_.

But first I have to pick an interpreter for my Mac. The list[1] pointed to in
this article is spectacularly unhelpful, what with being a series of
directories with names largely derived from spells in Enchanter and no hints
as to what platforms they're on, or what the strengths and weaknesses of each
is.

The IFDB page for Curses[2] that this article links to points me to a page on
another site entirely[3] for interpreter recommendations. Its suggestion for
Windows, Mac, and Linux is Lectrote[4]. Which is an Electron app that binds
together no less than four different adventure game interpreters. I am
generally adverse to Electron apps for the usual reasons (CPU/RAM hogs that
consistently break OSX's built-in spellcheck/text expansion on all their text
input fields) but somehow, contemplating the teetering pile of virtuality that
running a Javascript Z-machine with an entire web browser strapped on the side
entails, I feel like this is entirely appropriate in this case.

I also feel like the process of digging through this twisty maze of web links,
all different, may have made my score go up.

1: [http://mirror.ifarchive.org/indexes/if-
archive/infocom/inter...](http://mirror.ifarchive.org/indexes/if-
archive/infocom/interpreters/)

2:
[https://ifdb.tads.org/viewgame?id=plvzam05bmz3enh8](https://ifdb.tads.org/viewgame?id=plvzam05bmz3enh8)

3:
[http://brasslantern.org/players/howto/tadownload-c.html](http://brasslantern.org/players/howto/tadownload-c.html)

4:
[https://github.com/erkyrath/lectrote/releases](https://github.com/erkyrath/lectrote/releases)

~~~
7thaccount
On Linux (not sure if Mac is similar or not) I just use Gargoyle as one
commenter pointed out below. It works amazingly well and can run all kinds of
IF formats.

I'd love to find a group of people to play IF with some day as a group
activity. I was too young during its popular days. Now it is too niche for me
to convince any friends or co-workers to give it a go.

Curses is super long. If you want something just as beautiful (perhaps more
so), but shorter, try anything from Emily Short. She has a few that take
anywhere from 15 minutes to a day to play through (Galatea, Alabaster,
Bronze...etc). I never finished City of Secrets, but really loved the world.

A completely separate author wrote Blue Lacuna which I'm about 1/2 through.

~~~
WorldMaker
> I'd love to find a group of people to play IF with some day as a group
> activity. I was too young during its popular days. Now it is too niche for
> me to convince any friends or co-workers to give it a go.

I've been joking that my Twitch channel is an exercise in finding extremes
that likely no one would actually watch. It mostly only has stuff streamed to
it, for instance, because Sea of Thieves gives some small in-game rewards for
streaming, and I like finding a lot of the less exciting parts of SoT to
stream (including jokes about some of it being Pirate ASMArrr for how quiet
and soft I play it sometimes).

Anyway, long rambling prologue to: now I really want to try Twitch streaming
some text adventures. This sounds like a very appropriate use of the wonders
of modern game video streaming technology, both sarcastically in the sense of
my above finding silly things to stream for streaming's sake, and not at all
facetiously in that if it did somehow attract an audience magically or
mysteriously that sounds like an amazing way to play such games.

~~~
7thaccount
So there are still people who make Commodore and ZxSpectrum games (apparently
commercially too).

I found this one recently ([https://thestoryfix.blog/2019/02/03/interview-
stefan-vogt-ta...](https://thestoryfix.blog/2019/02/03/interview-stefan-vogt-
talks-hibernated-1/))

and since I couldn't play it (don't own the hardware or want to fool with an
editor) I watched someone play the entire game on YouTube one night when my
wife was out of town. It was a blast.

I've only looked at twitch once before and it was kinda fun. Do you have a
username there or something I can watch for?

------
peapicker
I loved being there at the time, my sorely aging interpreter Jzip was used to
bundle the Inform winners of the first IF competition on the Lost Treasures of
Infocom CD back in the day.

The competition was started by G. Kevin Wilson, who has since gone on to
tabletop boardgaming fame as one of the designers behind the boardgames
"Descent: Journey in the Dark", "Sid Meier's Civilization: The Boardgame",
"Arkham Horror", "Elder Sign", and many others. ( ref:
[https://boardgamegeek.com/boardgamedesigner/2336/kevin-
wilso...](https://boardgamegeek.com/boardgamedesigner/2336/kevin-wilson) )

------
fooblitzky
The Inform Designer's Manual[1] has to be one of the most enjoyable books on a
programming language ever written.

[1] [http://inform-fiction.org/manual/DM4.pdf](http://inform-
fiction.org/manual/DM4.pdf)

------
zzo38computer
ZIL is sometimes still used; there is a new implementation called ZILF. Also,
I wrote a document called "The Tricky Document" which describes many new
tricks for Z-machine, most of which nobody has ever used as far as I know,
which can allow even more efficiency than Inform and ZIL.

I also wrote my own implementations of Z-machine, and other people who want to
try, can also try to do so.

~~~
derefr
Random awful thought: it wouldn't be that hard to write a Z-machine LLVM
backend.

~~~
zzo38computer
I thought of to have a LLVM backend to target Glulx. Some things are done
easily enough; the ! operator of C corresponds to "ushiftr 1,$,$" in Glulx
(this is using Glasm syntax). Calling conventions are simple. The Glk
functions can be converted directly to Glulx code, with a few exceptions; the
Glk type "S" means a different thing in C and in Glulx, although for most of
them you can instead use ones that take an array and length, making the
function to calculate the length before calling Glk. The C strlen() function
becomes "linearsearch 0,1,$,1,-1,0,4,$" in Glulx.

However, one thing with both Z-machine and Glulx is that there is no alloca().
However, you might be able to emulate it with a "shadow stack", I thought. (If
programming in assembly language, this is not a problem since you can take
advantage of those specific virtual machines instead.)

Also, does LLVM support targeting 16-bit computers so well? (I don't know how
to write a LLVM backend.)

For Z-machine, one thing I thought might work better to compile into a
Z-machine code might be a variant of BASIC instead.

But when programming in Z-machine or Glulx, I just use assembly language; you
can then run those programs on other computers anyways, so it wouldn't be as
much problem. (Many of the tricks in "Tricky Document" assume the use of
assembly language, although some could be implemented by optimizers.)

------
pja
Curses was a wonderful, if weird & slightly disjoint at times, experience. I
believe I did (eventually) finish it, but doubt I could do so now!

Interactive fiction is alive and thriving these days, with an active community
of authors & players. Last week was the end of the annual competition, where
people submit short (2-hour) games which are collectively judged. There were
82 entries this year, some of which are well worth your time.

