itchio / itch

🎮 The best way to play your itch.io games
https://itch.io/app
MIT License
2.32k stars 199 forks source link

Add support for Z-Machine interpreter (Infocom interactive fictions) #393

Open DivineOmega opened 8 years ago

DivineOmega commented 8 years ago

:rotating_light: game Zork I: The Great Underground Empire is broken for me.

:book: Here's the complete debug log.

DivineOmega commented 8 years ago

This one is not likely to be a priority at all, but I thought it was interesting.

To run this (and the other Infocom interactive fictions), you can Z-Machine interpreter installed. You then run it, passing in the .DAT file within the zip.

The only way I see this easily working is the following:

  1. Detect if an appropriate Z-Machine interpreter is install on the PC (such as frotz for Linux).
  2. Identify the .DAT file for the interactive fiction after extracting the zip.
  3. Run a Z-Machine interpreter appropriate launch command. In Linux with frotz, this could be something like: xterm -e frotz ZORK1.DAT.

Obviously this would involve creating a mapping of various interpreters to the appropriate command lines to execute them. It would also be a bit awkward due to the command needing to be slightly different per OS.

An alternative would be if there is any form of HTML/JS/Node Z-Machine interpreter out there. If such as thing exists, it could possibly be more easily integrated.

fasterthanlime commented 8 years ago

@DivineOmega sounds interesting for a week-end when someone's bored :) Keeping it in mind! :+1:

clayote commented 6 years ago

Parchment is a Z-code interpreter for HTML/JS/Node.

If you embedded Gargoyle instead, you'd get a bunch of extra format support for free, but this would probably complicate the build process somewhat, being that it's a C library.