Settings

Theme

Source code for a 1977 version of Zork

github.com

71 points by jamghee 2 years ago · 23 comments

Reader

bazil376 2 years ago

Reminds me of when I stumbled upon these Zork maps: https://www.vaultofculture.com/vault/nst/2023/02/13/zorkmaps

larsbrinkhoff 2 years ago

Previously: https://news.ycombinator.com/item?id=23108626

KerrAvon 2 years ago

There are multiple versions of mainframe Zork available on GitHub. See https://eblong.com/infocom/#zorkmdl for this and everything else Infocom.

  • 082349872349872 2 years ago

    Just as an aside on how far we've come since the mid-1980s: back then I had heard of a "Dungeon Definition Language" for writing adventure games (IF) by someone at UCSD(?). I emailed him to ask for the source code, and he kindly granted me access. Instead of a 'git clone' or downloading a tarball, however, this involved me (a) snail mailing him a paper cheque covering the costs of a tape, operator time, and postage; (b) waiting a week or so; and (c) finally receiving a large puffy envelope in the mail, which I was able to have read into my account (for free, due to a friendly sysadmin) the next working day. Then, of course, there was the usual hour or so of (d) fixing up all the little places where your correspondent's unix didn't do things quite how your home system's unix did, before having a copy that actually built and ran.

    https://en.wikipedia.org/wiki/9-track_tape

    • larsbrinkhoff 2 years ago

      Probably this, right? https://adl.sourceforge.net/ddldoc.html

      Do you still have that code?

      • 082349872349872 2 years ago

        That was it!

        Unfortunately I definitely don't have it online. That was last century on a different continent; if I did still have it, it'd be on 9-track, in the bottom of a filing cabinet somewhere underneath less-rectangular-things on the back wall of my cellar, with two generations of my wife's family's stuff sitting in front of it, making the chances I'll ever get back there in the medium future ... rather low.

        Topology in the 21st century is funny: I'm 300 ms away from a server 12 time zones away, yet there are parts of my own house I haven't seen in over 3.156e+11 ms.

        • flyinghamster 2 years ago

          > Topology in the 21st century is funny: I'm 300 ms away from a server 12 time zones away, yet there are parts of my own house I haven't seen in over 3.156e+11 ms.

          I resemble that remark. I'm about to embark on some major housecleaning and getting-rid-of-crap.

  • larsbrinkhoff 2 years ago

    To clarify, "Mainframe Zork" usually means the original MDL version for the PDP-10, Bob Supnik's Fortran translation thereof, or the C translation of the Fortran version. The other, "not mainframe" Zork, is Infocom's Zork series written in ZIL and running on microcomputers.

ghaff 2 years ago

