Does anyone know how Infocom’s the Hitch-Hiker’s Guide to the Galaxy was ported to the BBC website? It says ‘using HTML5’ but that can’t be it. How did they get the images, and the colors, and all the stuff? And the interpreter? Some of this has to relate to ZIL but some doesn’t. Any help?
They have probably analyzed the game file and made a list of memory locations to watch, e.g. player location, each object’s location, etc, and programmed the interpreter to use this information to display images etc.
There are tools to assist in analyzing a Z-code file, such as Ztools, but you can also just open the story file in a hex editor and the follow the Z-machine standards document to understand the contents.
Allen Garvin has done some of this analysis work. See this file: reform-conf/hitch-851108-r059-z3.reform at master · allengarvin/reform-conf · GitHub
I confess I don’t know everything about how that file is organized. Documentation: https://21jswvwz8b.unbox.ifarchive.org/21jswvwz8b/reform_6_070903/reform.html
It helps that in ZIL games, as a general rule, the first three globals will always be the location, score, and turn count. In early versions of the Z-machine, the status line was always constructed out of these three variables. So while some games tweaked this in various ways (like Suspended putting the current robot in the first global so it would display in the status line, or Deadline using the second and third globals to show a clock with hours and minutes), ZIL’s default was always to put those three globals first.
Later versions of the Z-machine let the game code handle the status line, but I believe ZIL still put those globals first by default.