diff --git a/docs/how/if-journey.rst b/docs/how/if-journey.rst index d72e9ba..9334fa3 100644 --- a/docs/how/if-journey.rst +++ b/docs/how/if-journey.rst @@ -248,6 +248,28 @@ Concrete next steps, roughly ordered. Update as items get done. - [x] find the game files: locate freely distributable z-machine story files for the games we care about. Wizard Sniffer, Lost Pig, Zork (if legally available). (zork1.z3 bundled in content/stories/) +milestone — Zork 1 playable in hybrid interpreter +-------------------------------------------------- + +The hybrid interpreter (zvm architecture + ported viola opcodes) can now run Zork 1. This is the first working implementation targeting levels 2-5 — inspectable, moldable, and shared worlds. Level 1 (terminal mode) uses subprocess dfrotz; this is the embedded path. + +What works: + +- 69 V3 opcodes ported, all Zork 1-required opcodes implemented +- key implementations: ``op_test`` (conditional logic), ``op_verify`` (story file checksums), ``sread`` with ZLexer tokenization (parsing player input) +- ``step()`` method for async MUD integration — single instruction at a time, no blocking loop +- instruction trace deque (last 20 instructions) for debugging state errors +- smoke test: ``scripts/run_zork1.py`` runs the game headless, exercises core opcode paths + +What this enables: + +- Read z-machine state (object tree, variables) from MUD code (level 2) +- Write z-machine state, inject items, modify world (level 3) +- Multiplayer instances (level 4, following MojoZork patterns) +- Entity bridge (level 5, further out) + +The step-based execution model means IF sessions can run in the async MUD game loop without blocking. Each player command advances their z-machine instance by N instructions (until output or a stopping condition). The trace deque captures the last 20 instructions for debugging unexpected state. + related documents -----------------