A Z-machine interpreter: plays Infocom and Inform games (versions 3, 4, 5, 7 and 8)
z-machineinfocominforminteractive-fictiontext-adventure
[decks]
"@deckyard/zmachine" = "^0.1.0"| Version | Status | Kind | Pin | Requires | Engines | Capabilities |
|---|---|---|---|---|---|---|
| 0.1.0 | live | git | 4b8aa1a7e089 | - | jennifer >=0.25.0 jennifer-tiny >=0.25.0 | - |
LGPL-3.0-only
0.1.0Times a client asked this registry where to find this deck. Not downloads: the registry only stores metadata, and the code is fetched from its repository directly, so we never see an install and cannot count one. Repeated builds inflate these numbers; installs from an existing lockfile do not appear at all. Counted in UTC.
A Z-machine interpreter: plays Infocom and Inform games, story files of versions 3, 4, 5, 7 and 8, with Quetzal saves and undo. The machine has no terminal of its own; the host sends it lines and shows what it prints, so a game runs as well in a chat bot or a web page as in a console. Pure Jennifer with no capabilities, so it runs on jennifer-tiny; only open reads a file.
Manual: https://deckyard.github.io/deck-zmachine/
Requires Jennifer 0.25.0 or newer.
jvc add @deckyard/zmachinejvc vendors the deck to vendor/deckyard/zmachine/. Without jvc, copy src/ from a checkout or a deckyard-zmachine-<version>.tar.gz release archive there, minus the test overlays:
mkdir -p vendor/deckyard/zmachine
cp -R path/to/deck-zmachine/src/. vendor/deckyard/zmachine/
find vendor/deckyard/zmachine -name '*_test.j' -deleteuse io;
import "@deckyard/zmachine/" as zmachine;
def m as zmachine.Machine init zmachine.run(zmachine.open("zork1.z3"));
$m = zmachine.send($m, "open mailbox");
io.printf("%s", zmachine.output($m));
# Opening the small mailbox reveals a leaflet.
#
# >
io.printf("%s\n", zmachine.upperWindow($m)[0]);
# West of House Score: 0 Moves: 1examples/play.j plays a story in the console:
jennifer run examples/play.j zork1.z3No game ships with the deck. Zork I-III are published by Microsoft under the MIT licence, the IF Archive holds hundreds of free Inform games, and testdata/lantern.z5 is a two-room test game.
The test suite plays the Czech conformance suite in versions 3, 4, 5, 7 and 8 and Praxix in version 5, and every test in both passes. The manual's What is supported page lists what is left out.
LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>. The test stories in testdata/ carry their own licences; see its README.