
Source code for Zork, Hitchhiker’s Guide, and other Infocom games - laurent123456
https://github.com/historicalsource?tab=repositories
======
bredren
Hitchhikers Guide was one of the first PC games I ever got. I had no idea it
was a “text adventure.” Nor did I understand it was based on a book.

My dad got it for me used from The Computer Club in downtown Lake Oswego,
Oregon. I picked it out largely due to the green guy on the front of the box.

I remember being delighted by all the weird stuff it came with, including a
small packet of fuzz, and other artifacts from the story. I didn’t know why
they were in the box but it was weird and that appealed to me.

Even though I was raised by Nintendo games like RC Pro AM, I spent many hours
trying to figure out how to advance in HG. Often starting over from scratch.

Eventually, I got the book, read it and attempted the game again, and though
the context made it more fun, I think I still got stuck somewhere around where
you put the Babel fish in your ear.

~~~
jerf
It is an extremely difficult game. In theory, I know the answer to all the
puzzles, however, there are so many ways to lose without realizing it that
I've never managed to string together a single play session in which I do it
correctly. Though I've also long since stopped trying. :)

For instance, there are subareas where you must collect various tools. Many of
these are themselves rather fragile affairs, easy to ruin. At the end of the
game, to open a door, you will be asked for a certain random tool. However,
this is not a matter of collecting 8 out of 10 tools and having an 80% chance
at the end; if you are missing even a single one, the game will draw its
random selection from the tools you do not have. IIRC this is also after a
point-of-no-return.

The Babel fish puzzle is another example of the evilness of the game. While
this one _is_ possible to complete without a guide, it isn't possible to
complete it on your first attempt. There is a machine that will vend the
Babelfish. It will fail in various ways, such as vending the fish into areas
you can't get to if you don't block that direction. You have a limited number
of tries before the Vogons come to get you and it's a game over if you don't
have the fish at that point. However, the amount of time you have is not
sufficient to go through the loop of trying the machine, fixing the problem it
reveals, trying the machine again, fixing the next problem, etc. There are
simply too many problems and not enough time. You have to simply
memorize/write down the solutions once, then next time directly implement them
in what would appear to be a psychic manner next game. (There's also an early
"silent failure" state here; if you did not pick up the junk mail from your
house, you lose here.)

If you wrote down an objective standard to measure an adventure or text game
by, such as "should not have unlabeled no-win situations", or "should be
solvable on the first play (even if hard)", or other such things, the
Hitchhiker's Guide to the Galaxy text game would flagrantly fail most of them.
Whether it's a _bad game_ , I leave that to the reader, but it certainly
breaks a lot of rules.

~~~
Wowfunhappy
Frankly, this sounds like terribly punishing game design. Why did so many
players put up with it? Was there really nothing better?

~~~
Bartweiss
The other responses about difficult Infocom games are all accurate, but it's
worth noting that Hitchhiker's Guide in particular played this as _comedy_.
There were genuinely tough puzzles, but there were also lots of elements which
essentially pulled the rug out from under the player to amuse them with
unreasonable demands. Broadly, the game didn't feel as fundamentally _hard_ as
many of its contemporaries. Instead, it felt like competing against an
obstinate and sarcastic opponent, so failing repeatedly was exasperating and
funny instead of aggravating.

For instance, lots of early text games required tricky-to-identify commands
for technical reasons, like the myriad ways to phrase "use key on door".
Mostly, that was just frustrating and accepted because there was nothing
better. _Hitchhiker 's Guide_ came late enough to parse language somewhat more
gracefully, so it replayed that trope as parody by occasionally requiring
absurd phrasings for basic commands. "Take aspirin" didn't work, but "get
buffered analgesic" (a phrase the game did present to you) did. And then the
rest of the time, it went back to fairly normal naming standards so as not to
irritate the player.

As a horribly-dated example: _Battletoads_ is infamous as one of the hardest
platform games in history, but it was challenging by simply taking the
standard play elements of a game like Mario and making them excessively tight
and demanding. _Syobon Action_ is also infamously difficult, but its gameplay
is (often) relatively forgiving. The challenge comes from suspending normal
conventions of games like making threats visible and giving consistent
behavior to objects. Putting any one instance of that style in a normal game
would be a ridiculous design error, but Syobon is built on escalating that
unfairness to the point of humor, and openly demands trial and error as the
way to progress.

~~~
ThorinJacobs
+1 - Another great example of difficult games as parody is I Wanna Be The Guy
([https://en.wikipedia.org/wiki/I_Wanna_Be_the_Guy](https://en.wikipedia.org/wiki/I_Wanna_Be_the_Guy)).
Take all the existing conventions and stereotypes of difficult platform games
and exaggerate them to the extreme.

~~~
Bartweiss
IWBTG is another great example, definitely. And almost the exact same type of
classic-NES parody, where Mario:Syobon::Metroid:IWBTG.

Thinking about it a little more, this pattern seems to describe an entire
class of games, including non-parodies. _Dark Souls_ is famously hard because
of sheer mechanical difficulty, certainly. But it's also rife with learnable,
low-threat moments like "when you walk up this staircase, a boulder will fall
on you from offscreen". They don't alter the overall difficulty too much, but
they clearly convey that the game isn't honoring standard design principles
about giving the player a "fair chance". In an odd way, it makes later
departures like "the illusory wall doesn't have anything marking its location"
feel more justified.

~~~
leoc
When you put it that way, I can almost see the brokenness of the controller
support in the PC port as part of the joke. Almost ...

------
andrewstuart
This is the correct link, not the one on the HN post:
[https://github.com/historicalsource?tab=repositories](https://github.com/historicalsource?tab=repositories)

As a zipfile because someone is bound to get that repo taken down.

[https://drive.google.com/file/d/1S1CgtZNEKS8VITqTAWAkeyO0LBf...](https://drive.google.com/file/d/1S1CgtZNEKS8VITqTAWAkeyO0LBf4ninh/view?usp=sharing)

~~~
localhostdotdev
not likely to be taken down as the CEO tweeted about it:
[https://twitter.com/natfriedman/status/1118057606159798274](https://twitter.com/natfriedman/status/1118057606159798274)

~~~
vanderZwan
I love how a tongue-in-cheek reply about the lack of syntax highlighting for
ZIL files drew the attention of someone who _actually_ implemented syntax
highlighting for it.

[https://twitter.com/taradinoc/status/1118181848494985216](https://twitter.com/taradinoc/status/1118181848494985216)

~~~
taradinoc
Who _is_ that handsome mystery developer, where did he come from, and why
can't we get enough of him?

~~~
vanderZwan
We'll probably never know, it's a mystery for the ages.

Rumor has it that he owns [http://zilf.io](http://zilf.io), but that appears
to be unfounded

------
alexhutcheson
I don't see it here, but Bureaucracy[1] was also really great. The whole
premise of the game was that you are trying to change your address with your
bank after a move. It's never that easy...

[1]
[https://en.wikipedia.org/wiki/Bureaucracy_(video_game)](https://en.wikipedia.org/wiki/Bureaucracy_\(video_game\))

~~~
frabcus
It's there!
[https://github.com/historicalsource/bureaucracy](https://github.com/historicalsource/bureaucracy)

------
johnmw
If you have an interest in odd programming languages, the 'spiritual
successor' to these games written in the Infocom ZIL language would be
Inform7.

I think it is quite a fascinating declarative language that reads much like
English, for example:

 _The same division between creating things, and laying down rules, is visible
in Inform source text. The creation of the world is done by making
unconditional factual statements about it. For example,_

    
    
      The wood-slatted crate is in the Gazebo. The crate is a container.
    

More info:
[http://inform7.com/learn/man/WI_2_1.html](http://inform7.com/learn/man/WI_2_1.html)

~~~
baruchel
IMHO, Inform6 (which is a true object-oriented programming language) is much
more powerful than Inform7. I tried both and found that: I7 is not consistent
and often ambiguous: some pieces of code would get broken after inserting a
perfectly valid "sentence" with no explanation; compilation is slow, execution
is slow; some tiny compiled text games with no picture and no sound weight
more than 5Mo. If I had a large project to code, I would take I6 without a
doubt.

~~~
taradinoc
Everything you said about I7 is true, but its real value comes from the
abstractions it introduces.

That is, it isn't just an English-like syntax for writers who are used to
writing in complete sentences... it's a programming model based on concepts
from narrative, technical writing, and linguistics, for writers who are using
it to write narratives, describe technical systems, and manipulate text.

I7 integrates high-level domain concepts of interactive fiction into the
language: scenes and continuity, rules and their exceptions, relationships
between objects, templates for parsing and printing text.

------
phjesusthatguy3
Something that I just learned about as a result of this story: According to
this blog post[0], Brian Moriarty himself shared the source for the TRS-80
CoCo version of the official interpreter[1], so that's out there too.

[0][https://retrotinker.blogspot.com/2018/02/z-intepreter-
source...](https://retrotinker.blogspot.com/2018/02/z-intepreter-source-for-
coco-recovered.html)

[1][http://www.colorcomputerarchive.com/coco/Programming/Source/...](http://www.colorcomputerarchive.com/coco/Programming/Source/Infocom%20Adventure%20Games%20Interpreter/)

------
Buetol
Found some funny scripts used for the unreleased game "The restaurant":
[https://github.com/historicalsource/restaurant/blob/master/t...](https://github.com/historicalsource/restaurant/blob/master/things.zap#L49)

~~~
speps
Note that this is probably based on the the sequel[1] to H2G2 given that H2G2
was completed as game.

[1]
[https://en.wikipedia.org/wiki/The_Restaurant_at_the_End_of_t...](https://en.wikipedia.org/wiki/The_Restaurant_at_the_End_of_the_Universe)

~~~
pwiecz
You can find a somewhat playable early "prototype" linked from here:
[https://waxy.org/2008/04/milliways_infocoms_unreleased_seque...](https://waxy.org/2008/04/milliways_infocoms_unreleased_sequel_to_hitchhikers_guide_to_the_galax/)

~~~
WorldMaker
What might have been if Infocom hadn't tried to "grow up" and make business
software.

~~~
bluGill
The name Infocom comes from their desire to make business software. To a large
extent they considered games that they had written in the past to be a way to
raise money so they could afford to make the business software that would make
them rich. Games were always a distraction in their eye - a profitable one,
but not their purpose. As far as I know they never got anywhere with business
software...

~~~
WorldMaker
I realize. Still doesn't mean I can't lament them for not realizing they were
already successful and could continue to be. Just imagine if BioWare had kept
trying to make medical software despite the success of their RPGs, just
because their name said they should.

~~~
notahacker
The Infocom brand and creative team outlived their failed business software
division, but couldn't survive the tension of being acquired by a games
company that wanted to churn out more content. It's possible the company
regarding the games division as a side project to raise seed money rather than
a cash cow actually indirectly helped the creative side...

(Either way, I think it'd have struggled to survive the emergence of story-
driven games with good graphics. There's plenty of comparatively well-written
and user-friendly modern IF which only reaches niche audiences despite it
being freely available and publicised across the internet )

~~~
WorldMaker
Infocom was experimenting with graphic adventures towards the end. (Zork Zero
was a fascinating experiment. Maybe not a successful or entirely enjoyable
one, but something with possibility.)

It's impossible to say how well Infocom might have done as graphics continued
to take focus. The diaspora of Infocom's creative talent worked on many well-
beloved graphic adventure games (Moriarty's LOOM and influence on other
LucasArts games, Meretsky's The Space Bar and influence as a consultant to a
variety of game companies in roughly the same time span, as two examples
quickest to mind).

They still probably wouldn't have survived the "adventure game" crash that
eventually broke Sierra and LucasArts, but it's interesting to wonder what
sort of a contender they might have been had they not been forced to sell to
Activision (or had they stumbled into selling to a publisher that was a better
fit creatively).

Anyway, its interesting to armchair quarterback with decades of hindsight. The
business software was a technical marvel of a sort and potentially had it been
much better timed and budgeted it could have eaten Lotus and Excel's lunch.
Maybe there's an alternate universe where we are all using an Infocom office
suite and Infocom operating system on hardware Z-Machines, which is a fun idea
to think about.

------
jordanpg
I love interactive fiction (as these types of games are now denoted) then and
now. In principle. There are possibilities with the text-only canvas that are
not even conceivable in other media.

But really, does anyone have time for these games anymore? Playing these
Infocom games is a multi-month project, with a significant amount of note-
taking, manual mapping, and patience (read: replay) required. To call the
"parser" interface limiting is an understatement, especially where it concerns
dialog.

See
[https://ifdb.tads.org/viewgame?id=aearuuxv83plclpl](https://ifdb.tads.org/viewgame?id=aearuuxv83plclpl)
and [https://hadeanlands.com/](https://hadeanlands.com/) for modern examples.
They've tremendously expanded on the old guard, both in technological terms
and in creativity, and yet still suffer from the same fundamental limitations.

I don't know what the future holds for IF, but more evolution is needed before
these games can compete for mindshare in the 21st century. I read a lot, but I
just can't make the time for these kinds of games anymore. Not even close.

~~~
adelrune
Have you tried any of the modern games other than the two you linked ? A lot
of the games being made right now are shorter and punchier than the classic
infocom games.

Suveh nux
([https://ifdb.tads.org/viewgame?id=xkai23ry99qdxce3](https://ifdb.tads.org/viewgame?id=xkai23ry99qdxce3))
is a great example of a modern game that is short, interesting and uses the
medium in an interesting manner.

~~~
anthk
Anchorhead, Jigsaw, Curses... aren't so short.

~~~
psychobabble
wat? Anchorhead took me an evening to complete.

------
spoppy
I saw this extra feature on the downloadable special edition of the
Hitchhiker's Guide TV series a little while back, which talks about the engine
behind the infocom game and the language that it's programmed in.

BBC Micro Live - Douglas Adams BBC Micro Live presenter, Conner 'Freff'
Cochran, talks to Douglas Adams about The Hitchhiker's Guider to the Galaxy
computing game and future software plans.
[https://www.facebook.com/BBCArchive/videos/594990580873976/?...](https://www.facebook.com/BBCArchive/videos/594990580873976/?v=594990580873976)

------
laurent123456
Announcement:
[https://twitter.com/textfiles/status/1118005126457888768](https://twitter.com/textfiles/status/1118005126457888768)

------
raldi
If you're interested in this, you might appreciate I Spent My Weekend Hacking
Zork: [https://redd.it/10dtch](https://redd.it/10dtch)

------
philipodonnell
> In general, Infocom games were created by taking previous Infocom source
> code, copying the directory, and making changes until the game worked the
> way the current Implementor needed. Structure, therefore, tended to follow
> from game to game and may or may not accurately reflect the actual function
> of the code.

Some things never change...

EDIT: this is how I do most of my personal projects!

~~~
bantunes
I think this has to do with the authors being more literary than tech savvy.

~~~
pavlov
Infocom was famously tech savvy though. The founders came from MIT's
Laboratory for Computer Science (LCS) where they developed the first Zork
adventure.

------
donretag
Each game (from the ones I recognize) fit on a single 5.25" 360KB floppy. We
barely think in megabytes anymore.

~~~
jackhack
and ran in < 40 kilobytes of RAM on the Apple ][, less on TRS-80 and Commodore
if I recall correctly. The game ran in a virtual machine built for various
architectures so that the game could be built once and run anywhere. (Write
once, run anywhere -- an idea that would later catch on with a certain
programming language that is now displaying this text on your browser screen.)

Those games felt miraculous back in the day. I still recall the amazement I
felt playing the detective game Deadline
([https://en.wikipedia.org/wiki/Deadline_(video_game)](https://en.wikipedia.org/wiki/Deadline_\(video_game\))
) and the way the simulation moved on in real time -- people wandering through
a house, or suspects fidgeting nervously or offering additional info while I
questioned them -- even if I didn't enter a command and merely waited.

Appreciating the severe limitations it operated within makes it all the more
amazing. Another fine example of "scarcity drives innovation."

40,000 bytes for all code and data. Wow.

~~~
magduf
>40,000 bytes for all code and data. Wow.

That sounds impressive, but it really isn't that much, because it's text-only.

If you want to see something truly impressive, look at Super Mario Bros. on
the NES: the entire game is about 64k! Most of the NES games were on that
order of size, and they were graphical real-time games.

Also, I'm pretty sure that you'll find with these text-adventure games that
they compress quite readily down to a fraction of the size you stated. NES
games, not so much. ASCII text isn't a terribly efficient medium of storage,
and they didn't have much if any data compression in those days.

~~~
duskwuff
> I'm pretty sure that you'll find with these text-adventure games that they
> compress quite readily down to a fraction of the size you stated.

You might be surprised. Infocom games don't store text as ASCII; they use a
more compact format [1] which packs three characters into every two bytes, and
allows for "abbreviations" of commonly used text fragments. Obviously it's
nothing like a modern compressor, but still surprisingly effective.

I tested GZIP and XZ against a sample of 19 vintage Infocom games. GZIP only
managed to compress them by 30%; XZ did a little better at 40%, but still
nowhere near what you'd expect for text (70-80%).

[1]: [https://www.inform-
fiction.org/zmachine/standards/z1point0/s...](https://www.inform-
fiction.org/zmachine/standards/z1point0/sect03.html)

~~~
magduf
Very interesting, and better than I would have expected (as in, that's a lower
compression rate than I would have expected).

I wonder how gzip and xz do with Super Mario Bros. and other NES games though.

------
bitforger
Reminds me of that time I hacked together Zork for the Google Home.

You can still try it out, I think, if you say "Ok, Google, let me talk to
Dungeon RPG"

[https://github.com/mitchellgordon95/DungeonForGoogleHome](https://github.com/mitchellgordon95/DungeonForGoogleHome)

~~~
Wowfunhappy
Oh, cool! I'd love for someone to make a more fully-baked version of this. Get
some good audiobook narrators and voice actors, and add sound effects and
stuff!

Smart assistants, ironically, feel like the perfect medium for "text"
adventure games to have a resurgence.

~~~
bitforger
I totally agree! I think this will be more true as we get better at natural
language understanding. (coincidentally, this is my PhD research area)

There's still a lot of unsolved problems for making this kind of stuff usable.
But we can dream, haha, and we're getting closer. I think the possibilities
for games are actually much more impressive than most people imagine, right
now.

------
kronin
"Want some rye?" "'course ya do!"

~~~
Dirlewanger
Great game, was my introduction to the Zork world. Like 8bit/16bit games, I
wish video capture adventure games would make a comeback, even though I know
it's a pipe dream...

~~~
WorldMaker
There was a Tex Murphy game (Tesla Effect) released in the last couple of
years (and was Kickstarter backed), and Her Story made a big splash slightly
more recently than that. Several Her Story inspired productions since have
been in the works or released. They'll probably never be mainstream/"AAA"
again, but there likely will continue to be some people building them so long
as they can find their audience.

Plus, AAA game mo-capping has gotten to the point where some of them such as
Uncharted and Quantum Break feel very close to classic FMV, with the benefits
of a full 3D environment. Quantum Break even had entire "TV episodes" in the
middle, making it perhaps the wildest "FMV" game of the last few years.

------
bcl
For those of you who are new to text adventures you can find images of most of
the game boxes here -
[http://infocom.elsewhere.org/gallery/](http://infocom.elsewhere.org/gallery/)
and various other resources here
[http://infocom.elsewhere.org/](http://infocom.elsewhere.org/)

------
pyreal
I found a swear in the Hitchhiker's source code:

[https://github.com/historicalsource/hitchhikersguide/blob/ma...](https://github.com/historicalsource/hitchhikersguide/blob/master/globals.zil#L671)

~~~
DonHopkins
I can't find a definition for that, but it's used in several places. Is
<FUCKING-CLEAR> a ZIL primitive??!

~~~
taradinoc
It's defined in verbs.zil.

[https://github.com/historicalsource/hitchhikersguide/blob/d7...](https://github.com/historicalsource/hitchhikersguide/blob/d7fddb5ebf706e6b7ce2398169a4a987a8f8aeb2/verbs.zil#L2862)

------
sp332
Looks like GitHub will quickly have support for syntax highlighting of ZIL
files.
[https://github.com/github/linguist/pull/4497](https://github.com/github/linguist/pull/4497)

~~~
dcreager
It's live!
[https://twitter.com/natfriedman/status/1118647837951004672](https://twitter.com/natfriedman/status/1118647837951004672)

------
vectorEQ
[https://bitbucket.org/jmcgrew/zilf/wiki/Home](https://bitbucket.org/jmcgrew/zilf/wiki/Home)
could zilf compile it? (i am not familiar with this language at all...)

~~~
chkuendig
It does, at least Zork runs, see [http://blog.zarfhome.com/2019/04/all-of-
infocoms-game-source...](http://blog.zarfhome.com/2019/04/all-of-infocoms-
game-source-code.html) and [https://github.com/Homebrew/homebrew-
core/pull/38990](https://github.com/Homebrew/homebrew-core/pull/38990)

------
chrisbrandow
This is a codebase I’ve long been interested in seeing. I just always assumed
it would be inscrutable assembler, though I should have known better given the
game’s lineage.

Boy, this brings me way back to playing Zork on a 20 lb amber-screen ibm
“portable”.

------
armitron
Also relevant:
[https://archive.org/details/infocomcabinet](https://archive.org/details/infocomcabinet)

------
ThorinJacobs
The notation for player death appears to be "JIGS-UP". Glad to see the classic
Infocom sense of humor is present in the codebase too.

------
zubairq
Amazing Games!!! I still have boxed Amiga and ST Infocom games which I will
probably never play, but keep just for the packaging!

------
PaulHoule
My that looks like LISP!

~~~
jhbadger
Basically the history goes Lisp -> MDL -> ZIL

~~~
taradinoc
MDL and Lisp kinda co-evolved, and some MDL features (lambda lists, maybe
others?) made it into the evolutionary branch that lived.

~~~
larsbrinkhoff
Basically correct.

The first Lisp for MIT's IBM mainframe was ported to the AI lab PDP-6, running
standalone. Later ITS was written for the PDP-6, and Lisp was ported to run
under timesharing by 1968. This evolved into Maclisp.

MDL, first called Muddle, is mentioned in Project MAC Progress Report VIII,
covering 1970-971. "The extension of LISP is known locally as "MUDDLE". It was
designed and has been implemented by Carl Hewitt and Gerald Sussman of the
Artificial Intelligence Laboratory and Christopher Reeve, David Cressey, Bruce
Daniels, and Gregory Pfister of Dynamic Modeling".

Ideas from Muddle made it back to Maclisp. The first Lisp Machine Lisp (later
ZetaLisp) was basically a reimplementation or Maclisp (as is Emacs Lisp), and
Common Lisp is to a large degree a subset of Lisp Machine Lisp.

------
newzisgud
[https://github.com/historicalsource/zork1/blob/87a3b787d166a...](https://github.com/historicalsource/zork1/blob/87a3b787d166a441cab8d89d87f9a3753d40daa8/gverbs.zil#L1640)

------
b3lvedere
Cool. I still got my Masterpieces of Infocom cdrom somewhere. I was very
dissapointed Hitchhiker's Guide to the Galaxy was not a part of the collection
:)

------
ggm
I used to enjoy the fortran-to-c ported pre-infocom zork on BSD. I never got
into the bigger world they went with but friends spent many fine hours in
them.

------
willvarfar
So, are these playable online over gh-pages? It would be so cool if the gh-
pages contained an interpreter that loaded the source from github.

~~~
pja
The compiler for these source files has been lost. You can play the zip files
that were released commercially with Parchment, but because the copyright on
those has not expired you wont be able to do so legally on the public internet
I believe.

~~~
evilotto
[https://iplayif.com/?story=https://github.com/historicalsour...](https://iplayif.com/?story=https://github.com/historicalsource/zork1/raw/master/COMPILED/zork1.z3)

------
andrewstuart
Alas no Trinity - the greatest IF game of all time.

~~~
pm215
Er, Trinity is there:
[https://github.com/historicalsource/trinity](https://github.com/historicalsource/trinity)

~~~
andrewstuart
You're right. Good news. You should play it if you haven't and if you love IF.

Along with The Enchanter, which is equally good, if not better.

------
laurent123456
There is no existing compiler for all this programming language any more.
Maybe someone will give it a try and create an interpreter.

~~~
jacobush
There are plenty:
[https://en.wikipedia.org/wiki/Z-machine](https://en.wikipedia.org/wiki/Z-machine)

~~~
jperry
Z-Machines aren't compilers, they're virtual machines that can execute the
compiled output.

There's no (known) compiler that still exists that can compile ZIL into
Z-code.

edit: except for zilf, as mentioned, but it's not functional for even zork 1.

~~~
david-given
ZILF works just fine. There's even a competition for games written in ZIL
using it:

[https://www.facebook.com/groups/ZILcom/permalink/76701623374...](https://www.facebook.com/groups/ZILcom/permalink/767016233740109/)

------
HeavyStorm
I've just now realized why when the movie came out I had already heard about
Hitchhiker's!

------
outside1234
Is there any good modern analogue to Infocom games that I can plan on my
iPhone slowly?

~~~
jackhack
Slowly? the iPhone is many thousands of times more capable than any of the
target systems these software were built for -- typical was a 1 megahertz
8-bit CPU with 32 kilobytes of RAM.

Even the most inefficient ZIL interpreter will spend most of its time in a
stall loop.

~~~
egypturnash
I think “play slowly” in this case means “take it out during odd moments of
the day such as waiting in a line or riding a bus and poke at the puzzles
instead of catching up on Twitter”.

I am pretty sure that even a first-generation ZIL interpreter spent the bulk
of its cycles flashing the cursor and waiting for the player to type
something.

~~~
jackhack
Thank you - that makes perfect sense. I obviously forgot that there's a human
element to all this.

------
grifball
<TELL " You are likely to be eaten by a grue.">)> <CRLF>

~~~
duskwuff
\--
[https://github.com/historicalsource/zork1/blob/master/gverbs...](https://github.com/historicalsource/zork1/blob/master/gverbs.zil#L1640)

The SPRAYED? global wasn't used in Zork I, but showed up in Zork II as the
Frobozz Magic Grue Repellent.

~~~
lou1306
Just another reminder that the Zork trilogy started as a single PDP game, I
guess :) It's remarkable how they were able to cut it up almost without
breaking a sweat.

~~~
duskwuff
I wonder how much work it would be to glue the games back together?

~~~
larsbrinkhoff
Or you could run the un-split original MDL Zork.

------
wolco
Just looking at the source code. Things haven't changed all that much.

------
bencollier49
No license anywhere. These games are still valuable IP aren't they?

~~~
klez
At the bottom of the README

> This collection is meant for education, discussion, and historical work,
> allowing researchers and students to study how code was made for these
> interactive fiction games and how the system dealt with input and
> processing. It is not considered to be under an open license.

So all rights reserved, basically

~~~
baroffoos
Not too bad really. This code is so old I doubt anyone really knows how to
work with it properly or get it running on a modern machine. Only good for
curiosity

------
z3phyr
Is that some kind of angle bracket lisp?

Can anyone shed more light of zil files?

~~~
WorldMaker
It's exactly a Lisp derivative/fork. Zork was originally written in MDL [0], a
Lisp derivative in use on MIT's mainframes (that in turn went on to inspire
parts of Scheme). When the Zork team left college to form Infocom, they built
ZIL to port Zork to home computers, based on their experience of MDL, and
their needs for their Z-Machine virtual machine.

[0]
[https://en.wikipedia.org/wiki/MDL_(programming_language)](https://en.wikipedia.org/wiki/MDL_\(programming_language\))

~~~
lispm
> Scheme

don't know. But Lisp Machine Lisp and then Common Lisp.

~~~
brlewis
I've seen EQUAL? in some of the code snippets. I can believe that inspired
Scheme predicates.

~~~
lispm
Yes. But I think that's relatively minor.

From 'The Evolution of Lisp' Steele/Gabriel:

> MDL also introduced through example the use of a final ? in a name to
> connote a predicate ... Lisp Machine Lisp would pick up the lambda lists and
> the locatives, and would adapt the evaluation and splicing markers in
> backquote, though the evolution of the concept passes through Conniver where
> it is refined into a form very similar in appearance and effect as in Lisp-
> Machine Lisp, but in fact the implementation is quite different. Scheme
> would pick up the use of a trailing “?” for predicates. MDL had a
> multitasking facility that would reappear in various forms in Lisp-Machine
> Lisp, Conniver, and various implementations of Common Lisp.

Scheme got the '?'.

LML got complex arglists, locatives, markers for evaluation/splicing in
backquote, multitasking.

~~~
taradinoc
Hmm, which evaluation and splicing markers is it referring to?

MDL doesn't have quasiquoting, but it has "segments" that expanded while
evaluating a structure (prefix a form with "!", and the result is spliced into
the structure), and reader macros expanded while parsing source code (prefix a
form with "%" and the result is inserted, or "%%" and it's discarded).

------
atesti
Is it possible to download all these 136 repositories at once?

~~~
filchermcurr
curl -s
"[https://api.github.com/users/historicalsource/repos?per_page...](https://api.github.com/users/historicalsource/repos?per_page=300")
| grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs
-n1 git clone

------
DonHopkins
I wrote some comments on the Wikipedia Zork talk page:

[https://en.wikipedia.org/wiki/Talk%3AZork#Link_to_the_origin...](https://en.wikipedia.org/wiki/Talk%3AZork#Link_to_the_original_Zork_source_code_in_MDL)

Link to the original Zork source code in MDL

I suggest linking to the original Zork source code in MDL which is available
here:

[http://retro.co.za/adventure/zork-mdl/](http://retro.co.za/adventure/zork-
mdl/)

Is it OK to link to that source code from Wikipedia? I don't know who
officially owns it, though. It was never a commercial product, and was
developed at MIT. As the Zork article mentions, the Zork source code was
leaked way back in 1977, so the cat's been out of the bag for a long time. A
link to the actual source code would be a nice thing to cite in that section.

It is fascinating to read, and really beautiful code, quite understandable
even if you don't know MDL, and practically a form of literature.

I played the original Zork on MIT-DM and also the Infocom versions of course.
Reading the source code is like seeing the behind-the-scenes underground rooms
and passages at Disneyland!

While I was playing Zork, I found a bug. First some context: when you're
battling the troll, you can give things to him, and he eats them! Sometimes he
drops his axe, and you can pick it up and kill him with it. He blocks the
exits until you kill him.

So I tried "give axe to troll," and he ate his own axe, then cowered in
terror: "The troll, disarmed, cowers in terror, pleading for his life in the
guttural tongue of the trolls."

Not satisfied with that, I tried "give troll to troll", and he devoured
himself: "The troll, who is remarkably coordinated, catches the troll and not
having the most discriminating tastes, gleefully eats it."

...Except that I still could not get out of the exit, because every time I
tried, it said "The troll fends you off with a menacing gesture."

I figured there must be a troll flag that wasn't getting cleared when the
troll devoured itself. And sure enough, I found it in the code, and it's
called "TROLL-FLAG!-FLAG"!

Here is an excerpt of the MDL troll code, where you can see the bug, where it
should clear the troll flag when the troll devours itself, but doesn't (well
that's how I would fix it!):

    
    
                   <COND (<VERB? "THROW" "GIVE">
                          <COND (<VERB? "THROW">
                                 <TELL
        "The troll, who is remarkably coordinated, catches the " 1 <ODESC2 <PRSO>>>)
                                (<TELL
        "The troll, who is not overly proud, graciously accepts the gift">)>
                          <COND (<==? <PRSO> <SFIND-OBJ "KNIFE">>
                                 <TELL
        "and being for the moment sated, throws it back.  Fortunately, the
        troll has poor control, and the knife falls to the floor.  He does
        not look pleased." ,LONG-TELL1>
                                 <TRO .T ,FIGHTBIT>)
                                (<TELL
        "and not having the most discriminating tastes, gleefully eats it.">
                          <REMOVE-OBJECT <PRSO>>)>)
                         (<VERB? "TAKE" "MOVE">
                          <TELL
        "The troll spits in your face, saying \"Better luck next time.\"">)
                         (<VERB? "MUNG">
                          <TELL
        "The troll laughs at your puny gesture.">)>)
                  (<AND ,TROLL-FLAG!-FLAG
                        <VERB? "HELLO">>
                   <TELL "Unfortunately, the troll can't hear you.">)>>
    

Xardox (talk) 02:45, 15 January 2013 (UTC)

You can give something that you don't have? I was under the impression that it
wouldn't work. Double sharp (talk) 13:17, 13 March 2013 (UTC)

You can give anything that's in the room or your inventory to the troll. So if
his axe falls on the floor, "give axe to troll" will work without having to
pick it up first, which is supposed to work. But even before he drops the axe
you can go "give axe to troll" and he'll eat it while he's holding it, since
it's transitively in the room. That's the first thing I did, that made me
think of typing "give troll to troll"! Xardox (talk) 03:32, 30 March 2016
(UTC)

~~~
larsbrinkhoff
Bob Supnik got a copy of the latest version from the Zork team, and it's
openly published here:

[http://simh.trailing-edge.com/games/zork-mdl.zip](http://simh.trailing-
edge.com/games/zork-mdl.zip)

I'd like to think this is officially blessed somehow.

------
DougN7
Cool! Now, does anyone know the significance of ‘xyzzy’ and ‘plugh’? :)

~~~
taradinoc
Here's a ZIL version of the game where "xyzzy" and "plugh" first appeared:
[https://bitbucket.org/jmcgrew/zilf/src/tip/Examples/advent/a...](https://bitbucket.org/jmcgrew/zilf/src/tip/Examples/advent/advent.zil?at=default&fileviewer=file-
view-default)

~~~
larsbrinkhoff
I have the oldest available Crowther version running using a DEC Fortran
compiler.

YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING . AROUND
YOU IS A FOREST. A SMALL STREAM FLOWS OUT OF THE BUILDING AND DOWN A GULLY.

~~~
scruffyherder
I remember digging up these to run on simh

[https://jerz.setonhill.edu/intfic/colossal-cave-adventure-
so...](https://jerz.setonhill.edu/intfic/colossal-cave-adventure-source-code/)

Do you have older ones?

~~~
larsbrinkhoff
No, I got them from the same place.

------
ashton314
YYYAAAAAAASSSSSSS

------
Graham24
"Zork I is a 1980 interactive fiction game"

Surely, these were called Adventure Games at the time. I never recall them
being called that.

~~~
icebraining
The box art calls it Interactive Fiction:
[https://upload.wikimedia.org/wikipedia/en/a/ac/Zork_I_box_ar...](https://upload.wikimedia.org/wikipedia/en/a/ac/Zork_I_box_art.jpg)

EDIT: Some more info on the origins; apparently it was first used by an early
creator of such games (Robert Lafore), and then picked up by Infocom:
[https://www.filfre.net/2011/09/robert-lafores-interactive-
fi...](https://www.filfre.net/2011/09/robert-lafores-interactive-fiction/)

~~~
reshie
that would be the right term.

you can see the evolution in cga vga games like quest for glory 1 or kings
guest 1 or even space quest 1 you still had the console style input but was
replaced with the menu bars that most remember from adventure games.

~~~
gmueckl
Even games like Maniac Mansion or Monkey Island where the ability to input
text commands was gone retained a pseudo-commandline above the lower part of
the screen with the verbs and inventory.

