Document Zork 1 milestone in if-journey
The hybrid interpreter can now run Zork 1, marking the first working implementation of the embedded interpreter path. This enables levels 2-5 (inspectable/moldable/shared worlds) rather than just the opaque terminal approach of level 1.
This commit is contained in:
parent
9a0bacd581
commit
e6b63622fa
1 changed files with 22 additions and 0 deletions
|
|
@ -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
|
||||
-----------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue