Tuesday, June 11, 2019

Notes on recent games: big narrative

Observation

You are the system AI of an LEO space station which has just gone wrong. The surviving astronaut reboots you. Fix the problems.
This feels rather old-fashioned, for a couple of reasons. Narratively, you're on rails; Emma gives you tasks and you carry them out. You have enough leeway to hunt around the station and collect notes -- journals and logs in a very classic environmental-storytelling mode. But the next task is always clear. Your only real narrative choices are how exhaustively you want to hunt journals.
As for the mechanics, the basic navigation model is simple. You can switch cameras in each space station module, and switch to new modules as they come online. You can connect to any station device visible on camera; you can report anything you see to Emma. Later, you get to steer a floating drone. Pretty much everything else you do in the game is a matter of "connect to a device, figure out its controls, do what Emma asks." Or "Figure out its controls, see a problem, report it." You wind up using most devices twice or more, so you get the sense of learning a toolkit, but it doesn't really have systematic mechanics that build on each other.
So that makes Observation sound pretty dishwater, doesn't it? But the game works really well! It's a series of crises -- as you would expect from a barely-functional space station -- and the sense of urgency carries you right on through all the mini-quests and button games. All of which are fun. They may not have a deep narrative or mechanical basis, but you feel good when you get something right and Emma gasps in relief. Reporting a problem may be a matter of selecting a trouble spot and pushing a button, but Emma seizes on your intel and advances the plot, and there's your sense of agency.
Furthermore, being on rails fits your narrative role. You are, after all, only a computer. Your NPC partner is doing the real work of fixing the station. You're taking care of all the background mechanical stuff that Emma either can't reach or can't spare the time for. You've always got a job to so. It's a simple trick, but as I say, it works really well.
If I have a real complaint, it's that the puzzles involve too much searching around with the slow-and-grindy camera controls. When I got stuck, it was always because I'd failed to find one critical switch or sticky note. The only way to advance was to keep panning around. It's a dense environment, but it's mostly space-station clutter; it's not that much fun to explore.
(A couple of scenes move outside the station, and the view is stunning -- but it's also a much larger environment and it's really easy to get lost.)
So I can't say that Observation pushes any boundaries. But everything it does is so engaging and nicely constructed that I don't care. It's a terrific experience. Recommended.

Close to the Sun

It is impossible to talk about this game without mentioning Bioshock. On the one hand, that's a problem. On the other hand, it's an easy problem to ignore. Monumental Art Deco follies are awesome; we've played in them before Bioshock; why not play in some more?
Plus, the pitch is "Bioshock without zombies", which gets me up out of my chair dancing. I didn't mind the combat in Bioshock; it's a gun game. But that wasn't what interested me. I was there for the environments, narrative, and puzzles. Close to the Sun is all those minus the gun. Great!
Well, pretty good. I mean, it's fine. I mean...
For a start, it doesn't seem to have much to say. Bioshock starts with a thinly-veiled Ayn Rand declaiming the glories of personal liberty; and the game was about free will and liberty. CttS gives us an alt-history Nikola Tesla declaiming the glories of pure scientific genius, and somehow it comes to exactly the same thing. You have giant gilt rooms inhabited by extremely rich people. This Tesla is an extremely rich power magnate, hounded by resentful Edison terrorists -- which is a nice bit. But there's no take here. Except for portraying Tesla as kind of a clueless lunatic, which comes off as watered-down reality and a watered-down Cave Johnson, both at the same time.
The story involves running around the dead ship looking for your sister-the-scientist. There's the expected sisterly banter on the radio, plus Tesla diatribes and a few other characters. The characters never really came to life, though. At least as far as I got.
For all my gripes, it's a perfectly playable game with kickass visual environments. Some kind of time-fracture story is building up, which has potential. I'm perfectly willing to play through such a game. However -- I didn't finish CttS. At a certain point you get chased by a lunatic with a knife. (The Whitechapel killer, of all the really-not-Art Deco figures.) You have to run away or get messily stabbed. I tried running away six or eight times. Five times in a row, I tripped over a low barrier because the "vault" button refused to work. Then I gave up.
I wanted to like CttS more, but there just didn't seem to be much meat on the bones. Observation did more, quicker, with less dialogue.

Zed

And now, the awkward bit where I like a game, I recommend a game, but everything I have to say about the game is negative.
First, unsetting the expectations. When Zed launched its Kickstarter in 2016, it billed itself as a puzzle adventure. The pitch invoked Myst early and often. (Underscoring that, Zed wound up being published by Cyan.) But development is hell, as we know, and the final release has evolved into something a lot more Gone Home than Myst.
That's fine, as long as you don't walk in jonesing for puzzles. Walking sims are great. My complaint is that Zed spends much of its (short) length walking through well-trodden territory. It's a symbolic exploration (check) of someone's life (check) laden with loss, regret, and nostalgia (check) and affairs with hot young grad students. No, wait, that last bit is a different genre. This one is an artist being screwed over by Hollywood.
And the play consists of finding symbolic objects that trigger memories. Find all four in a scene and you can go on to the next. Repeat until sentimental ending symbolic of new beginnings.
None this is bad, but we've seen it before. A lot. Even more so on the psychological-horror side of the walking-sim fence. Zed doesn't go the horror route, but the techniques are still familiar.
In theory, Zed explores the life of an artist suffering from dementia. I say "in theory" because that aspect seems barely present in the narrative, and not at all in the gameplay. I have not lived through the hell of a parent or loved one falling into dementia, but I have friends who have. They talk about progressive inevitable loss: loss of memory, loss of ability, loss of the person they once knew. Every remnant you find is a tiny miracle -- and crushing, because it's got an expiration date.
Zed isn't about loss. It's about memory, yes, but your experience is the opposite of loss: you build someone's complete life. Everything you find is crystal-clear. Winning means finding it all.
Okay, this is a hard problem. I'm not saying Zed had to tackle the experience of loss this way. But it feels like a missed opportunity that it didn't even try.
(The obvious comparison is Stephen Granade's Twine game Will Not Let Me Go, but I'm embarrassed to say that I've never played through it. It's the right comparison anyhow.)
Okay, enough negatives. Zed is a visual treat -- large, striking, vivid environments, wildly varied and each appropriate to its theme. If you are a VR enthusiast, I'm sure you will enjoy wanding through them as much as I enjoyed the old-fashioned flatscreen experience. The voice acting is lively and convincing. It avoids the cliche of walking-sim monologue narration while still staying focused on the protagonist's voice; a good trick.
And the story pulls together solidly at the end. It's a genuine and moving conclusion.
And I've still spend four times as long complaining about Zed as I've spent praising it. It's good, you should play it. I just wish there was more for me to buy into, rather than just to watch.

