Microsoft open sources Zork 1, 2 and 3 under the MIT License
Posted by Witty-Play9499@reddit | programming | View on Reddit | 49 comments
Posted by Witty-Play9499@reddit | programming | View on Reddit | 49 comments
Awesan@reddit
These games were absolutely revolutionary both from a gameplay perspective but especially from an engineering perspective.
Essentially they built a specialized instruction set for text-based games and then coded the game using this instruction set. This allowed them to make the executables very small (in bytes) for the amount of content. The actual machine code for these games is tiny since all the actual game is just data.
drekmonger@reddit
The Z-machine. https://en.wikipedia.org/wiki/Z-machine
The main advantage was that it was a marvel of portability, back when there were a couple of dozen competing platforms. It allowed Infocom to use the same Z-code data for all of their games, with just the Z-code interpretor being platform-specific. It's not unlike Java.
The code in the repository that MS provided is mostly in Zork Implementation Language (ZIL), which is compiled to Z-code.
There are modern Z-code compilers (most notably ZILF, which can theoretically work with the ZIL files in the repository, and Inform, which compiles its own more modern language to z-code).
Awesan@reddit
Implementing a Z-Machine is a fun project that can really stretch you as a programmer if you have not done something like that before. I remember reading Eric Lippert's series on the topic and being very inspired by it.
Dustin-@reddit
Well I know what I'm doing over winter break.
tligger@reddit
Same, this looks lit
dangerbird2@reddit
It was really common back in the early home computer era to write virtual machines for adventure games. It had the dual benefit of letting developers write code in a slightly higher level language than assembler, while being massively easier to port across the huge variety of architectures before IBM PC's became dominant
Other famous examples are SCUMM and Adventure Game Interpreter
vytah@reddit
There was also another benefit: much better code density. Especially important in that era.
slacka123@reddit
Does the Z-machine have a list of correct actions? If so, I'm surprised no one has used Kimi K2 or Llama 3.2 to humanize the input processing of these classic games.
One of the most frustrating parts of playing these games as a kid was when I found out that I was typing the right command but wasn't writing in the exact correct wording.
vytah@reddit
Z-machine itself is language-agnostic. It's all up to the game. The game decides what kinds of words and sentences it accepts. There are only few caveats:
text encoding issues – the Z-machine was designed with English alphabet in mind, later it got support for Western European languages, and only after the community took over, Unicode support
the built-in parser needs spaces between words (but the game can parse text manually if it wants to though)
Modern games using the standard Inform library are relatively smart, and they come with built-in help that usually dispels most doubts.
phalp@reddit
Kind of like an aimbot for adventures
ArdiMaster@reddit
No. The Z-Machine/ the interpreter is aware of the list of valid input words (called the dictionary) and the object tree, but which words refer to which objects and wha actions are valid in any given context is defined by the game’s code.
Stiltskin@reddit
Inform 7 is also one of the most fascinating programming languages I've ever seen. Its code reads much more like prose than something else.
Like, look at this section of code from a game by Emily Short:
All of this except the stuff in square brackets is executable code.
tadrith@reddit
Sometimes, I don't know how someone can look at where we started, and where we are, and not be completely amazed. I was born in '81, so after the real "start" of computing, but I remember playing on a Tandy 1000 computer... it's mind blowing how far we've come.
Not only that, how much of the incredible progress we've made is just accepted by the rest of humanity. It's mundane at this point to most people.
eflat123@reddit
It's also amazing how fast we adapt, get used to something new, and then want more.
ArdiMaster@reddit
Worth noting that there are now two Inform systems:
Both can compile to two different formats nowadays (the Z-machine, as well as a more modern VM called Glulx). While Inform 6 targets the Z-machine as default, Inform 7/10 is really designed more for Glulx because it has so much stuff built-in that you’d quickly run up against the limitations of the 16-bit Z-machine.
sreguera@reddit
In some sense I find more interesting the low tech, cassette-tape compatible technology that started with Scott Adams and reappeared in the UK with systems like The Quill, it's successor the PAWS and its rival the GAC.
finnw@reddit
How did Microsoft come to own this code?
church-rosser@reddit
There's something deeply evil about MS owning the source to Zork... makes my GenX soul hurt.
Plabbi@reddit
but this very announcement is about them open source'ing it...
church-rosser@reddit
Open Sourcing doesn't subsume ownership. MS still owns the source code.
vytah@reddit
You can play it, you can modify it, you can put as a minigame in your game and publish it on Steam if you wish. All they want is for you to keep that copyright notice, and not sue them if you get traumatised by grue or something.
MIT license is very liberal for the user
church-rosser@reddit
Still says they retain copyrights.
meneldal2@reddit
I doubt it was high up on the list of priorities after the acquisition
FlyingRhenquest@reddit
It's about as free as you can get while still retaining copyright of it. Microsoft is a huge beneficiary of the BSD license, which is similar, having gotten the TCP/IP stack for their early versions of windows from BSD-licensed code. It's nice to see them make an early piece of computing history available under a similar license.
church-rosser@reddit
Yay Microsoft.
Plabbi@reddit
but this doesn't strike me as "deeply evil" gesture.
church-rosser@reddit
Fine. Doesn't change that MS's ownership of Zork is wrong on so many levels as to equate with 'evil'.
Cizeta8088@reddit
Activision bought Infocom in 1986, Microsoft bought Activision in 2023.
AngheloAlf@reddit
"Zork" sounds like the name of an evil villain monster from an 80s/90s anime
balthisar@reddit
There's Zorg, 1997 (The Fifth Element).
MaxChaplin@reddit
Also Zurg and Zerg. Xorg is also a villain to some.
meneldal2@reddit
Or Borg
balthisar@reddit
…because it's hard to configure compared to Wayland?
Witty-Play9499@reddit (OP)
Well the game is from the 1980s so your intuition is not leading you astray :)
phylter99@reddit
1977, so you're close
https://en.wikipedia.org/wiki/Zork
Witty-Play9499@reddit (OP)
I think yours is Zork ? The ones released by MS(I, II and III) are from the 80s I think>
phylter99@reddit
The name came from the original and that's what we were discussing, really. The time frame is so small it doesn't really matter. I was commenting more in agreement with you than anything.
The weird naming of things carried over from the 70's into the 80's. It just seems like people wanted names that sounded otherworldly. It may go back into the 60's too, but I've not been around that long.
redbarone@reddit
Ha. The difference in five years at that time was remarkable. Even AI coming on the scene these days doesn't compare to the changes happening back then.
phylter99@reddit
There were a lot of new things coming out and such, but culture built off older things usually. The weird alien sound naming had just started in the 70’s from what I can find and it continued until the 90’s where it started dying out. We still see it pop up occasionally.
It seems that Zork is something that was from MIT and for them meant nothing like the term thingamajig.
mpyne@reddit
Yes, but they are ports of the original Zork game released in 1977.
When Nintendo released Super Mario All Stars in 1992 or whatever, that didn't make Super Mario Bros. 3 a 1990s game, it was still an 80s game.
adaminc@reddit
I only ever played Return to Zork. Never finished it though. I think you can get it on GOG though.
Want some rye? Course you do! pouring sounds
venuswasaflytrap@reddit
Yeah, it's easy to get stuck, there's a couple tricky bits
mrbaggins@reddit
Pick up a rat. Die of plague. PEAK GAMEPLAY.
green_meklar@reddit
Although I never finished it myself, I watched someone else finish it back in the day. There are some really counterintuitive parts where you can get stuck for a long time before noticing just the right combination of items and clickable objects.
arvidsem@reddit
This is me every single time that I've poured someone a drink in my life.
WarEagleGo@reddit
great news
:)
hoijarvi@reddit
I played "Adventure" before this, but then studying took too much time. My friends liked it.
r0llingthund3r@reddit
Fond memories of playing this on the COD Black Ops 1 terminal
psychometrixo@reddit
I thought that code was eaten by a grue