💾 Archived View for thegonz.net › zyg captured on 2024-08-31 at 12:03:55. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-07-08)

-=-=-=-=-=-=-

Zyg

Curses, by Graham Nelson. Unforgiving.

For a Change, by Dan Schmidt. The sun must be brought.

Galatea, by Emily Short. Evaluate an animate.

The Gostak, by Carl Muckenhoupt. Heamy halpock.

la nuntalyli'un fi'e lo vrici .i je'u nu talsa litru

Photopia by Adam Cadre. Tell a story together.

So Far by Andrew Plotkin. Light and shadow.

Spider and Web by Andrew Plotkin. Tell a story.

Trinity, by Brian Moriarty. As the bombs fall.

Varicella, by Adam Cadre. Unseemly intrigue. [Choose monochrome mode]

Usage

For those who haven't played these games before, here's a helpful list of commands and conventions.

IF reference card -- Lea Albaugh and Andrew Plotkin CC-BY-SA

Rather than select the input link for each command, you may prefer to directly edit the query parameter of the URI. Gemini clients vary in how easy they make it to do this. In diohsc, the "repl" command exists for this purpose.

Your session will not survive forever, but "save" and "restore" work across sessions.

List existing sessions

Behind the curtain

Zyg is intended as a demonstration of (and was the motivation for) gemrepl, a generic gemini wrapper around line-based programs. In this case, it wraps Florian Weps' Z-machine interpreter "infuse" in stdio mode.

gemrepl

infuse

Limitations

Sadly, although in practice it's mostly used as if it were, the interface provided by the Z-machine isn't actually purely line-based. Already in v3 there are (optional) split windows, and from v4 onwards the upper window is obligatory, and the set_cursor opcode places the cursor anywhere in it. Also, individual characters rather than whole lines can be read from the keyboard, and there are even timers. All this can and has been abused to e.g. implement tetris... but even in traditional IF, it's used for occasionally important status lines and menus and the like. It isn't clear how we could deal with this, even with a full custom Z-machine interpreter.

The Z-machine screen model

For now, I've worked around this with a hack to avoid printing the status line, by ignoring any attempt to draw in reverse video mode. This is just as nasty a hack as it sounds. A second hack flags to gemrepl when infuse is reading input; this is actually more robust than it might look.

infuse hacks

Upshot: don't type "help" in any of the above games -- you may enter a menu it will be tricky to escape from (though 'qq' ought to be enough).