Outer Wilds

(Not "Outer Worlds", an unrelated and as-yet-unreleased game.)
I haven't finished Outer Wilds. I'm still working on it. I'm not going to write much, because it's not the game I thought it was when I started. And it's not the game I thought it was half an hour later, when the (SPOILER) started. So I'm probably still wrong about what game it is.
But it is 100% adorable, with banjos, marshmallow roasts, and spaceflight among St-Exupery-sized planets. It's also deeply nerdy. And it's, I'm pretty sure it is, no I'm sure, it's incredibly clever.
Play this one. Don't wait for me to talk more about it.

Monday, June 10, 2019

Notes on recent games: nifty little experiments

Fugue in Void

Expectations count. When you fire this up, it opens with a langorously slow zoom into an abstract monochrome worldscape. I stared at it. I wiggled the joystick. I went and got a glass of water. It was still zooming. It was pretty, but, like, was the game broken? I killed the process.
Then I looked back at the Steam page, which says: "The game starts with a 10 minute intro." Geez, if I'd known that... To be clear, this is my fault for projecting my expectations onto the work. I should have been willing to say "What is happening is the thing that is happening" and then settle back to watch.
Anyhow. This work will make more sense if you view it as coming from the demoscene rather than the indie game world. (I have no idea if the creator knows this.) The noninteractive opening would be at home in any demoparty. The body of the work has the mode of a walking sim (with slivers of game trope) (pressure plates open doors), but it remains a piece about visual experience rather than world interaction. Specifically, a world of overwhelming concrete architecture, abstract sculpture, and blown-out visual contrast. The style has turned up before (e.g. NaissanceE) but I enjoyed being able to take it in without annoying platforming goals.

Mountain

Not a recent game, of course. I picked up the iOS version this month for no particular reason.
The followup Everything rather eclipsed Mountain, because Everything is larger (by definition!) and also has structure to make a gaming audience feel at home. But Mountain offers as much charm for its size. I have never before said "Why, yes, I do sometimes feel like a mountain floating in the void, trying to serenely meditate on the universe, and then a washing machine or a stapler or something flies out of the void and sticks to me, you know what I mean?" But now that you ask, the answer is yes, I do. It's a remarkably cogent question considering that the game asks it nonverbally. And it's reassuring to consider that the stapler will quietly decay. Someday it will be gone, even as more objective noise flies out of the void towards me.
I left the game running for a while, and when I came back, the mountain was gone. Now I've started over, and I have to keep the tablet nearby and take a look now and then. Well played. Hey, look, there's cake.

Alt-Frequencies

A game about radio stations with a genuinely awesome interface gimmick. You listen to broadcaster audio tracks in real time, flipping channels at will. Your only mode of interaction is to record a clip from one station and then play it as a "listener call-in" to another station. This gives you a broad range of action without the awful pit-traps of free text or speech input. Nice clear authoring model, too. And fully voiced for both game outputs and player "inputs"!
To keep the script under control, it's a time-loop game; you get three minutes on every channel and then the world resets. The writers decided to make the story about the time loop -- a natural (perhaps inevitable) interplay of form and content.
The problem is, there's no room to set up an actual conflict here. It's a vague "public debate about the time loop". Newscasters say politicians are for and against it, talk-radio hosts discuss dissent, pop DJs mention the upcoming vote. Conspiracy jocks insinuate that the loop has already started (which of course it has). But there's no actual debate. It's an unsubtle Brexit riff, but Brexit shorn of racism, nationalism, health care, banking, and the Irish border -- i.e., nothing about Brexit at all, nor any other current issue.
So it's fluff, yes, but by the same token it's broadly-drawn and a lot of fun to listen to. The voice talent are all having a great time. It's an easy play-through; very short overall, and the script gives you plenty of nudges about what you should be doing. Very much worth a run just to see how the gimmick plays.
(Big bonus points for supporting accessibility for visually impaired players.)

Sunday, June 9, 2019

A more complete collection of Infocom sources and game files

A followup to my discussion of the Infocom source release a couple of months ago...
I've just spent a couple of weeks gathering up every version of the source code and the game files that I could find. Jason's GitHub collections are excellent, but they are an edited extract from one source: the so-called "Infocom Drive". They omit some published variations, beta-tests, and so on.
For years, the IF Archive has had another collection of Infocom game files (though not source code): the patches collection. But these were in an annoying encoded format, in order to dodge the legal problems with archiving commercial games.
I figure that those legal problems are well out the barn door now. It's time to have every Infocom game file variation in one place, indexed and easy to download. So here they are:
I've tagged everything with the release number and serial number, where known. Plus tags for whatever other info we've got: "alpha", "beta", "mac", etc.
Research and enjoy!

Thursday, May 23, 2019

Heaven's Vault: design ruminations

I've played through Heaven's Vault twice now.
At the end of the first run, I had this distinct thought which I had never put into words before. I wrote:
What's the word for when you finish a story, and now you can really start to discover the story? Because, on the second run, the boundaries and spaces of what you can do will be distinguishable from "what I just did". It's this feeling of "I've seen the covers, now I can open the book."
Jon Ingold immediately shot back "archeology", which was on target, but not really the answer. If you are interested in games, you read a game for its interactive structure. That's distinct from reading the story. But in a well-designed game, the interactive structure is part of the story. Or vice versa. They support each other. That's the idea I was trying to get at: the story can't have its full impact until you understand the game mechanics, and you can't fully understand the mechanics until you've run through the story a few times and kicked the boundaries.
This is true of all games; you always think about how else your session might have gone. But it's not always such a present truth! Many games make their boundaries pretty clear on the first run-through. You've already felt your way around the walls, you might say, in the course of making your way to the exit.
I'm not describing games that we think of "linear" vs "nonlinear" (those weakest of game descriptors). When I played through Night in the Woods, I spent my story time talking to Bea. I could have hung out with Gregg instead, and it's clear that would have led to a different story. But I also had a good sense of how it would be different. I might yet replay the game to see those Gregg conversations, and to see any of a number of other story variations. I wouldn't expect to it to be a different game.
Finishing Heaven's Vault was very different! I had the overwhelming sense that I didn't know what kind of game it was yet. I didn't know which of my choices were vital; I didn't even know which of my actions had been choices. And so I started the game over. (Not immediately, but after a break of a couple weeks.)

As it happens, my second HV run-through felt quite similar to my first.
I don't meant it was a disappointment! For one thing, I had a much stronger grasp of the alien language. (The game allows you to keep your translation dictionary across runs. This is a well-chosen, if unsubtle, enticement for those odd people who don't get obsessed with game design questions at the end of round one...)
I don't even mean that the story played out the same way the second time. I visited locations in a different order. I explored many of those locations from different angles. I made a couple of brand-new (-to-me) discoveries. And, to tick the most obvious box, I chose a different "final ending" and changed the fate of the Nebula.
On the other hand: I visited all the same locations, and met all the same people (minus one extra, plus one surprise). I was heading to the same final destination all the time. In broad arc, I was playing the same game. Only every single detail was different, or potentially different.
In some sense Heaven's Vault telegraphs this. It's told in flashback, after all! The first scene you see is the final chapter: under the eye of a watchful god, you and your robot discover a sealed vault.
So you know that this is your final destination. Every possible variation of the story will lead there. You know that you will arrive with the robot. No story branch can end with your death, or the robot's disappearance or destruction. The game has to be about ordering and details.
(But I didn't think about that until the second run-through...)
What the game does best is care about these details, these large-or-tiny variations. You see this most clearly when you fire up a game-in-progress. It opens with a text summary -- a rundown of what you've done so far. Every reviewer praises this feature, but it's not easy to explain how stunningly smooth this summary is. It's not just a bullet-point list of everything you've done. That would be excruciating and unboundedly long.
No, what HV gives you is the story so far. It's the high points; no more than five lines, and they have arc. "You are searching for X, but you've also found Y, which has put you on the trail of Z." Cause and effect. The distinction between "and" and "but".
Furthermore, everything is described in terms of what you know. A location might be "an undiscovered Holy Empire site" or "a Holy Empire garden" or "a Holy Empire mausoleum", depending on whether you've explored it, what you've found, and what you've deduced. One site wound up with completely different descriptors in my first and second run-throughs, because the protagonist discovered slightly different evidence and then came to entirely different conclusions about what had occurred there.
This application of your game history is not just for the opening summaries, by the way. It extends through the entire design. Everything is described in terms of your present knowledge: map labels, navigation choices, references in dialogue. When you leave a site, your character reflects (out loud) on what she's done there and what she might do next. When you arrive in a familiar location, such as your university, she might comment on the tasks she expects to do there -- but only later in the game, when you've built up habits!
It's all powered by the same history-tracking engine, which stores and contextualizes everything from the broad arc of play to the moment-by-moment arc of a conversation. I mentioned the difference between "and" and "but"? You can see this when you're working through one of the linguistic challenges. "This word is right, and this other word is also right." Or: "This word is right, but this other word is wrong." To generate those sentences, HV needs to track successes and failures within the challenge. And the same, at macro scale, for the entire game.

I said my two run-throughs were similar. In some ways I tried to make them as different as possible. I looked at location X before location Y, instead of after. I took different tacks when overcoming certain difficulties. I drank heavily instead of abstaining in the bar.
But I didn't alter my basic approach to play. I was methodical, as I am in most games. I tried to search every location thoroughly, find every artifact, and read every inscription before I left. So it is not surprising that I found the same locations and made most of the same basic discoveries. It was all of the locations, so it was the same list! If I'd taken a hastier and more headstrong tack, I would have had a very different gameplay experience. A journey to the same ending, but with more gaps; no doubt filled by guesswork, perhaps with a very different final perception of how the world had gotten there.
(Less correct, you say? Based on less data, to be sure. But this is archeology: always guesswork in the end. There are always gaps. We'll never know the complete history of the Nebula, no matter how many times we play or how many wiki pages we fill.)
Nonetheless: two play-throughs, even two thorough play-throughs, are two different experiences. And it was striking (the second time!) how many differences derived from small changes of my focus or small differences in timing.
On one moon, I poked around exploring while the robot examined a device. Then, feeling done, I decided to leave. That was in the first run-through. Second run-through: I poked around exploring for a few minutes longer. Hey, says the robot of a sudden, just noticed something about the device! Which led to a question, which led to a conversation, which led to another trip, which led to a revelation that I'd had no clue about in my first session.
This revelation was one of the high dramatic moments of the session. Everything that followed was cast in the new terms that I had discovered. It was what the story was about, at least in part. And yet this moment was so easy to miss! In the first session, I blew right past it; I never knew there was anything to miss.
It wasn't even a choice, from my point of view. The game never presented a menu selection between "explore the moon for eight minutes" vs "explore the moon for ten minutes". It was just a thing I happened to do. And there were several more choices I had to make in order to stumble across this particular plot thread. I happened to ask person X about the robot's discovery, and then suggest plan Y...
If you frame this HV story line as a puzzle, a challenge for the player with story as the reward -- it's a blatantly unfair puzzle. Frame it as an achievement and it's even worse. "Stand here for N minutes, doing nothing, with no feedback"; players reach for their pitchforks.
HV has a few scenes with traditional adventure-game puzzles -- but only a few. To frame it as a puzzle game is just a mistake. You really have to view the game as a big bag of things the player might do. Some of these require patience and methodical search. Some require fiddling with mechanical controls and platforms. Some require treating NPCs in certain ways, or not treating them in other ways. Most require some combination of circumstances which you can't reasonably plan for, in your first game session or any other.
But if any given goal is so "unfairly difficult" to achieve, why play? Because the game isn't about all the stuff that you fail to notice. It's about the one thing you do notice. There's such a density of goals that you are very likely to achieve some of them. Whatever revelation or dramatic moment you reach -- that's what the story is about! ...For you; in that session; do you see? The history-tracking engine is able to seamlessly describe your particular discovery as the arc of the story.
That is to say: you're going to do something, indeed, a great number of things. You'll do the things that suit you as a player: exploring, or searching, or puzzling, waiting, negotiating, flirting. Something. And you'll find some astonishing secret. And whatever you find will be a reward for whatever you did.
This is hard to describe, isn't it? It sounds like a tautology when I say it. And yet I've never seen it done like this.
I grew up with puzzle-fest adventure games. Games that challenge you to do every single thing, and unlock the ending when you do it. Or to make a choice, and unlock the one ending (out of several) which is determined by that choice. Then we had the choice-based style and visual novels, which had branching structure all the way through. Lots of explicit choices, with implicit consequences, and variations of each chapter as you progressed.
More recently, we have the heap-of-side-quests game, like Sunless Skies or Inkle's previous hit 80 Days. In those games, you find a grab-bag of parallel micro-stories in a large universe. As in HV, the micro-stories you find follow what you happen to do; you have no hope of discovering or experiencing them all.
But HV goes beyond that bag-of-quests format. The story threads don't spread out into a haze of disparate starbursts. Every thread is part of the story of the Nebula; they all work towards that final chapter in the vault. And any handful of them make a story. I won't say they're all equally satisfying, but they all feel like plausible middles to that ending. There, that's my tag-line for the game. Forget multiple endings; we've entered the era of games with multiple middles.

Speaking of endings, this blog post probably ought to have one.
You understand that I am, necessarily, talking out my ear. I claim that the real value of Heaven's Vault is all the stories that I've never seen -- that I can't even tell where I missed seeing them. I've only played it twice! How could I even know?
Well, I recall Jon Ingold commenting that nobody can see more than 30% of the game content in a run-through. I know, it's cheating to believe what the designer says, but it fits with my experience. As I said, I've seen a couple of major revelations. I've also seen a few mysteries that I tried to plumb and couldn't. In my sessions, they were mysteries of the past, the lost foundations on which the story rests. But I have no doubt that some path leads down there.
Beyond that, I trust in probability. If I found a couple of treasures by unlikely chance, how many are there to find?

Wednesday, April 17, 2019

What is ZIL anyway?

The Infocom ZIL code dump has kicked off a small whirlwind of news articles and blog posts. A lot of them are somewhat hazy on what ZIL is, and how it relates to MDL, Lisp, Z-code, Inform, and the rest of the Golden-Age IF ecosystem.
So I'm going to talk a lot about it! With examples. But let's go through in chronological order.
The first version of Zork was MDL Zork. This is what Tim Anderson, Marc Blank, Bruce Daniels, and Dave Lebling wrote as MIT hackers around 1977 to 1979. MDL, the MIT Design Language, was a Lisp-like functional language created at MIT. MDL ran on the PDP-10, so that's where this ur-Zork ran.
Zork was ported to Fortran by Bob Supnik in 1980, and then to C. These versions, generally known as "mainframe Zork" (or "Dungeon") circulated among DEC user groups, wasted years of mainframe user time, and -- along with "mainframe Colossal Cave" -- changed the lives of many. (Including me, age 9 or so.)
At the same time, those MIT hackers formed a company and set out to... well, to make business software, if you look at those early plans. But they figured they'd first make a quick buck by porting Zork to home computers. However, MDL programs couldn't possibly run on an Apple 2 or a TRS-80. So the Infocom folks sat down and designed the Z-machine.
I'm not going to go through this story in depth. For that, I recommend Jimmy Maher's overview at the Digital Antiquarian. Here's the quickie: Infocom would write a game in ZIL, or "Zork Implementation Language" -- a high-level language derived from MDL. A compiler called ZILCH would then compile the game into a binary format.
The binary format, Z-code, was a program for an imaginary computer called the Z-machine. (Today we would say "virtual machine".) Nobody intended to build a Z-machine. But they could write a program that emulated the Z-machine. This program, called ZIP, was compact enough to run on a 16-bit home computer. So Infocom could distribute ZIP and the Z-code file on a floppy disk (or cassette tape!) and thus sell a playable game.
ZIL is not a mystery. We haven't had a lot of ZIL code available before this week. But someone scanned an Infocom ZIL manual years ago. You can read that manual here. (It's dated 1989, and primarily written by Steve Meretzky -- "SEM".)
But what kind of language is ZIL?
Above I said it was "derived from MDL". This is no surprise; the Infocom people wanted to reuse as much of MDL Zork as possible in their new commercial product. The resemblance is obvious, and indeed some of ZIL Zork was nearly identical to MDL Zork. Here's a function from the combat implementation in MDL Zork:
<DEFINE VILLAIN-STRENGTH (VILLAIN
                      "AUX"  (OD <OSTRENGTH .VILLAIN>) WV)
    #DECL ((VILLAIN) OBJECT (WV) <OR FALSE VECTOR>
           (OD VALUE) FIX)
    <COND (<G=? .OD 0>
           <COND (<AND <==? .VILLAIN <SFIND-OBJ "THIEF">>
                       ,THIEF-ENGROSSED!-FLAG>
                  <SET OD <MIN .OD 2>>
                  <SETG THIEF-ENGROSSED!-FLAG <>>)>
           <COND (<AND <NOT <EMPTY? <PRSI>>>
                       <TRNN <PRSI> ,WEAPONBIT>
                       <SET WV <MEMQ .VILLAIN ,BEST-WEAPONS>>
                       <==? <2 .WV> <PRSI>>>
                  <SET OD <MAX 1 <- .OD <3 .WV>>>>)>)>
    .OD>
And here's the same code from the ZIL version:
<ROUTINE VILLAIN-STRENGTH (OO
                       "AUX" (VILLAIN <GET .OO ,V-VILLAIN>)
                       OD TMP)
     <SET OD <GETP .VILLAIN ,P?STRENGTH>>
     <COND (<NOT <L? .OD 0>>
            <COND (<AND <EQUAL? .VILLAIN ,THIEF> ,THIEF-ENGROSSED>
                   <COND (<G? .OD 2> <SET OD 2>)>
                   <SETG THIEF-ENGROSSED <>>)>
            <COND (<AND ,PRSI
                        <FSET? ,PRSI ,WEAPONBIT>
                        <EQUAL? <GET .OO ,V-BEST> ,PRSI>>
                   <SET TMP <- .OD <GET .OO ,V-BEST-ADV>>>
                   <COND (<L? .TMP 1> <SET TMP 1>)>
                   <SET OD .TMP>)>)>
     .OD>
Pretty similar, right? But under the surface, rather different things are going on.
MDL is a functional language in the Lisp vein. Pretty much everything boils down to linked lists. Executing a program means freely constructing and throwing away lists, so there must be a garbage collector behind the scenes. The MDL compiler does what it can to eliminate memory allocation; efficient MDL code might be compiled to static machine code. But if the compiler can't do that, you wind up allocating stuff on the heap.
But the Z-machine doesn't have a garbage collector. It has no primitive operations for constructing lists or allocating objects. There are no Z-machine instructions for finding the head and tail of a list. (The famous car and cdr primitives of Lisp, called 1 and REST in MDL. The Z-machine don't have 'em.)
(You may know that I wrote a small Lisp interpreter for the Z-machine. It was fun, but the Z-machine gave me no help at all! I had to build the Lisp heap and list data structures myself, out of primitive Z-machine byte arrays. Same with the garbage collector. It's all terribly inefficient and janky.)
So how does ZIL perform these operations? Answer: it doesn't! As far as I can tell, the ZIL Zork code doesn't use Lisp-style (linked) lists at all. The 1, NTH, and REST functions appear only rarely, and I believe they always apply to static strings or arrays. MAPF, a basic Lisp tool which transforms one list into another, doesn't appear at all.
In contrast, the MDL source is filled with 1, NTH, REST, MAPF, and other functional-language constructs.
So in one sense, ZIL is a completely different language from MDL. It's a C-like compiled language which operates entirely on fixed data structures. But in another sense, as you can see from the examples above, they're almost identical! How does this make sense?
My answer is that game logic is a fairly narrow sort of programming. The combat example sets some local variables and looks up some object properties (fixed data structures!). It compares numbers; it compares variables to objects. And there's a bunch of "if" statements with "and"s and "or"s. Familiar, right? There are dozens of ad-hoc game scripting languages with similar features. You don't use a language like that to solve graph-theory problems, much less build a compiler.
(The Ancient Terror puzzle in Enchanter does involve some graph theory, but this is implemented with some rather clunky nested loops. Not a Lisp-y solution at all.)
It's not that functional methodology is impossible in ZIL. The language clearly imports as much of MDL's functional model as it can. It's just that this isn't very much. ZIL has about as much of MDL as can be compiled into static (non-allocating) code. Which makes sense -- that's exactly what the ZILCH compiler did.
To bring the story up to the present... In 1993, Graham Nelson released Inform. This language (and compiler) had exactly the same goal as ZIL: to efficiently compile source code into Z-machine files. Graham didn't have access to any information about ZIL at that point, so he just made up his own language, which was mostly like C because that's what he was familiar with.
(Of course C itself was designed to run efficiently on fixed data structures. So Graham had an easier job, in some sense. Not to take anything away from his accomplishment!)
Inform (up through version 6) became the cornerstone of the Z-machine ecosystem. But the Z-machine had some hard limits; it had been designed for 16-bit microcomputers and could not easily be expanded. So by 1997 there was a clear need for a new virtual machine. This is where I come into the picture. I designed Glulx as a replacement VM.
Amusingly (or ironically, or inevitably), Glulx had one core goal: to efficiently compile Inform 6 code to a new virtual machine. Every line of I6 code had to work essentially the same as it had before. Glulx used 32-bit values instead of 16-bit values, and I reorganized the memory layout and the instruction table. But the core data structures looked very much like those of the Z-machine.
As a result, it should be possible to compile ZIL to Glulx! I don't think anybody's done it. But Glulx was shaped by I6, I6 was shaped by the Z-machine, and the Z-machine and ZIL were shaped by each other. The chain of influence extends all the way from Joel Berez's coffee table to mine.
Inform 6 was followed by Inform 7, a completely new language which compiles to Inform 6 source code. At least for now. Future versions may compile to a new abstraction. But that's a story for another time.
Footnote: my conclusions about ZIL have to be qualified: I could be wrong. I don't know ZIL or MDL, really. I have an MDL programming guide open as I write this...

EDIT-ADD:
Given the MDL and ZIL code examples above, I thought it was worth adding the Inform 6 equivalent. This is from Allen Garvin's hand-polished I6 port of the ZIL code.
[ VillainStrength oo villain od tmp ;
    villain = oo-->0;
    od = villain.strength;
    if (od >= 0) {
        if (villain == thief && Thief_engrossed) {
            if (od > 2) {
                od = 2;
            }
            Thief_engrossed = false;
        }
        if (second && second has weapon && oo-->1 == second) {
            tmp = od - oo-->2;
            if (tmp < 1) {
                tmp = 1;
            }
            od = tmp;
        }
    }
    return od;
];
If you check, this is line-by-line equivalent to the ZIL version above. But it's much more readable to modern eyes, isn't it?
To some degree, this is just because I6 is part of the C-derived family of languages. (I'm told that "Algol family" is a better term, but I've never touched Algol.) This includes C, C++, C#, Javascript, Perl, Swift... very different languages, but they all share the basic assumption that if (X) print(Y) is a sensible way to write code. A programmer these days might never have used any other kind of language.
I6 follows C very closely, in this example. The only quirks are:
  • the --> operator (for arrays, where C would have oo[0], oo[1], oo[2]);
  • the has operator (for testing object flags; in ZIL this was FSET?);
  • defining functions in square brackets, which is idiosyncratic.
Everything else is expressed in ways that look completely natural. Mind you, the lower-case text helps a lot. But we're very used to code where identifiers are text, operators are (mostly) punctuation, and one line of code is conventionally one abstract step of procedure.
In 1979, for people brought up on Lisp, MDL probably wasn't as strange. No doubt they would say that it's much simpler to put the operator at the beginning of every call (<SET OD .TMP> rather than od = tmp;). Test operators always end with ?, whereas in the I6 code you have to look for an if to figure out whether you're performing a test. The difference between period and comma as atom prefixes is no doubt a concise way to express something (which I haven't bothered to look up what it is). And so on.
I still think the lower-case code is easier on the eyes, but hey.

EDIT-ADD 2: Tim Anderson has kindly sent along a lot of details about MDL -- or Muddle, as I should be calling it. I include his comments verbatim below.
A few comments on Muddle, ZIL, and their friends:
Although the original PDP-10 Zork was written in Muddle, it was, unintentionally, much closer to ZIL (which didn't exist yet, obviously) than it had to be. There were a few reasons for this:
  • Lisp-ish languages were, by outsiders, thought to be inherently slow, so it was a point of pride to write code (and build a tool chain) that disproved this. (There was a benchmark done with some math-heavy computation where compiled Maclisp was faster than FORTRAN, on the same hardware.) A lot of things in the Zork code were there at least in part because of this.
  • The basic objects (rooms and so on) were not lists, they were vectors (or perhaps templates; the difference was slight)--each object was a block of contiguous memory, much like a C struct. Quicker access to the elements, smaller memory footprint, and--much closer to the data structures you'd find in C, or ZIL.
  • There was a lot of effort put into not provoking the garbage collector (No consing, please, this is Lisp!). The Muddle garbage collector, when it ran (there was a lot of innovation in garbage collection later, but this was 1977), just stopped processing for a while, made a clean, compact copy of the heap, replaced the old one with that, and let you continue. This could take several CPU seconds, which on a time-sharing system could turn into a really long long time--very bad for interactive game play. In addition: the machine being used had a 256K word address space, with 512K of physical memory, and was supporting 10, sometimes 20 users. Keeping the memory footprint down was a good way to keep your friends: as much as possible of the code was in read-only memory--allowing it to be shared between processes, and ensuring that there was a clean separation later on, in ZIL. And avoiding dynamic memory allocation reduced the really significant load produced by the garbage collector.
  • As Jesse mentions in the comment about macros, they provided full access to the Muddle interpreter at compile time, and were certainly used in the original Zork as well as later on. The only memory saving produced by compilation was the elimination of macro expansion at runtime (in Muddle, as in Lisp, a call to a macro would be evaluated twice: first to run the macro, which returned some freshly consed-up code, then to evaluate that; the compiler did the first step at compile time, then compiled the result). Muddle, like Lisp, had as its basic function EVAL, which ran the interpreter on a single piece of uncompiled code. Zork never called that--slow, prone to unexpected consing, and so on. So it didn't get in the way when moving to ZIL (or to FORTRAN); everything that was running in Zork was compiled, which limited the bad (inefficient, difficult to port) things that Muddle supported in the interpreter.
  • Each Muddle atom could have two values--a global, and a local (,FOO was syntactic sugar for <GVAL FOO>; .FOO, <LVAL FOO>). Locals, as with Lisp, had dynamic scope--in interpreted code, functions called from within an invocation of MYFUNC could access any locals bound within MYFUNC (assuming that no intervening function had another binding of them, of course). In compiled Muddle, though, local variables that needed to be accessed from outside the function itself had to be declared SPECIAL; any other locals ended up having, in effect, static scope within the body of the defining function. Zork used no specials: it made for faster, and, honestly, more understandable code. And also made it easier to port to statically-scoped languages.
  • The Muddle compiler acquired some intrinsics to allow direct (single machine instruction) access to the key parser output variables PRSA, PRSO, and PRSI. This was a different way of thinking about things, and again required a bit more discipline.
  • It was unnecessary to declare the type of anything in Muddle, but that would make the compiler's job much harder, and reduce performance. So pretty much every variable, and every field in the Zork objects, had a type declaration associated with it. Faster code, but also easier to port to a language without dynamic types.
  • MAPF (or its friend, MAPR--map First vs. map Rest) was probably used in Zork somewhere, but not in the most general form, where it constructed a new list; rather, it was an easy way to iterate over a list. In that form, it would be relatively easy, if it came to that (I don't think it did), for Zilch to do something sensible, or even to write a macro that would construct the iteration at compile time.
The virtual machine used for Cornerstone was quite a bit more powerful than the Z machine. There were a few reasons for that:
  • It was required. A nearly-relational database, with what passed for a GUI in those days, had need of a lot more functionality than a text adventure.
  • The minimal target hardware was something like a PC-AT (maybe an XT): hard drive, 640K of memory, etc. There was no need to run on an Apple II or a Commodore 64.
  • Infocom had a fair amount of experience with these things by then.
  • Not to be invidious, but the people building the tool chain for Cornerstone were better at that kind of development (years of experience, and it was their primary job--not true with ZIL, except for the people building the individual Z machine implementations) than those defining ZIL and the Z machine. They weren't as good at writing games, though, so it worked out.
(-- Tim Anderson)

Tuesday, April 16, 2019

All of Infocom's game source code

I can just leave that statement there, right? I don't have to elaborate? Jason describes it better than I could, anyhow:
So, Infocom source code is now uploaded to Github. Most people don't speak or want to speak the language it's written in, ZIL (Zork Implementation Language). You can browse through it and kind of suss out what's being done when and the choices made over the course of time.
In cases where the source code had multiple revisions, and I don't know the story of what revisions came when and came why, I did a reasonable job of layering them out (this came before that, that came after that) and doing multiple "check-ins" of the code so you can see diffs.
Often, there are cases that some games were built up from a previous game, allowing modification of the macros and structures and then making them work in the new game. For example, an NPC partygoer in one game was a thief in a previous one. Dungeons become stores, etc.
--@textfiles (Jason Scott), from a twitter thread
This material has been kicking around for a while now. If you search for articles about "the Infocom drive", you'll see some discussion from years past. Actually, don't do that, it's mostly old arguments that don't need to be rehashed.
The point is that a great deal of historical information about Infocom has been preserved -- but it's not publicly archived. You can't go research it anywhere. Nobody admits to having it, because it's "proprietary IP", and you're not supposed to trade in that stuff because companies like Activision make the rules.
So when Jason puts this information online, he's taking a stance. The stance is: history matters. Copyright is a balance between the rights of the owner to profit and the rights of the public to investigate, discuss, and increase the sphere of culture. Sometimes the balance needs a kick.
Quite possibly all these repositories will be served with takedown requests tomorrow. I'm downloading local copies for myself tonight, just in case.
One other note: Jason's comments say "...there is currently no known way to compile the source code in this repository into a final "Z-machine Interpreter Program" (ZIP) file." This is somewhat out of date. There are long-standing open-source efforts to build a ZIL compiler. ZILF is the most advanced one that I know of. I don't know whether it's rated to compile this historical ZIL code -- but I'm sure that people are already giving it a shot.

Tuesday, March 26, 2019

Firmament Kickstarter time

Cyan has just posted the Kickstarter page for their next game.

You may recall, or not, that they announced Firmament a year ago. They built a five-minute teaser / tutorial chapter, which they showed off at GDC. (The teaser isn't publicly available, but you can read my impressions.)

Then the whole project went into stasis as they worked on the Myst 25th anniversary package. But that's shipped now, and it's time for the next thing.

So what can we say about this? The first obvious point is that they're starting basically from where they left off a year ago. The Kickstarter video contains no game footage that I didn't see last March, either in the teaser or their announcement video. On the other hand, the target date is July 2020, which is going to be fast work. But, on the third hand, they said that the teaser took just two months to build, and it seemed to include most of the required technical work.

The Kickstarter goal is $1.285 million. It's a straight-up plan: release Firmament for Windows and VR platforms (Oculus and Vive). There are no stretch goals, which admirably simplifies the question. (The page hints that with enough funding, they might add Mac support. But there's no promises and no dollar figure on that.)

$1.285M is only fractionally higher than Obduction's goal ($1.1M). And we recall that Obduction ran into funding hassles; it required more cash than its KS provided, and the company had trouble attracting publisher funding. So Firmament's budget is an interesting question. The KS page talks about Cyan's "smaller, experienced team"; it sounds like they're aiming to do this on a leaner basis than their previous games. Whether this translates to a smaller game world, or a sparser visual environment, remains to be seen.

Less visual detail is a good bet, though. We recall that Obduction was a troublesome VR port. The original game was gorgeous on flatscreen machines, but it bogged down badly on VR hardware (which requires higher resolution and framerate). Cyan wound up simplifying the environment noticeably for the VR versions.

By everything they've said, Firmament will be designed for VR and then ported to the flatscreen environment. That avoids the trouble Obduction ran into, and presumably it lowers their modelling budget as well.

I probably don't have to tell you that I'm excited about this. I'm excited about this!

I've said before than I'm not a VR fan. VR is fun and immersive, but no more so (for me!) than regular old first-person adventure games. But I am a fan of new models of game interaction. Touchscreen adventures like The Room are a huge kick for me. So I was tremendously interested by the hand-controller gestures in last year's Firmament demo. The teaser just let you raise your hand to summon the flying bit-bot, and then point at a socket to send it whizzing off to plug in. But the KS page talks this up:

The adjunct doesn’t speak, but it does understand you and your hand gestures. Through your interactions both you and your adjunct evolve a vocabulary of gestures you learn together. What starts as rudimentary communication evolves into a complex symphony of actions as you solve challenges together and begin to understand the epic nature of what lies ahead.

That's got my number.

Cyan now has a Discord forum for community communication. I've been hanging out in it for a few months now. As with any forum of a small company with a large fandom, you are primarily talking to other fans, but Cyan occasionally drops in a nugget. They started hinting at this KS a week ago, for example. So you might take a look.

(While I'm wittering on, remember that Zed is an upcoming adventure game published -- though not developed -- by Cyan. Due out "this spring", so real soon now.)


Thursday, January 24, 2019

Prince of Persia (2008) -- legacy?

I wanted some good jumpy climby fun, and I was all out of Tomb Raider, so I spent a few days replaying Prince of Persia. That's the 2008 reboot of the 2003 reboot of the series, if you're keeping track, and who isn't? It's on Steam, ten bucks.
Many many articles were written about this game and its audacious ending. I'm not certain I want to spoil it. It's a ten-year-old game, so you've probably played it; but it's a ten-year-old game, so maybe you haven't played it... okay, fine.
Big ol' SPOILER for Prince of Persia 2008: at the end, you and your NPC companion defeat the dark god -- at great cost. You are not happy with the cost. So, in a post-credits scene, you have the opportunity to undo it; and thus undo everything you've accomplished. Selfishly; self-destructively; tragically.
From a storytelling point of view, this worked great. It's in character; you're a wandering thief, you can be a selfish jerk. It's a sympathetic decision. It's plenty foreshadowed. The surprise is in the narrative construction: the character choice is not presented as a story choice. It's a force. Post-credits, you're stuck in a ruined, empty city. You've got nothing to do, literally mechanically nothing, but undo your success or turn off your computer.
Or jump off a cliff, I suppose. I didn't try that. But suicide is emphatically not in character.
So you can imagine all the reactions, negative and/or positive, from people who liked their story tropes traditional and/or subverted. Some of that is still online, you can read through it.
(Wikis remind me about the DLC episode which extended the story. I dimly remember playing this. Narratively, it did nothing but muck up the ending. You can skip it. It's not included in the Steam release anyhow.)
Ten years have gone by. What have we learned? What games have built on this idea?
I'm not talking about tragedy. Tragedy is cheap (and horror is cheaper). Two out of three walking simulators spring the reveal that you're dead, or everybody else is dead, or both.
I'm not talking about the trope where you've been terribly misled, and everything you've done is bad. Then you have to go back and fix it all, or perhaps destroy everything you've accomplished. That's a plot twist, but it still leads to a triumph. You figure out how to win and then you win.
I'm not talking about games where you can choose the good ending or the bad ending. You always know the difference.
I'm talking about a game where you can see a good ending (to the story), but the real ending (to the game) isn't that. The game says you walk on by and do something else. It's tragedy, but tragedy specifically in the interactive mode.
We normally think of this gimmick in horror games. Don't open that door! ...but you're stuck in the room, you have to open the door. Or solve the puzzle, or whatever. It raises tension or moves the plot forward; this is familiar. What's unique about PoP, I think, is using this gimmick to end the story. It's the "oh no" that you can't fix.
Soma goes down a related path. There's a good ending, but you don't get it because that's not how the universe works. Someone else gets it. It's a traditional tragedy, not something driven by game mechanics, but it left me with something of the same feeling. Perhaps because the body of the game does such a good job of showing you how the universe works.
It occurs to me that my old favorite Soul Reaver tries to pull the trick retroactively. (In the '90s!) The previous game, the original Blood Omen, ended with a good/evil choice -- cheap and unsubtle. Soul Reaver declares that your character chose evil. He decided to conquer the world as a vampire lord. Enjoy his thousand-year reign of blood and tyranny. But this does not occur within the play experience of either game.
I have to include Universal Paperclips. There's no "good ending", but the idea is the same. Everything you do in UP is awful; you do it because you know how to play idle-clicker games.
Oxenfree? Interesting suggestion. The original game is a tragedy; you are trapped. The "new game plus" extended ending offers the possibility that you can escape, but at the cost of undoing everything that you've experienced. This doesn't release evil(tm), but it nullifies all the relationships and character moments that you've become invested in through the game. That counts as far as I'm concerned.
What other examples can we think of? What narrative games mess with the concept of game-victory itself? (As distinct from "happy endings".)

Tuesday, January 15, 2019

2019 IGF nominees: my favorites

There were my favorites among the IGF narrative finalists. I don't mean the best -- although the games I liked did well. I mean the games that I finished with a big grin on my face. The ones that spoke directly to me and said "Zarf, I am what you're here for." Or possibly "I am here for you." (IF authors have trouble telling first-person from second-person pronouns.)
  • Return of the Obra Dinn
  • Seers Isle
  • Wandersong
Repeat: I was on the narrative jury and played free review copies of these games.

Friday, January 11, 2019

2019 IGF nominees: mixed reactions

And now, IGF finalists that I didn't get into.
This is tricky to introduce. I'm not saying these games were bad. I'm not even saying that I had a bad time playing them. Rather, these are games that are aimed at an audience which isn't quite me.
So you're about to sit through why they didn't work for me. But this really is more audience-analysis than game-analysis.
  • Unavowed
  • Genital Jousting
  • Hypnospace Outlaw
(Repeat: I was on the narrative jury and played free review copies of these games. Except Unavowed, which I bought earlier this year.)

Monday, January 7, 2019

NarraScope 2019: still seeking talk proposals

Hello! Happy 2019! I know, this is my second blog post of 2019, I forgot. Rabbit vorpal rabbit.
Let me remind everybody that 2019 is the year of NarraScope 2019, the IF/narrative/adventure gaming conference which we will be running in Boston in June. Cambridge, I should say -- it will be on MIT campus.
Let me also remind you (this is the real point here) that we are still accepting proposals for NarraScope talks! And panels, presentations, lightning talks, and so on. If you're advancing the state of the art in interactive narrative, or just doing stuff you're excited to talk about, please sign up.
The deadline for proposals is January 18th, which is just under two weeks away. We hope to hear from you.
NarraScope celebrates the diverse voices of game design. We aim to create a safe, welcoming, and accountable space for all participants.

Saturday, January 5, 2019

2019 IGF nominees: something notable

The IGF finalists have been announced. It's an extremely awesome and diverse slate of games. I'm not going to try to fit them all into one post.
Today, I'm picking out games that might not have gotten a lot of attention -- but they did something narrative interesting, or clever, or just had nice writing that I want to point at.
  • A Case of Distrust
  • The Hex
  • Watch Me Jump
  • levedad
(Note: I was on the narrative jury and played free review copies of these games. Except A Case of Distrust; I bought that one earlier this year.)