Presumably parsers could be much more conversational and sophisticated today? Has anyone created such a thing?

  • livrem 2 years ago

    The old Infocom parsers were quite advanced and support much more advanced grammar than I think I ever considered using in playing a game like that.

    Later Infocom games, and later hobby interactive-fiction, has conventions like allowing some abbreviations (x for examine, l for look, i for inventory). My transcripts are full of those. Even if the parser will probably correctly parse a sentence like "I want to look at the table, please", in practice most of us will just type "x table" anyway.

    The parser also allowed for combined commands, at least in somewhat later games, so you could type things like (I think) "examine the table and then pick up everything that is on it. then ask the dwarf to go north" as a single command (but that is still going to be split up into several actions, as if they had been entered as several shorter commands). I never learned enough about the parser to dare try to use things like that as I am not quite sure what the parser would understand or not. Easier to just input one thing at a time and see what happens before typing in the next thing.

    While the parsers can be impressive, I just as happily go back to play the more simpler games like the ones by Scott Adams that used a two-word parser and only read the first three letters of each word. You really don't need more than that for good player input. That user interface is much easier to use as there are fewer things you may have to try to make the parser understand what you want to do.

  • chongli 2 years ago

    You mean an LLM-based adventure game? There’s AI Dungeon [1]. Or do you mean a more sophisticated conventional parser with a hand-crafted adventure? That I’m not aware of.

    From what I know about adventure games with parsers, they’re essentially just a big finite state machine with descriptions for each state and a hard-coded list of commands that trigger state transitions. There may be additional commands that print a whimsical or humorous response but otherwise leave the player in exactly the same state. There’s also usually a default response for when the input can’t be parsed into a valid command.

    The AI Dungeon approach, as far as I’m aware, isn’t really a game with rules and a reachable end condition. It’s just an LLM trained on fantasy role-playing description so it can produce a lot of stuff in response to any prompt. What it lacks, as far as I’m aware, is the underlying state machine.

    [1] https://play.aidungeon.com/

    • ghaff 2 years ago

      The latter. As you say, adventure games are basically state machines as I understand it. (I know a bunch of the Infocom folks but never dug into the technical details.)

      I guess I don’t have a clear idea of exactly what I’m asking for aside from a general feeling that you could create more natural feeling interactions with today’s technologies. But I’m not sure what that would look like. I should chat with one of my Infocom friends one of these days.

      • chongli 2 years ago

        I think it would just take a ton of work. If you’re not willing to make the leap to AI (and non-determinism) then conventional technology doesn’t have much to offer for NLP (which is what the task ultimately boils down to).

        The trouble with trying to build a deterministic, logic-based NLP for interacting in a game world is essentially a special case of the frame problem [1] in AI.

        [1] https://en.wikipedia.org/wiki/Frame_problem

        • fl7305 2 years ago

          I'm guessing it would be like a fever dream to let an LLM be the dungeon master in isolation. Things would change after the fact in weird ways, especially when the context grows too large.

          But what about coupling an LLM with a physics simulator and a 3D world model?

          You still interact with the LLM in a text interface, but hidden conversations take place with the simulator where the LLM can interrogate the current state of the 3D world simulator to describe it to the player. You could even do this using GPT4-Vision to interpret rendered images. When the player performs an action, it is translated into "physical" actions into the 3D world simulator which updates its state.

          It feels like someone should have done this already?

  • 082349872349872 2 years ago

    See https://ganelson.github.io/inform-website/

    (Inform 7 games are actually also programmed in a kind of adventure-speak, but if anyone is willing to play guess-the-verb in not-quite-natural-language, it'd be IF fans. eg https://literateprograms.org/dijkstra_s_algorithm__inform_7_... )

  • smcameron 2 years ago

    I don't know if this counts, but I wrote a parser for "the ship's computer" in my game, "Space Nerds in Space". It's described here: https://scaryreasoner.wordpress.com/2016/05/14/speech-recogn...

    (and that reminds me, there's Google's Parsey McParseface: https://blog.research.google/2016/05/announcing-syntaxnet-wo... though I'm not sure how practical it would be to use that in an interactive fiction context.)

    I also wrote some toy "interactive fiction" things (with less sophisticated parsers) in python and Lua as a way to gain familiarity with those languages, not that they are very interesting in and of themselves, though they demonstrate a fairly standard technique behind these kinds of games in a compact way.

    https://github.com/smcameron/smcamerons-python-adventure

    https://github.com/smcameron/space-nerds-in-space/blob/maste...

  • ZeroGravitas 2 years ago

    I was playing some classic text adventures recently, and what I felt would be straightforward and helpful to improve existing games would be if there was a wrapper that would probe the code to understand all valid commands e.g. "get lamp" and then use vector embeddings so that "grab light", "take gaslight" or other basically equivalent phrases wouldn't give you that immersion shattering response of "There is no <light> visible" or "I do not understand <take>" which makes the parser seem dumb sometimes.

    It could fix typos at the same time (which I think some games and engines do to some extent already)

bazil376 2 years ago

Does anyone know if zork is compiled to another language that is easily runnable in a local environment?

donatj 2 years ago

What language is this written in?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection