Search Results for: interactive fiction

4000 pages of Infocom documents

I said 4000 pages of Infocom documents. You heard me, right?

These are paper records saved by Steve Meretzky while Infocom was operating. He saved them after the company fell down; he preserved them for decades; he let Jason Scott scan them while making Get Lamp. The originals are now at Stanford University. The scans (slightly edited to remove personal information) are now on the Internet Archive.

What's currently up there is all the design documents for many of Infocom's games. (I originally wrote "nearly all" but in fact it's seven of them.)

Further doc dumps (memos, email, schedules, business plans) will appear in the future -- they require more editing and permissions, since there's more personal information there.

Go nuts.

Tagged , , , , | 1 Comment

The Room 3: design ruminations

(Or "roominations", har har.)

I have finished The Room 3, third in the series of gorgeous puzzle-box games for touchscreen. I didn't know it was in production -- The Room 2 seemed to wrap up the storyline, such as it was -- but I guess the designers have decided to ride this clockwork train for as long as it ticks. I'm not objecting; this entry in the series is a satisfying chunk of puzzle manipulation. It's longer than the first two games put together, and it expands the original game mechanic into an explorable environment. (By offering an architectural space of rooms, and also adding a new "zoom into tiny sub-rooms" mechanic.)

I want to talk about one particular aspect: the storyline. In idle post-game chatter, I tweeted:

I can't say I think of these games as narrative objects at all. (--@zarfeblong)

That may sound nuts; how different is the Room series from the classically-narrative Myst series? Puzzles + journals = IF. But there must be a difference. When I said above "the storyline, such as it was", I wasn't kidding. I literally don't remember anything about the storyline of The Room and The Room 2 except that R2 seemed to wrap it up. And there was "the Null", but that's something that R3 reminded me of.

R1 had no environmental storytelling. It was ostentatiously unanchored in any physical environment. It had physicality, yes -- its puzzle-boxes were of wood, brass, glass, and steel, as conveyed by texture and sound and the direct manipulation of the touchscreen interface. But the boxes sat on spotlighted tables. The walls around you were unfocussed and dimly lit: the bare minimum to keep you feeling grounded at all. Despite the title, the game kept your attention resolutely off the room you were in.

R2 added furniture -- adjacent tables, mechanisms on the walls. Now we could talk about "the room" as a space that the game took place in. But these were still silent spaces: no history, no future.

In R3, as I said, we are given an architectural environment. We can move from room to room. We can backtrack to consider clues that were originally obscure. Occasionally the topology even becomes relevant, adding a Rhem-style puzzle or two.

These additions expand the scope for puzzle design. But do they add to the storyline? I don't think so. The journals tell us that this house is named "Greyholm", but that's the only mention of the house or anything in it, aside from undescribed "keys" and "parts of the Null". We get no history, no sense of events occurring here. We have no reason to imagine the Craftsman reading in his library or puttering in his greenhouse.

Now you may object: who says this game needs a sense of history? Perhaps the designers wanted to hew to the original R1 aesthetic -- an uncontexted puzzlebox -- while embracing the expanded puzzle possibilities of architecture. And I agree with that!

Or, from the other side: does Myst really have much more than this? Atrus writes about construction in his Ages, but you never get a picture of little Sirrus and Achenar playing in the planetarium or swimming by the dock. Myst Island resists being placed in any context beyond "they burned the library". And I agree with that too. (Although Cyan clearly saw that as a shortcoming; they stuffed as much history into Riven as it could swallow.)

So I am not criticizing The Room 3, but observing how I reacted to it: as a garden of puzzles in spotlights. The journals and letters, lacking historical context, presented themselves to me as irrelevant. So I didn't read 'em! I gave them one glance each, to check whether the pattern had been broken by a surprise clue or something, and then moved on with the "real" game.

The designers may be frustrated by this reaction. Here they are writing content and I'm ignoring it. (And I call myself a text game fan!) They're even trying to set up some narrative tension by having two sets of notes; one says "do the thing!" and the other says "it's a trap -- don't do the thing!" And I'm ignoring that too, because the game just doesn't have any space for it. There's no action you can take which corresponds to "don't fall into the trap". There are only puzzles. You solve the puzzles, or you quit out and go back to Pac-Man.

Myst, of course, set up a very similar narrative tension (red pages or blue pages?) but it managed to make it stick because you could make a choice. It was a silly choice, a clearly terrible choice, but the game let you express it. So you had a reason to at least listen. And then when the third alternative came along, you were engaged enough to count it a victory.

R3 tried an interesting variant of this. You progress through rooms, solving puzzles and collecting pieces of the Null. But as you do, you discover extra puzzles on the side. These appear unsolvable at first, but you can discover an "in" and begin solving them in parallel with the mainline puzzle rooms. Or not; up to you. If you complete both threads, then you can reach extra endings from the game's final scene.

These side puzzles are associated with the "it's a trap" notes -- but, since I was ignoring the notes, I didn't actually notice that until later. In retrospect, the designers must have intended this to be your choice: finish the main puzzle thread or the side puzzle thread? Accept the Null challenge or refuse it?

Except the game doesn't work that way at all, because puzzles are for solving. You're never forced to choose between the threads. You can work on either at your leisure; alternate threads or leave the side puzzles for later. (The side thread is unlocked by the main thread, so you can't solve it on its own. That's what makes it "side".) This is an open design (to a degree, but more open than R1 or R2 were) -- an excellent thing, but not a narrative choice. Final-scene choices are never narrative choices in the game, because the game is over.

(Yes, I'm talking about Myst here too.)

The game has structure; the main-vs-side puzzle construction is admirably clear. The final scene invites you to discover the extra endings -- unsolved puzzles, and then an extra goal beyond that -- purely through presentation. (The closing screen nudges you about which endings you've found, but it didn't have to.) My point is that this structure is not the narrative choice that the journals seem to be conveying. In fact it actively cuts against it; the game wants you to solve all the puzzles.

I'd extend this to the atmosphere, as well. The Room series has a tone of unearthly horror. But this does not flow from unreliable letter-writers or Lovecraftian tentacles. (The tentacles are kind of laughable.) It comes from the unexpected abrogation of your physical environment. You are simultaneously led to think of the world as real and as a directed dreamscape. When your expectations of structure, solidity, and architectural space fall out from under you -- that's what makes these games disturbing.

Posted in Zarf on Games | Tagged , , , , , , | 1 Comment

Indiecade happened and it didn't kill me

We showed off Seltani at Indiecade! To lots of people. Lots and lots. Not everybody was interested -- it was, after all, a text game in a hall crowded with flashing lights and VR headsets -- but plenty of people thought it was worth a look. Some were Myst fans (or even Myst Online fans); some were old MUD users; some were familiar with Twine but had never seen a multiplayer Twine-like.

I gave out stacks of postcards with this map I did of the Seltani District (the game's initial hub area). It had the URL on the back, obviously. (Note to self: next time I reprint the postcard, boldface the URL.)

In a wiser and more organized world I would have a story to tell about Indiecade, but it's not, I don't, and I'm moderately exhausted in a hotel as I write this. So you get lists.

People I met or re-met (in no order): Tory Hoke (of Sub-Q Magazine), Squinky, Zak S, Rich Lemarchand, Tablesaw, Sam Barlow (Her Story won the big festival jury prize), Cat Manning, one of the Chaosmos designers (I have lost which one), Zoe Quinn, Naomi Clark, Mark Marino, Matt Weise, Patrick Smith (Vectorpark), Jim Munroe, Kyle Seeley, Michael Mateas, Michael Carriere, and a lot of others who I am failing to bring to mind because it was a packed weekend.

Games I recognized, played, or intend to check out: Emily Is Away, Desolus, Kairo, Nevermind, Museum of Simulation Technology, Darknet, Metamorphabet, Pygmalion's Challenge, Pavilion, Walden, The Meadow, Line Wobbler, Memories of a Broken Dimension, Thumper, Consentacle, Red and Pleasant Land. This too is an incomplete list. Very, very incomplete. I am not knocking your game if it's not mentioned here.

Bonus points to Sam Barlow for trying to get me to play Consentacle. I declined. It's not you, Sam, it's me.

I am grateful to everybody who came up and introduced yourselves to me. Or re-introduced yourselves to me -- I'm bad at faces. (Have I told the story of how I've met Chris Klimas three times and each time thought it was the first?) I had interesting conversations with writers, teachers, musicians, artists, and (obviously) gamers and game designers. I collected a centimeter-thick stack of business cards (which helped me write this post, at minimum). I had a gelato.

Special thanks again to Carl Muckenhoupt (of Baf's Guide, fondly remembered) who volunteered to help me out with the Seltani demo for hours and hours.

Oh, and I visited the Museum of Jurassic Technology! That was... a trip. Describing the Museum is probably the least useful thing one can do about it, so I won't.

After I wrote the above, as I waited in the airport for my flight home, I saw this post from one of the Indiecade organizers:

Implicit in my work with IndieCade was a belief that conferences—the talks, the panels and the interstitial moments of community—are vehicles for change. Looking back at the last six years, I no longer believe this is a meaningful way to sustainably support marginalized communities. And so I’ve made the decision to step down from my conference co-chair role [...]

[...] For me, a big motivation for volunteering my time to co-chair the IndieCade conference has been giving marginalized voices a platform to share their work. Events like IndieCade and GDC’s diversity track give these developers and critics a platform to share their work, but I fear these events are not providing sustainable, long-term benefit to those outside academia and game development companies.

[...] But within marginalized communities of gamemakers, outside the academic and game development ecosystems, it is unfair to assume everyone can afford to take on the opportunity costs and financial burden of attending a conference. Even with the free conference pass given to most speakers, travel, lodging and food can easily eat up $1,000 or more for a weekend event. Over the last couple of years, IndieCade has made efforts to provide some financial assistance to conference speakers who need it, but it has been a token gesture at best [...]

(--John Sharp, Conferences and sustainable diversity)

(I've selected just a few lines from his post. Read the whole thing.)

That had a wee bit of resonance for me, let me tell you.

Obviously I am not "marginalized" in most senses. I'm a straight white guy with a CS degree and a software industry background. I have savings to fund my attempt at an indie career. But still, this is exactly the stuff I think about. I'm not in academia; I do not work for a game company; I have not achieved sustainability. Zarfhome Software has never made rent for me for more than a couple of months in any given year.

I submitted Seltani to Indiecade on a whim. (A whim with a $100 submission fee!) When it was accepted, I did the calculation: will this trip be worth it? It's a business decision. Crudely, I was gambling that the contacts and handshakes and business cards I collected would add up to more than the cost of travel, hotel, prep work, and the time I took from other tasks. (Which is, yeah, over $1000.)

You can't measure that outcome on the spot. The payoff is in future projects and potential jobs. I'd like to be optimistic about this, but here's a conference organizer saying he's not. He thinks I wasted that grand. (And, again, I'm one of the folks who can afford to lose it. Plenty of people can't.)

As I said on Twitter -- the most valuable "networking" I did this weekend may have been going up to a Boston compatriot and saying "Hey, your company does iOS work, right? I might need some of that next year." Not game work, just pay-rent work. And I didn't have to go to Indiecade to talk to him; I see him around Boston all the time.

So this is all depressing in various ways. I can still be optimistic, but it's a nervous optimism. Going out to dinner with IF people was fantastic, but what did we talk about? Sustainability. Money. Jobs. Trying to figure out what we're doing with our lives.

(Also community tensions within IF and IF-adjacent groups, which is not the same issue but touches on it. There's been some arguments recently about the role of IFComp in the modern indie-dev world. When IFComp started in 1995, nobody was asking "Should I enter my game in this competition or sell it on my web site for money?" That just wasn't a question on anybody's radar. Things have changed.)

John Sharp's article goes on to talk about positive possible directions. It's not a surrender post. He likes IndieXchange, the pre-Indiecade biz-dev event, which I also liked and found valuable. (It didn't turn me into an instant business success, but there were good talks on marketing and on the dirty details of outsourcing audio for your game.) (I might have to outsource audio for a game someday, right? I can't get away with banging the cheese grater forever.)

There may be more possible paths in the future. I hope so.

And look! I've signed up for GDC in March! The last GDC I went to was in 2012, and that gamble did not pay off. I hung out with friends, it was fun, but was the benefit worth that $700 Summits-and-Tutorials pass? Plus plane and hotel? I think it's safe to say "heck no."

But here I am taking another spin of the wheel. I think the odds are tilted my way now. I've got the more modest Indie-Summit pass -- not that this saves much compared to travel costs. Mostly, it's that I've met more people and done more work, so I'll have a wider base of contact. (I'm bad at meeting people, but I can tell that four years of putting myself out there have slowly accumulated some results. See lists above!) I'll have finished Flashpaper by March -- I'd better have finished it by March -- so I'll have a game to promote.

Maybe I'm stupid, but this is the point in my life when I have to be.

Posted in Zarfplan | Tagged , , , , , , , | Leave a comment

Videogame Hugo: 2015 potentials

Last month I posted about the idea of a videogame category for the Hugo awards.

A few days later there was a discussion thread on File770 (a prominent SF fandom news blog). The discussion was a good snapshot of community response to the idea.

The biggest objection was that there aren't enough good games to make a category worthwhile. People cited 15 to 25 as a desirable minimum. (The Hugos have a two-stage voting process. So you want at least 25-ish plausible suggestions for "best game of the year", which then get narrowed down to five finalists, which then get narrowed down to one winner.)

The petition that sparked that discussion thread went nowhere. However, I think it's worthwhile to put up a concrete list. The subject will certainly come up again, and I want people to be able to point and say "Yes, look, there are that many games every year!"

I'm going to focus on indie and amateur interactive fiction titles, because that's my field. I've got nothing against big-budget SF games, but you can get a list of those off any game-industry news site. This is the wider field of games which might not be familiar to the non-gaming SF fan. Most, though not all, are short games -- two hours playtime down to ten minutes.

I'm not saying that all of these games are, in fact, Hugo-worthy. I haven't played most of them! I'm gathering highly-rated titles from a variety of sources, including IF competitions and game-jams of 2015. (Special thanks to Emily Short's mid-2015 roundup post.)

(I do not yet include games from IFComp 2015, the big IF competition of 2015. That's still in progress and will be for another month. When it ends, it will certainly add another handful of titles to this post. I'll update then.) (Also still in progress: the Windhammer Prize for Short Gamebook Fiction.)

Notable and Highly-Rated SF/Fantasy/Horror IF and Narrative Games of 2015:

  • Arcadia, Iain Pears ($)
  • Below, Chris Gardiner ($)
  • Champion of the Gods, Jonathan Valuckas, Choice of Games
  • Chlorophyll, Steph Cherrywell (ParsC)
  • Choice of the Petal Throne, Danielle Goudeau, Choice of Games
  • The Compass Rose, Yoon Ha Lee and Peter Berman, Sub-Q Magazine
  • Delphina's House, Alice Grove (ParsC)
  • Does Canned Rice Dream of a Napkin Heap?, Caelyn Sandel, Carolyn VanEseltine, Danielle Church, Jamie Sandel (AnthJ)
  • 80 Days, Meg Jayanth, Inkle Studios (EXP from 2014) ($)
  • False Mavis, Ted Casaubon (ShufC)
  • Her Story, Sam Barlow (MAR, fairy-tale elements) ($)
  • Leadlight Gamma, Wade Clarke (EXP from 2010)
  • Lifeline, Dave Justus, 3 Minute Games ($)
  • Molly and the Butter Thieves, Alice Grove (ShufC)
  • Neon Haze, Porpentine and Brenda Neotenomie, Sub-Q Magazine
  • Oppositely Opal, Buster Hudson (ParsC)
  • PataNoir, Simon Christiansen (MOB from 2011)
  • Photopia, Adam Cadre (MOB from 1997)
  • Ratings War, Eddy Webb, Choice of Games
  • Scroll Thief, Daniel M. Stelzer (EXP from 2014)
  • Six Gray Rats Crawl Up The Pillow, Caleb Wilson (ParsC)
  • The Skeleton Key of Ambady, Caelyn Sandel (ShufC)
  • Snake Game, Vajra Chandrasekera and Tory Hoke, Sub-Q Magazine
  • Starry Seeksorrow, Caleb Wilson (ShufC)
  • Terminator Chaser, Bruno Dias (ParsC)
  • To Spring Open, Peter Berman and Yoon Ha Lee (ShufC)
  • Tonight Dies the Moon, Tom McHenry (AnthJ)
  • Versus: The Lost Ones, Zachary Sergi, Choice of Games
  • When the Land Goes Under the Water, Bruno Dias (ShufC)
  • A Wise Use of Time, Jim Dattilo, Choice of Games

Tags on the above:

  • ($): Costs money (all titles listed here are US$10 or less)
  • (EXP from...): Significant expansion of a game released in an earlier year
  • (MOB from...): Mobile port of a game released in an earlier year
  • (MAR): Marginally genre but I'm counting it anyway
  • (ParsC): High-rated entry in ParserComp (IF competition)
  • (ShufC): High-rated entry in ShuffleComp (IF game exchange)
  • (AnthJ): Entry in Antholojam (SF-themed IF game jam)
  • note that Choice of Games titles are available both as apps ($) or free-to-play online

Other suggestions welcome! Comment away.

Tagged , , , , | 10 Comments

What Zarf is up to, autumn edition

Yes, I've been running quiet for the past couple of months. I've been working away on various projects. But soon I will enter a season of furious public activity! While also still working away, because the projects aren't done yet.

First, as I recently posted, I will be at IndieCade to show off Seltani. That's Oct 23-25 in Los Angeles. Extra thanks to Carl Muckenhoupt (Baf of the fondly-remembered Baf's Guide) who will be helping me demo Seltani that weekend.

There's also an IF meetup on Saturday night at the IndieCade Night Games festival. I'll be attending that too.

The WordPlay festival of narrative games and IF is back in Toronto on Nov 7th. I'll be there, along with other stalwarts of the IF scene including Emily Short, Sam Barlow, Christine Love, and (our blog-host) Jason McIntosh.

(Is "stalwarts" an okay thing to call people? I don't always know.)

Let me also mention the Boston IF meetups (at MIT) on Oct 12 and Nov 11. Emily Short will be visiting for the November meeting.

Now the more exciting report: projects in progress.

I showed off a prototype of The Flashpaper War at Boston FIG a couple weeks back. That went great! My table didn't draw enormous crowds -- the perils of demoing a couple of meek ipads amid the hall's obstreperous beeping and flashing. But people kept sitting down and trying it... and when they tried it, they generally sat and read/played through several pages of interactive text. Amid all the beeping and flashing! So that's a good sign.

I must admit that Flashpaper is still only a prototype. (Although it's a much more polished prototype than it was before FIG!) The web page says "Coming later this year," and I intend to stick to that, but there's a lot of writing and adjusting to do before it's ready to go.

You may have seen that the new Apple TV is about to ship, and it will support third-party apps. I'm very excited about this; I've been working through the dev tools to see how it works. (Summary: very similar to iOS. No surprise there.)

I've just finished up a draft of Pocket Storm for Apple TV. Is this not the perfect fit? Push button -- soothing rainstorm audio in your living room. Or cricketsong and distant thunder, if you prefer. If all goes well, Pocket Storm will be among the first wave of apps available when the new TV box goes on sale.

(If you already own Pocket Storm for iOS, fear not -- you'll be able to download the Apple TV version for free! One purchase covers both platforms.)

(I know, "Pocket Storm" isn't the best name for a set-top box app. I couldn't think of anything better, I'm afraid. "Living Room Storm" is all wrong.)

So what else would make a good Apple TV app? I'm thinking that Hadean Lands is probably not ideal. The UI is not built for text input, and while you could attach a Bluetooth keyboard, most users won't. So parser-based IF is probably not going to fly. (Flashpaper, on the other hand... we'll see.)

I'm also taking a look at Meanwhile. I'll have to see how the UI works with a remote control, and of course I'll have to consult with Jason Shiga about it. But it could be sweet.

That's all for now. Keep an eye on this blog for things shipping. I'm eager to get to the shipping part.

Posted in Zarfplan | Tagged , , , , , , , , , , , | Leave a comment

Seltani at IndieCade 2015

A very quick note to say that Seltani has been selected as an IndieCade festival nominee!

(Among many other recent indie wave-makers such as Her Story, Kerbal Space Program, Plug & Play, and Prune.)

This means I will be in Los Angeles for the IndieCade festival. (October 23 to 25.) I will be showing off Seltani. Showing off a MUD in the middle of a modern games festival! I don't even know what that means!

(Well, I've demoed Seltani in public before, so I have an idea what it means. But never on this scale.)

I am proud, humbled, and not a little freaked out. Further details to follow.

Posted in Zarfplan | Tagged , , , , | Leave a comment

Videogames in the Hugo Awards

This post is not about nomination slates.

The recent excitement around the Hugos has led to record-breaking levels of public discussion and voting. That's good! It's also led to an early start to the "what's worth nominating next year?" discussions. Also good (and I've noted down some recommendations for my own to-read list). But that's not what this post is about either. This is a game blog, so we're going to talk about the possibility of a "Best Videogame" category for the Hugos.

To catch up: the Hugo Awards are the annual awards for best science fiction and fantasy of the year. They originated in 1953. There are a bunch of categories, including Novel, Short Story, Short Dramatic Presentation (TV episodes), and Long Dramatic Presentation (movies). But the categories have shifted over time; for example, a Graphic Story (comics) category was added in 2009.

So how about a videogame Hugo category? Many games are science fiction and fantasy. (I could argue that most videogames have at least some SF or fantasy elements.) (I could also argue that "sci-fi videogames" do not form a genre the way sci-fi books or movies do, but I won't get into that argument here.)

Looking back in history, I find that an "Interactive Video Game" category was experimentally added in 2006. It received very few nominations and the category was dropped before the final round.

But, I venture to say, times have changed and fandom has (slowly, cane-wavingly) changed too. Comics are in -- probably because lots more fans read comics. (I suspect this is because of web-comics.) Are games as widely appreciated by SF fandom? I'm sure they are, because the field of gaming has become so variegated and spread to so many audiences. Not everybody is playing Metal Gear Solid this week -- I'm not -- but an awful lot of people have played a casual web-game or an online board-game or some form of IF or an indie Steam game or, or, or... something.

So I'm willing to say it's time.

I've dipped into a discussion on this topic on Making Light (a fannish blog). (See comments 651, 652, 656, and various thereafter.) I also see that Eleri Hamilton, who I know from Myst fandom, is pulling together a proposal.

(This is not to say she's the only one pulling together a proposal! Fandom is large and I only see a few corners of it.)

Several other questions came up in the discussion. I'll summarize the answers I agree with; the ML thread contains longer and better-argued replies.

What do we call it?

I've seen "Videogame", "Video Game", "Interactive Media", "Interactive Story", "Interactive Experience", "Interactive Fiction". I lean towards "Videogame" just because everyone knows what that means. (Everyone then starts arguing about what it really means, but that's equally true of the other labels.)

How many categories?

Just one, to start with. Hugo categories are currently split by length (running time or word count), but the play time for a videogame is often ill-defined. Game industry awards are sometimes divided by game genre -- "best adventure game", "best shooter" and so on -- but asking a non-gaming-focussed fannish audience to do that is probably overkill. The genre labels have gotten fuzzy these days, anyhow. A single award category is simple; we can refine it later if desired.

Can videogames be nominated for Hugos right now?

Yes, kind of. Games are eligible for the "Dramatic Presentation" categories, if you're willing to pick a running time. However, those categories were meant for, and remain dominated by, TV and movies. The exceptions are stuff like audio plays and theatrical performances. Games, I snobbishly insist, are qualitatively different! I don't think it's a good comparison to put them up against non-interactive media.

There's also a "Related Work" category. Early on in this discussion, I thought it made sense to nominate games for "Related Work" and then move on to a permanent category if they did well. But this doesn't seem to be the way the Hugos work. The category is mostly used for non-fiction -- critical works about SF -- rather than as a "miscellaneous" or "uncategorizable" bin. Graphic novels were very rarely nominated for "Related Work" before the "Graphic Story" category appeared.

How does one go about proposing a Hugo category?

See Kevin Standlee's post from early this year. The short answer is, the Hugos are run according to the rules of the World Science Fiction Society, which can be amended by vote of attending Worldcon members. There's a procedure. It takes a couple of years; the system has lots of built-in hysteresis.

A worldcon committee may, if it wants, invent a one-time category without going through the whole voting thing. (This is how the 2006 "Interactive Video Game" category happened.) So this would be another way to try out the idea.

So what do we do?

Talk about whether it's a good idea. Come up with games that you think would be good nominees for next year. (That means games released in 2015, or which received significant expansions in 2015.) (For the record, Hadean Lands launched in October 2014. Sorry!)

Any proposal, whether to the Worldcon membership for a permanent category or to the Worldcon committee for a one-off, will need to argue two things: there are enough nominees each year for a good contest, and there is enough interest from fandom to get a lot of votes. That's what we have to establish.

What about the Sad Puppies thing?

Dammit I said this post wasn't about that.

Okay, yes. This is the year that a whole bunch of Hugo categories got No Award due to... well, I would say "due to a loophole in the nomination rules". I would also say "Remember Gamergate? Like that, but for science fiction fandom." I would also say "Dammit." The issue is not dead and will certainly infect the 2016 Hugos, although it's not clear if the results will be as severe. (A nominations rule change has been proposed, but that cannot take effect until 2017.)

So it would be bad if a videogame category was tried and then went to No Award because of this mess. However, this doesn't mean we should just drop the issue! To quote from my own reply on Making Light:'s awfully close to "be very very still and the assholes might not see you". I'm not interested in letting them dictate my goals that way.

Nor do I expect either the Puppies or Gamergate to die down of their own accord. They'll be "gone" when the world ignores them, which day will come sooner if fandom continues to create, promote, and discuss great SF. This means moving the conversation forward, not hiding from it.

Anyhow, the game-category discussion is probably going to take a while. A 2016 one-off category is possible but it's not the most likely path forward. So we should get the discussion rolling, and hopefully the 2017 nominations fix will be ratified and help stabilize things.

Time and bank balance permitting, I will be at the 2016 Worldcon (MidAmeriCon II in Kansas City). If I'm there, I'll be at the Business Meetings, which is where rule changes are debated and voted on. Let's see what we can do.

Tagged , , , , | 6 Comments

Customizing an interpreter for a Glulx game release

Another technical question from Twitter: the integration of Hadean Lands with its iOS app. How did I set up iOS UI features like the dynamic map and the recipe index?

(Warning: if you don't think C code is interesting, this post is not for you! Sorry.)

The iOS version of HL uses my standard iOS IF interface, extended. I've added two tabs to it. The map tab shows your current location, and you can tap to travel to any room you've visited before. The recipe tab shows an index of recipes and other information you've learned. These work just like the "GO TO..." and "RECALL..." commands, so they don't make the game easier to solve, but they're convenient shortcuts.

I'm not going to post the iOS UI code I used. If you know iOS programming, it's very basic -- textbook UITableView and UIImageView stuff. Instead, I'll talk about the general problem: transferring information between the Glulx VM and your native (C) interpreter.

I should put "general problem" in quotes. There are several Glulx interpreters, after all. But let's assume that you're building a native app for your Glulx game, incorporating the glulxe interpreter engine (in C), and you want to customize it with game-specific features. You've implemented the UI part; now you just need to extract game state information. Say, the player's location to show on the map.

There are a couple of approaches that would work. For example, we could define a completely general system for transmitting game information to an outside observer, and add that to the Glk spec. Sound like a good idea? Well, maybe, but it's both a hard problem and a vague problem -- what's "information"? We'd probably need some kind of structured interchange format (XML? JSON?). Then we'd have to encode and decode that. Plenty of headaches. No thanks, not right now.

Or we could define a new Glk output capability just for this game. No spec, just define a function ("glk_set_map_location") and have the game call it each turn. I thought about this, but I decided it would require modifying too many different modules. Glk function dispatching is kind of ugly.

Instead, I decided to write C code to peer directly into Glulx VM memory! It's stored as a simple byte array, after all. Reading the game state out is just a matter of understanding the memory layouts of objects, variables, and arrays.

Okay, that's not easy, but it's doable in a small amount of code. To make this work:

  • You'll need to know some Inform 6. Sorry. Inform 7 is a wonderful high-level programming system, but it compiles into low-level objects, variables, and arrays.

  • You'll need to extract information from the gameinfo.dbg file that's built along with your game. (This lives in the Build subdirectory of your Game.inform project.) This is where you find the memory addresses of those objects, variables, and arrays.

  • You'll need some boilerplate C code to examine objects, variables, and arrays. I'll attach it to this post; you can copy-and-paste.

How do you use this? Say you're interested in the player's location. (For the map, right?) You know from the Standard Rules that

The location variable translates into I6 as "real_location".

Browse through gameinfo.dbg with a text editor (or an XML editor) and you'll see a stanza that starts:

    <address> 249528</address>
    [...more info...]

This tells you the absolute memory address of the I6 variable real_location. Call gameparse_get_global() with that address -- the function is shown below -- and you'll get the player's location, expressed as the memory address of the room object.

How do you know what room that is? Somewhere in gameinfo.dbg is another stanza:

    <value>     273861</value>
    [...more info...]

This indicates that an object named "Kitchen" has memory address 273861. (It happens to be the 88th item that the compiler defined.)

Obviously this is not very convenient. All of these addresses are liable to change every time you compile your Inform game. So you wind up writing a script to parse your gameinfo.dbg XML, locate the real_location address, locate an object called I#_kitchen (for some integer, might not be 88), and so on. I like to write them out to a C header file looking like this:

#define GLOBAL_REAL_LOCATION (249528)
#define OBJ_KITCHEN (273861)

Then you can include this header in your game project and write code like

if (gameparse_get_global(GLOBAL_REAL_LOCATION) == OBJ_KITCHEN) {...}

But you'll have to write this XML-parsing script yourself, I'm afraid. I don't have one for you. You could start with

Note that you can't do this for I7 global variables (declarations like "Foo is a thing that varies.") Those get tucked into an I6 array and the gameinfo.dbg file has no information about them. If you need to observe a global variable, you'll have to declare it in I6 with an I7 translation. See I7 manual 27.22.

The gameparse_obj_child, gameparse_obj_sibling, gameparse_obj_parent functions let you traverse the I6 object tree. (Although this doesn't give you I7 relations like component-ness.) I used this for HL's recipe index. The game's internal knowledge objects are moved into special containers, for easy scopability, so I can trawl those containers to set up the recipe tab.

Looking at object attribute and properties is easy. The functions gameparse_obj_attribute and gameparse_obj_property do that. Knowing what I6 attribute or property represents a given Inform property is harder. The best plan is to to look at the generated I6 code (the Build/auto.inf in your Inform project) and see what's going on under the covers. For examine, the boolean property open/closed is implemented by the following I6 lines:

! meaning of "open"
if (t_0) return (GetEitherOrProperty(t_0, open));

This means you're looking for an I6 attribute in the gameinfo.dbg file:


Or say you've written the I7 line:

A thing has a number called the weight.

You find that this generates I6 code like:

! [1: let n be the weight of the noun]
tmp_0 = GProperty(OBJECT_TY, noun, p15_weight);

And so you're looking for an XML stanza like:


At this point you start to wonder if the general information API wouldn't be better after all. Maybe it is. Why didn't I go that way? (I realize this is more of a peek into Zarfbrain than you probably care about.) I find that this stuff is the easy part. Drawing a map was hard. Extracting recipes from game output and importing them into an iOS app was work, if not really hard. Extracting state from VM memory was a solved problem; I just had to do it for a lot of objects.

Also, it's fast. I only inspect game state when flipping to the relevant tab, and the inspection code is C. If I'd rigged the game to output state to an API, it would have to be every turn, which would slow down normal gameplay. Or I guess I could have added a secret input event for tab-flipping, which would mean blocking the UI on game code, also slow... Anyhow.

Some other concerns:

  • In my iOS interpreter, the VM runs in a background thread. The UI runs in the main thread, as is usual for iOS apps. How did I synchronize the VM inspection? I didn't! Totally whiffed the thread-safety issue. It's generally not a problem; the player will flip tabs while the VM is blocked awaiting input. But if you have some fancy timed-input code that moves the player around, and the player flips tabs at just the moment when the timer fires, you could get a bum value out of real_location.

  • What about Z-code games? You can take the same approach, but you need different state-inspection code, because the Z-machine's memory layout is different. (For a start, it's all 16-bit words, not 32-bit.) I did some of this for the iOS releases of Dreamhold, Shade, and Heliopause. But I didn't wrap up the C code into nice functions like these. So -- exercise for the reader, sorry.

  • Can you do this in Quixe? (A Javascript interpreter instead of a C interpreter.) Yes, and the plan is just about identical. Quixe maintains a private memmap array, which is a Javascript array of byte values, so you just have to translate the code below into Javascript and you'll get the same results. The only trick is that memmap is in a private scope. You could add the functions below to the Quixe global object, or rely on ReadWord/ReadByte, or just add a one-liner to export memmap:

    get_memmap: function() { return memmap; },

Finally, we have the question of input. When the player taps a room on the HL map, the game must accept it as input.

Again, there are a few ways to handle this. I decided to use a custom Glk event. The Glk spec says that negative event ids (0x80000000 to 0xFFFFFFFF) are reserved for implementation-specific events, and that's what this is. The iOSGlk library has a forceCustomEvent method. The map UI invokes this, passing a negative constant as the event type and the room object address as an extra argument. Conveniently we've already extracted the addresses of all the rooms from gameinfo.dbg.

(Other Glk libraries might not have this sort of API, but it will be easy to add. All events funnel into the Glk library in the same way.)

The only remaining chore is for the game to react to this custom event. Unfortunately, Inform's core parser loop is built to accept only text. This will have to be improved someday! (Not just for custom map hacks, but for hyperlink input, mouse input, and so on.)

But, again, I took the cheap way out. I used the HandleGlkEvent hook to translate the custom event into the input line "MAP-VERB 273861", where the number is the decimal room address.

This is not ideal because a player could type that line by hand! Well, whatever. Players can do what they want. Mind you, I sanity-check the argument very carefully to make sure an invalid address can't crash the game or leave the player stuck in a teakettle.

The relevant I7 code (and I6 inclusions) appear at the end of this post. I just noticed, though: it won't compile with the current Inform 6 compiler (6.33)! This is because I rely on the constants #lowest_object_number, #highest_object_number, #highest_class_number. These were missing from the Glulx compiler until, well, until I was writing this map code and needed them. You can build the latest I6 compiler from source and shove that into your I7 distribution. Then this'll work.

So the conclusion is, this is all a big pain in the butt, isn't it. Yep.

(No comments out of you, Dave. It really was the least-effort solution for my particular problem.)

C code for examining Glulx VM state:

#include "glulxe.h"

/* The glulxe.h header defines the glui32 type and the Mem4() macro.
    Also the memmap global variable (array of bytes). */
/* These functions do a little bit of safety-checking, but you really
    should be careful to only call them with valid object addresses. */
/* Feel free to add warnings or errors to the "error" cases. I like to
    throw exceptions, myself. */
/* All of this code assumes that NUM_ATTR_BYTES is 7, the default
    value for Glulx games. If you increase NUM_ATTR_BYTES, you'll
    have to adjust the object structure offsets. */

int gameparse_mem_active(void)
    return (memmap != NULL);

/* Fetch a global variable. */
glui32 gameparse_get_global(glui32 addr)
    if (!memmap)
        return 0; // error: called get_global with no memory map
    return Mem4(addr);

/* Get the object which contains a given object, or 0 if it
    is off-stage. (The I6 parent() function.) */
glui32 gameparse_obj_parent(glui32 obj)
    if (!memmap)
        return 0; // error: called obj_parent with no memory map
    if (memmap[obj] != 0x70)
        return 0; // error: called obj_parent on a non-object
    return Mem4(obj+5*4);

/* Get the first object contained by a given object, or 0 if it
    has no contents. (The I6 child() function.) */
glui32 gameparse_obj_child(glui32 obj)
    if (!memmap)
        return 0; // error: called obj_child with no memory map
    if (memmap[obj] != 0x70)
        return 0; // error: called obj_child on a non-object
    return Mem4(obj+7*4);

/* Get the next object contained after a given object, or 0 if there
    are no more. (The I6 sibling() function.) */
glui32 gameparse_obj_sibling(glui32 obj)
    if (!memmap)
        return 0; // error: called obj_sibling with no memory map
    if (memmap[obj] != 0x70)
        return 0; // error: called obj_sibling on a non-object
    return Mem4(obj+6*4);

/* Look up an attribute flag on an object. */
int gameparse_obj_attribute(glui32 obj, int attr)
    if (!memmap)
        return 0; // error: called obj_attribute with no memory map
    if (memmap[obj] != 0x70)
        return 0; // error: called obj_attribute on a non-object

    unsigned char byte = memmap[obj+1+(attr>>3)];
    if (byte & (1 << (attr & 7)))
        return 1;
        return 0;

/* Look up a property value on an object. */
/* Returns the first word of the property, if multi-word. (In most I7 games,
    the only multi-word property is "name". So you can't use this function
    to scan through the name list of an object.)
    If the property is not provided for this object, returns 0. */
glui32 gameparse_obj_property(glui32 obj, int prop)
    if (!memmap)
        return 0; // error: called obj_property with no memory map
    if (memmap[obj] != 0x70)
        return 0; // error: called obj_property on a non-object

    glui32 proptab = Mem4(obj+16);
    glui32 propcount = Mem4(proptab+0);
    for (int ix=0; ix<propcount; ix++) {
        glui32 propent = proptab+4+ix*10;
        int pid = Mem2(propent+0);
        if (pid == prop) {
            glui32 paddr = Mem4(propent+4);
            return Mem4(paddr);

    /* Property not provided. */
    return 0;

Inform 7 code for accepting custom input events. (This assumes a "select one room on a map" action, but it can be adapted to other uses.)

Include (-
[ HandleGlkEvent ev ischar args   val;
    if (ischar == 0 && ev-->0 == CUSTOM_EVENT_ID) {
        val = ev-->2;  ! the object address of the tapped room
        glk_cancel_line_event(gg_mainwin, gg_event);
        ! Write a synthetic "MAP-VERB ###" command into the buffer.
        VM_PrintToBuffer(buffer, INPUT_BUFFER_LEN-WORDSIZE, PrintVisitNum, val);
        return 2;
    return 0;
[ PrintVisitNum val;
    print "MAP-VERB ", val;
-) before "Stubs" in "Glulx.i6t".

To decide what object is paranoid-object-check (N - number): (- ParanoidObjCheck({N}) -).
Include (-
! Return val if val is a valid object, otherwise 0.
! This code requires the bleeding-edge (6.34) Inform 6 compiler.
[ ParanoidObjCheck val;
    if (val < Class + ((#lowest_object_number + #highest_class_number) * GOBJ_TOTAL_LENGTH))
        return 0;
    if (val > Class + ((#highest_object_number) * GOBJ_TOTAL_LENGTH))
        return 0;
    if ((val - Class) % GOBJ_TOTAL_LENGTH ~= 0)
        return 0;
    if (val->0 ~= $70)
        return 0;
    return val;

Numeric-visiting is an action applying to one number.
Understand "map-verb [number]" as numeric-visiting.

Carry out numeric-visiting:
    let N be the number understood;
    let O be paranoid-object-check N;
    if O is nothing:
        instead say "That address ([N]) is not an object!";
    if O is not a room:
        instead say "That address ([N]) is not a room!";
    [Check locked doors and so on here...]
    now the player is in O;
    say "You move to [O]."
Tagged , , , , , | Leave a comment

Hadean Lands greenlit! It turns out

A few days ago my idle twitter-browsing was upended:

Huh. I just checked the Greenlight page for @zarfeblong's Hadean Lands... I somehow missed the news that Valve had started the GL process (@andetkaihetera)

Really? I, um, missed the news too. But a quick glance at the HL Greenlight page showed:

This game has been Greenlit by the Community!

The community has shown their interest in this game. Valve has reached out to this developer to start moving things toward release on Steam.

I was off at Balticon, so I couldn't dig into the matter right then. (Which is why everybody else announced the news before me.) But now I'm back and more or less caught up on life. So here's what I know.

If Valve reached out to me, I missed it. The Greenlight page says "Updated: May 12 @ 7:24pm", and the voting stats stop on May 11. So I guess the game was officially greenlit two weeks ago and nobody noticed until this weekend? O the embarrassment.

The site now offers me a link to "become a Steamworks partner". So I have begun that process. I have filled out a great many forms' worth of tax and banking info, the usual excitement. (And the usual confusion about whether I should use Zarfhome LLC's EIN or my personal SSN, a question which I will never, ever get right on the first try.)

Bureaucracy aside, what does this mean for Hadean Lands? I wish I could just push a button and launch the thing onto Steam. But no -- not that simple.

The Mac/PC/Linux download packages that I built last year are playable. But they're not nice. Gargoyle doesn't even have a font preference menu. (You can bejigger a text config file, of all the archaic monstrosities.)

Worse problem: Gargoyle doesn't handle high-res displays. It renders text at the old-school resolution, which means it looks fuzzy and awful. "Retina" displays are standard on high-end Macs and are moving steadily down the product line, and now we're seeing them on Windows machines too. So this is serious.

I would like to switch to other interpreters, at least on Mac and Windows. However, the options are currently Mac Zoom (crashy) and WinGlulx (backscroll is hidden behind an obscure keystroke). Um. I'm very much afraid that I'll have to spend a couple of months fixing up other people's interpreters before I can build Steam-acceptable games.

Now, in some ways this is great. I like contributing fixes to open-source projects! Particularly for IF interpreters! But it's a lot of work, and no cash up front. What's up front is learning curve -- I haven't built either Windows or MacOS apps, not since the 1990s.

I'd probably want some game-specific interpreter features, too. There's the dynamic map -- or, if I can't swing that, I should at least display the static map in a separate window when asked. Same for the IF postcard.

On top of that, I need to browse through Steam's SDK and figure out how it works. I have to think about achievements (probably not) and trading cards (I don't even know). I have to look into whether Steam's libraries can legally be wedged in with IF interpreters, which tend to be GPL.

Plus: this would be a terrific opportunity for that HL bug fix release, right? An impressive bug list has piled up since October. I've barely touched it. Surely it's worth putting my best foot forward for the Steam release.

Whew. All of this will happen, but it will happen in parallel with other work. For example, look at this exciting teaser page that I put up last week...

What is this? I'm not saying! Except to note that it is neither parser-based nor traditionally choice-based (hyperlink or menu style). Fun, eh?

And now, the traditional "green it forward" section:

Cyberganked, Robb Sherwin's retro text RPG, has just gone up on Greenlight. Character classes! Live photos! CGA palettes! Live photos in CGA palettes! Surely a winner.

Porpentine, Twine author and winner of multiple IF awards, is Greenlighting Eczema Angel Orifice, a collection of over 20 of her works. You can't talk about the past few years of choice-based IF without talking about Porpentine.

And some IF works which have been on Greenlight for a while, and are still working their way towards the goal line:

Jack Toresal and The Secret Letter (Mike Gentry and David Cornelson)

The Shadow in the Cathedral (Ian Finley and Jon Ingold)

Posted in Zarfplan | Tagged , , , , , , , | 7 Comments

Javascript wonkery

Here I will take a break from the ever-burbling stream of IF and Myst news, and talk about Javascript optimization.

You could say it's relevant because it came up in a Quixe bug report. ("I tried loading Emily Short's Counterfeit Monkey.... Load time dropped from 29.4 seconds to 10.4 seconds...") IF interpreter improvements are a high priority for me -- particularly if they could be big speed improvements for a fairly small code change. Double-particularly if they imply I've had crappy Javascript code out there for years.


I usually build my Javascript libraries according to the private namespace pattern. I can't remember where I learned this. I assume it originated in this blog post (Douglas Crockford), but I use the cleaner layout described here (Ben Cherry) or here (Todd Motto).

With this trick, all your internal functions and variables wind up hidden from the outside world. You decide which ones to export, and the rest remain private.

Here's a toy example:

Lib = function() {
    var counter = 0;
    var prefix = "The current value is ";

    function add(val) {
        counter += val;
        return counter;

    function get() {
        return prefix + add(0);

    return {
        add: add,
        get: get

Here counter and prefix are private variables. The add() function increases counter and returns it. The get() function returns it as part of a string. (I've set get() up to call add(0) just to demonstrate that private functions can call each other.) Finally, we return an object which exports the add and get symbols. This becomes the global Lib object, so a user can call Lib.add() and Lib.get(). But there is no Lib.counter; that's private.

Crockford says "This pattern of public, private, and privileged members is possible because JavaScript has closures... This is an extremely powerful property of the language." Okay, that's top-grade hand-waving. What he means is "Javascript is a terrible language, but it has stolen enough features from other languages that you can pull this crap off if you're incredibly careful and don't mind confusing onlookers."

Anyhow. The trick works pretty well until you start constructing Javascript functions on the fly. Let's extend our example:

Lib = function() {
    var counter = 0;
    var prefix = "The current value is ";

    var compiledfuncs = {};

    function add(val) {
        var func = compiledfuncs[val];
        if (func === undefined) {
            var text = "counter += " + val + ";";
            text += "return counter;";
            func = eval("(function func() { " + text + " })");
            compiledfuncs[val] = func;
        return func();

    function get() {
        return prefix + add(0);

    return {
        add: add,
        get: get

What the heck is going on in add()? Imagine that this is an IF virtual machine interpreter, like Quixe. We're doing just-in-time (JIT) compilation. We take a Glulx function -- that is, a string of Glulx opcodes -- and convert it into a Javascript function. The browser's Javascript engine will then convert that function into native machine code and the result will run really fast.

Since this is a toy example, our only opcode is "increase counter by N". When we see a call to add(1), for example, we convert that into this Javascript function:

function func() {
    counter += 1;
    return counter;

We eval that source (compile it) and stash the function (in case another add(1) comes along). Then we execute it.

So that's great, and it works. But if you profile this in Chrome, for example, you'll see a couple of little yellow warning flags:

  • Not optimized: Function calls eval
  • Not optimized: Reference to a variable which requires dynamic lookup

You see, Javascript is a terrible language, and its scoping model is a haystack of ideas jammed together without any planning, and it can never be fixed because backwards compatibility. Certain operations in closures are legal, but slow.

(To be fair, every language's scoping model sucks. You know how the only hard problems are naming and cache invalidation? This is naming. But Javascript is worse than most.)

We could get rid of the eval() if we used a Function() constructor:

func = new Function(text);

But then the code would fail, because the function would exist outside the library closure. It wouldn't have access to the private variable counter.

I fussed around with a couple of different solutions. I tried inner and outer closures, I tried using this a couple different ways. None of them worked. (Crockford progresses from hand-waving to passive-aggressive sniping: " error in the ECMAScript Language Specification which causes this to be set incorrectly for inner functions." You tell 'em.)

I eventually settled on this:

Lib = function() {
    var self = {};
    self.counter = 0;

    var prefix = "The current value is ";

    var compiledfuncs = {};

    function add(val) {
        var func = compiledfuncs[val];
        if (func === undefined) {
            var text = "var self = this;";
            text += "self.counter += " + val + ";";
            text += "return self.counter;";
            func = new Function(text);
            func = func.bind(self);
            compiledfuncs[val] = func;
        return func();

    function get() {
        return prefix + add(0);

    return {
        add: add,
        get: get

Our compiled function can't get access to the private namespace. We need a second namespace which can be handed in for that purpose. We'll call that self. We create self up top, and put the counter in it. We'll have to write self.counter to access it now.

To hand self in to our generated function, we call bind. This is a confusing Javascript feature which lets us glue any object in as the function's this. Then we compile it this way:

function func() {
    var self = this;
    self.counter += 1;
    return self.counter;

This is more verbose, but it works. And if we check it in Chrome's profiler, the yellow warning flags are gone.

Note that if we wanted the generated function to call private methods, we'd have to copy them into the self object too:

function get() {
    return prefix + add(0);
self.get = get;

Not too messy.

Now the real question is, does this actually make Quixe run faster? I don't know! I've started converting the code to this new model, but it's going to take more work. (The virtual machine has lots of state to shove into the self object.) The person who filed the original report got good results, but I'm not sure I've snagged the right tricks yet.

The toy example in this post seems to run a little slower with these changes. That's not encouraging, but of course it's not a realistic work model. Hopefully I'll have real results in a few days.

UPDATE, May 29th:

Got an updated Quixe branch working.

Turns out the func.bind(self) plan is terrible. Performance doesn't improve as much as it should; on Firefox it actually gets worse.

Instead, I've given each generated function an explicit self argument, and called them all as func(self). With this plan, Quixe is 65% faster in Safari, 55% faster in Chrome, 10% faster in Firefox. Woot!

Tagged , , , , , | 11 Comments

Hadean Lands on the Humble Store

I am happy to announce that Hadean Lands can now be purchased directly from the Humble Store. (It's currently listed under New Releases, though of course it will scroll off that page pretty soon.)

This is the same version that's been available all along. (No, I have not done a bug-fix release. I know, it's getting to be time...)

The Humble Store is fixed-price, not pay-what-you-want. The win is that 10% of proceeds go to charity.

You can still buy HL through the pay-what-you-want widgets on my web site. It's still in the Adventure Gamers Store. And of course the iOS version is still available from Apple.

(Have you voted for Hadean Lands on Steam Greenlight?)

Posted in Zarfplan | Tagged , , , , , , , | Leave a comment

XYZZY Awards

The XYZZY Awards for best interactive fiction of 2014 have just been announced. I'm happy to say that Hadean Lands won in four categories: Best Puzzles, Best Setting, Best Implementation, and Best Use of Innovation.

The overall Best IF Game of 2014 went to 80 Days, which absolutely deserved it. It was a tightly-contested award -- Hadean Lands was in the running, along with Kevin Gold's Choice of Robots, Porpentine's standout Twine work With Those We Love Alive, and IFComp winner Hunger Daemon by Sean M. Shore.

Winners in other categories included Lynnea Glasser's Creatures Such As We, Ade McT's Fifteen Minutes, michael lutz's the uncle who works for nintendo, and a symbolically satisfying tie between Twine and Inform 7 for Best Technological Development.

Here's the full list of winners and finalists. Congrats to everybody!

Since this is my brag post, I'll also note that I'm working on a new IF game! This will not be parser-based. I've got ideas about cool things to do with a touchscreen other than typing a lot.

No other hints right now. Stay tuned for more information.

Posted in Zarfplan | Tagged , , , , , , | Leave a comment

Various world models in IF

Another question from the tweetzone: "What are the significant differences for object/rooms + hypertext/choice vs parser + web?"

Here's (more of) that strand(s) of conversation:

I want tools to create a hypertext based game that still has a room and object model for the engine. Any suggestions? (@KalevTait)

I've done it (in Glulx) but the game design space is poorly understood. (As compared to parser+object model.) (@zarfeblong)

this just means it needs more research (@emshort)

What are the significant differences for object/rooms + hypertext/choice vs parser + web? Maybe I’ve misunderstood. (@jurieongames)

Emily's further responses:

parser + web = you still type. world model + choice = you're selecting what to do from options based on model (@emshort)

Oh, and I guess choice-based games tend to come from a CYOA, paragraph-based design approach? (@jurieongames)

often. even if they don't, enumerating all the options that would exist with a parser gives you a too-long list (@emshort)

so you need then to build a hierarchical interface or else have a smaller tighter verb set, for instance (@emshort)

I agree with Emily here (as usual), but I want to back up and talk about ways I've approach IF design.

Parser IF is a well-explored field, which started with Adventure and expanded through generations of... Adventure imitators. That's not a criticism, that's history. The MIT gang tried to make another game like Adventure; so did Scott Adams, albeit with more limited resources; so did other groups. Then in the 90s, many hobbyists tried to make more games like the Infocom set (etc), and built tools to accomplish that. What rooms are, what objects are, what the world model is, what interactions mean -- all go back to Adventure in a very direct line. I'll assert that 75% of the game mechanics in today's parser IF can be found in Adventure... in rudimentary form, sure, but present. And 75% of the rest can be found in Zork.

That's the form I grew up playing, and then writing. Not the only form, but the closest to my heart. But -- when I build a different kind of game, I'm not trying to approximate parser IF in a different-shaped bottle.

Like I said up top, I've created a hypertext game with a room and object model. That's Bigger Than You Think, a game that I wrote for the 2012 Yuletide fanfic exchange. This has a hybrid UI: you can click on links or type (single) words at a command prompt. It has rooms and an inventory.

(I'm going to assume that you've played BTYT, at least a little bit. If you haven't, hit the link and flip through a few moves.)

BTYT is not a parser game turned hyperlinky. I didn't design it that way and the underlying assumptions don't match the Adventure model. It's much more like a CYOA game-book with added inventory features.

Let's look at rooms. BTYT seems to offer a classic Adventure-style layout: each "page" is a location, and you have a choice of exits, each of which leads to a new location.

You'll quickly notice, however, that there's never a choice to "go back where you came from". Nor is there a sense of stopping to take action in a given location. A page is really an event, part of the story of an exploration into a cave. (The narration of the event includes entering and looking around.) You are always moving towards an endpoint; you cannot explore at will, except by using the "start over" option.

So the model is really The Cave of Time, the first of the "Choose Your Own Adventure" gamebook series. That book offered the notion that each page was a physical location in a cave -- but it didn't really stick to it, because pages in a book just don't represent Adventure rooms very well. Pages want to be sequenced events. (Later books in the series entirely discarded the idea of representing a physical maze. Our common notion of "CYOA game" is all about branching events, not branching tunnels.)

What about inventory? If you poke down certain branches of BTYT, you can find some objects to take -- a crowbar, a rope; "medium-sized dry goods" in the Adventure vein. But again, these are not manipulable objects in an Adventure-style world model. You can't put them down or try different actions with each one. Instead, they become an extra set of CYOA-style options -- available to try in each scene, until you find the right situation for each one.

(Note that the game header lists the current movement choices on the left, and the current inventory choices on the right.)

Paper gamebooks can't easily offer an inventory in this way. It's the experimental facet of BTYT. But it's not an Adventure-style inventory. I designed it to fit in with the CYOA model; it's what a gamebook choice-list would look like if it could be dynamic.

Seltani takes yet a third approach. Seltani is a hypertext environment inspired by Myst Online. The Myst games tend towards richly detailed environments but a sparse inventory system. You are expected to spend your time exploring the world, and then manipulating pieces of it "in place". You don't typically apply arbitrary tools to arbitrary targets.

Therefore, I wanted to create a choice-based system in which nodes are typically locations. You'll stop in a location to examine many of its parts, and perhaps pull some levers or turn some knobs. This required a multi-window UI: an environment window which describes what's around you, a detail window which describes the particular item you're paying attention to, and a history window in which events (and environmental changes) scroll by.

Note that this is different from the Adventure UI, where everything happens in a "history window". In parser IF, looking and examining are actions -- the response is a description at that moment. If you LOOK twice in a row, the world may have changed. Seltani's descriptive windows, in contrast, are always current.

(Some parser IF has tried permanent LOOK or INVENTORY panes. The Scott Adams games of the early 80s worked this way, for example; Beyond Zork also offered such a mode. However, these experiments have not caught on in the parser-IF community.)

Seltani has something like a world model, although it's very flat. It's got worlds, locations within a world, and that's about it. The built-in infrastructure is mostly about the portals between worlds rather than world contents.

Significantly, Seltani doesn't have objects or an inventory system. Why not? Well, say it did. What would you do with objects? "Actions" in this UI are hyperlinks which either examine or manipulate the world. If you carried a sword from the Living Room to the Kitchen, and a "sword" hyperlink were (somewhere) available, you could reasonably expect to examine the sword. But that's all! There's no way to express dropping the sword or smashing a window with it.

I avoided this problem in BTYT by discarding the idea of "examine". In that game, a "sword" hyperlink always means "take the sword" (when you first discover it) or "use the sword on something here" (if you're carrying it). I restricted the design to have at most one whackable target per location -- and you never drop anything except in its final use-location. Furthermore, BTYT is made of simple objects which do not require close inspection. So a single-link inventory works okay. But Myst games are full of detail; the BTYT model would never have worked for Seltani.

This is not to say the Seltani model can't be extended that way. The engine supports an extra "world pane" which remains visible throughout a world. The world designer could put an inventory list there. (Or, equivalently, tag an inventory list onto every location description in the world.) You'd have to decide what it meant to click on an inventory link in each location -- essentially inventing your own world model.

What you can't do is carry "objects" from one world to another. Seltani assumes that worlds are independent. It's hard enough rigging up one Age without figuring out how to respond to artifacts from every other Age!

(No, worlds aren't necessarily independent. You can build two Ages which are interconnected and share data. But that gets beyond this scope of this post.)

I should also note that the Seltani model can be extended in the other direction, too. You can build CYOA-style (or Twine-style) worlds, where nodes are treated as events rather than locations. To do this, you have to avoid relying on the event window. You also have to also lock out Seltani's multiplayer features, since a group of chatting players are implicitly presenting events in a location.

I've talked about two of my choice-based game designs, and how I try to craft each one so that the game and the UI match up.

One sometimes sees attempts at "hybrid" UIs -- trying to present a text game with both command-line and menu-based interfaces. You won't be surprised to hear that I have no patience for such experiments. I'd ask myself: does the game's experience depend on the parser interface? If it does, it's required! And if not, get rid of it! -- it's a waste of your time and the player's.

(But what about BTYT? I'll tell you straight up: the command-line interface on that game adds nothing. I should have gotten rid of it. I left it in to support MUD play via ClubFloyd, which is a very minor use case -- it should not have influenced me.) (Anyhow, the right approach would be to update Floyd to support hyperlink input. The RemGlk library makes this possible.)

The same goes for attempts to "port" parser games to a choice-based UI. I have nothing against remakes of a game. (Coloratura, for one example, is a parser game that was remade by the author in Twine.) But this is a design process, akin to translating a book into a movie or vice versa. You can't slap a new UI system onto a game and expect it to be "the same game but now accessible to more people".

I intended to wrap this post up by responding to Jon Ingold's post: Parser as Prototype: why choice-based games are more interesting.

My reaction is "how fundamentally wrong-headed". But if I try to support that, I will need so many qualifiers that I'll fly into the weeds and sink. I mean:

  • The post is from a year and a half ago, which is decades in Internet Time
  • Jon recently commented "Def not talking about approximating a parser game. Rather, parser was a step one to being able to design choice games this way" (@joningold)
  • Jon's design process is his process and I'm not going to step on it
  • The post is about the Sorcery! game series, and I haven't even played those
  • I don't assert that parser IF is some golden standard which other models need to approximate (much less measure up to)

So there's no fundamental disagreement -- rather, I think the post is weirdly framed to make an apology which doesn't need to be made.

I have played a lot of 80 Days. I can confidently say that it's not an approximation of a parser game. 80 Days is its own kind of IF, and its interface fits it very well. It doesn't have a "world model" in the sense of a space to manipulate objects. Its world model is, you know, a model of the world -- big and round and covered with cities -- and your inventory is meaningful in the space of planning your trip.

Note the word "planning". Much of the gameplay of 80 Days involves collecting, buying, or selling objects. But they are not used in the way that, say, Hadean Lands uses objects -- as mysteries whose places in the world come as crucial discoveries. Rather, their value is cumulative and largely predictable. When you buy a didjeridoo, you know where it's most profitable to sell it. If you miss that stop, well, you can probably sell it elsewhere -- and there are other ways to get cash anyhow. Other objects act as bonuses in the mini-game of learning new routes; but again, there are lots of ways to learn routes, and your piece of shortbread is never going to spell the difference between success and failure.

While I was finishing this post, the XYZZY Award finalists were announced. As it happens, Hadean Lands and 80 Days were each nominated for five awards.

It would be meretricious to explain that this will be settled by battle royale of alchemical Kaiju versus Victorian steam-mecha, as piloted by myself and Meg Jayanth. Mostly because With Those We Love Alive was nominated for eight awards, so you have to amend the battle with Porpentine and Brenda Neotenomie drawing mystical runes all over both of us, which makes it all confusing and hard to film.

I will instead wish good fortune to all the nominees, including the above-mentioned and also Kevin Gold, Sean M. Shore, A.D. Jansen, michael lutz, kaleidofish, Sam Ashwell, Steph Cherrywell, Emily Short, Lynnea Glasser, C.E.J. Pacian, Jason Dyer, Ade McT, Carolyn VanEseltine, Simon Christiansen, Mæja Stefánsson, Graham Nelson, Juhana Leinonen, Jim Munroe, Chris Klimas, Nicky Case, Kateri -- whew! I hope I didn't screw that list up.

Tagged , , , , , , , , , , , | 3 Comments

Designing alchemy in a puzzle game

A question about Hadean Lands from the tweet gallery: "Have you written anything about how you approached designing the alchemical system?"

Excellent question! The answer is "No, but I should, shouldn't I," yes okay. (Thanks @logodaedalus.)

My twitter-sized reply was "Sound cool while supporting the puzzles," but I can say more than that.

(Note: I will start this post by talking about HL in generalities. Later on I'll get into more spoilery detail about the game structure. It won't come down to specific puzzle solutions, but I'll put in a spoiler warning anyway.)

The keynote for HL's system was the alchemy puzzle in The Dreamhold. The Dreamhold lab had just two ingredients and three actions to take, but it felt like a dense explorable territory.

Dreamhold's principle was that any action you try on a given substance will produce a new and interesting result. And then you can try new actions on that! Obviously this exponential expansion has to be tied off pretty soon. Many of the combinations converge to common outcomes. The tree is only a few steps deep, really. (I think there are twelve possible substances to find.) But it's enough to give a sense of experimentation and discovery.

For HL, I wanted that sense, but bigger. Did I succeed? Heck no! It was an impossible goal. HL has forty-odd starting ingredients and thirty-odd magic words (not to mention other ritual actions, and the environmental influences, and...). Just providing the first step of a dense exploration tree would be... well, somebody might do it, but I wasn't going to.

So I developed HL with a less ambitious principle: you get recipes. When following a recipe, you should always be able to tell a right action from a wrong one. That is, a particular magic word will produce a unique response if you use it at the right time -- different from the response you get if you use it at the wrong time. The differences may be slight, but they're perceptible.

I didn't want to entirely crush the spirit of experimentation. So the second principle was: recipes aren't everything. The opening puzzle demonstrates this, and various later puzzles require you to substitute or invert ritual elements. I set up parallel structures and oppositional structures to make that make sense.

I think everyone agrees that I didn't hit the perfect balance. The game starts you with an off-recipe puzzle, but there's too long an interval before the next one. In between are lots of recipes that you have to follow perfectly; you lose track of the initial lesson. But most players were able to get onto the right track (or jump off the wrong one, if you like).

A followup question was "Did you have alchemical dynamics in mind when making the puzzles?" The answer is... mixed.

(Spoiler warning for the overall game structure, starting here!)

The core arc of HL is the limited supply of four key elements. You need all four for the endgame, and there are intermediate goals which require two or three. So initially you can only accomplish one intermediate goal at a time; then you have to reset.

That was my initial puzzle framework. I wrote that down, and then started complicating it. What ritual needs elements X and Y? Is it the ritual itself which needs those elements, or do I invent a sub-ritual which consumes X and provides a related X2? And so on.

At this point, I was inventing puzzles and alchemical mechanics in parallel. Or rather, I was going back and forth -- every decision on one side firmed up the possibilities on the other side. I needed puzzles whose solutions would seem reasonable; I needed mechanics which would feel like parts of a plausible magical science.

You'll note that I didn't start by creating a complete magical system and then deriving puzzles from it. Nor did I invent a bunch of puzzles and then invent alchemy that could solve them. Neither approach has ever worked for me. So if you're hoping for a complete, consistent model of HL alchemy -- I'm sorry. No such thing exists.

I knew that it couldn't exist, of course. That's one reason that the alchemy is described as being eclectic and syncretic. It fits nicely with the social background, too. The real-life British Empire did steal artifacts from all over the world. I evolved the idea that a magical British Empire would lift occult knowledge from every place they conquered, and jam it all together without regard for consistency or context!

(We assume this made them better at conquering. The game doesn't touch on much history, but references to the "East Empire" imply that they've got a firm grasp on Central Europe, and no doubt the New World as well. If I were a better writer, I'd have built a story about the Navy running into aliens and trying to treat them colonially... oh, well, room for a sequel.)

(There will be no sequel. That was a joke.)

The point is, I could make up whatever alchemical rules I wanted. I tried for a balance -- consistency in some places, chaos in others. I could draw on mythical, mathematical, or religious sources without having to be accurate about any of it. Convenient!

Back to the puzzle construction. As I said, there were a few key resources whose scarcity determined the game arc. Then I invented more resources -- both ingredients and formulae -- which either resulted from or combined with the key ones.

This could itself have created an ever-expanding tree of dependencies. But I constrained it, or at least bent it back on itself, with a third principle: everything in the game should be used at least twice. Ideally, in slightly different ways.

A naive adventure game uses each item exactly once. Indeed, many graphical adventures remove things from your inventory once you've used them successfully. This cuts against your sense of immersion -- not because of the anti-realism, but because you wind up watching the game mechanics rather than the game. An object disappearing (or being checked off) is a better signal of progress than the response of the game world. Text adventures don't have this disappearance convention; nonethless, the player learns to keep track of what's been used and ignore it thereafter.

I would rather teach the player that there's always more to learn. You may think you understand an item, but you still have to keep it in mind for future use. You have to keep everything in the game in mind at all times. This is the underlying challenge.

So I went over and over the list of rituals, looking for singletons. Magic word used only once? Work it into a new ritual. Alchemical potion only solves one puzzle? Invent a new place to use it. This added a richness to the mechanics. Two uses of a reagent imply there must be more; you have the sense that there must be underlying laws to explain it all. This is, as I said, an illusion; but it's a well-supported illusion.

Of course, it added up to a gob-smacking number of puzzles. Fortunately (or perhaps not), I was blessed with a very large list of formulae, resources, and recipes to scatter around the Retort. I could "use up" these extra puzzles as obstacles to various resources. (Thus all the locked cabinets.)

Also, since these puzzles weren't involved in the key resource plotline, it was okay if they had multiple solutions. (Some of the cabinets can be opened two or three ways.)

The final principle of Hadean Lands: involve all the senses. Let me go back to a line that I quoted in 2010, explaining the HL Kickstarter:

"If a witch could teleport (a thing that seems impossible, but I could be wrong), it would involve hours of preparation, rituals, chanting, and filling all the senses with the desired result until the spell would work in a blinding explosion of emotional fulfillment." (Steven Brust, Taltos)

Magic should be a transcendent experience. I tried to describe the effects of your rituals in colors, textures, sounds, scents... even the words that you speak are given synesthetic weight. Not to mention the ineffable air of things going wrong or right (so useful for cueing mistakes).

Of course, an adventure game involves lots of repetition, and nothing wears out faster than a repeated sense of transcendence. (Except maybe humor.) I dodged this problem with HL's PERFORM mechanic. When you PERFORM a known ritual, it doesn't repeat all of the descriptive text; I kept the output bare and mechanical. You're not reading it anyway! You just want to know whether the ritual succeeded. This preserves your sense of involvement with new rituals.

(Admittedly this falls apart when you're failing at a new ritual. That's a somewhat repetitive experience -- inevitably, I think.)

So there are my principles of magic design. I don't suppose I sound like a Hermetic occultist. I hope I do sound like a writer or designer describing his craft, because that's what this is. A lot of fussy details and a clear plan, is all.

Like the man said: writing is the art of causing change in a consenting reader, in accordance with the writer's will. You gotta be pragmatic about that stuff or you'll get nowhere.

Posted in Zarf on Games, Zarfplan | Tagged , , , , , , , , , , | Leave a comment

Why it takes longer than you think

In case you're wondering, nobody hassled me about how long the rewards took. Apparently you folks really were in it for the game -- or to support me, which is even nicer.

However, I bet there are people out there who are working on Kickstarters. And they should be warned: it always takes longer than you think. To substantiate this, here's a timeline of Hadean Lands work that came after the game shipped.

Note that I did lot of reward design in December, but didn't order the stuff until early January. That's because I knew I would be out of town for the last week of December. I didn't want expensive parcels arriving when I was gone.

  • Oct 30: Hadean Lands goes live for sale. (I won't describe the whole monkey dance of sending out iOS gift codes. Too painful to recall.)
  • Oct 31 to Nov 3: Catching up on backers who had problems getting the game, or who sent in late Kickstarter surveys. Also general PR work -- answering emails, posting on every social network I know.
  • Nov 5: Submit iOS app version 1.1. (Better iPhone 6 support.)
  • Nov 7 to 10: Toronto trip for WordPlay. (File under "marketing".)
  • Nov 10: Release iOS app version 1.1.
  • Nov 13 to 17: New York trip for Practice. (File under "networking".)
  • Nov 30: Finalize book design; order proofs.
  • Dec 2: Finalize postcard design; order postcards.
  • Dec 6: Get first proofs of the book.
  • Dec 8: Finalize map poster design; order proofs.
  • Dec 12: Decide the books are too large. Reformat smaller, order more proofs.
  • Dec 19: Submit iOS app version 1.2. (Save-file import and export.)
  • Dec 25 to 31: Out of town. Not thinking about HL.
  • Jan 1: Release iOS app version 1.2. (I didn't want to release this while I was gone, either.)
  • Jan 2: Order books.
  • Jan 3: Order posters.
  • Jan 6: Look into CD pricing.
  • Jan 11: Finalize CD design; order CDs.
  • Jan 21: Positive Slate review! (And PocketTactics too.) Suddenly I am back in PR mode.
  • Jan 22: Argh, half of the posters are misprinted and not usable. Contact customer support and ask for replacements.
  • Jan 24: Post Steam Greenlight page for HL.
  • Feb 1: The Month of Postage begins. (Assume days and days of sticking labels on things.)
  • Feb 17: Haul books and posters to the post office.
  • Feb 27: Haul half the CDs to the post office.
  • Mar 3: Haul the rest of the CDs to the post office.
Posted in Zarfplan | Tagged , , , , , , | Leave a comment

The Adventure Gamers Store is open

The season of GDC-and-PAX is upon us, which means more gaming news than any one human can hope to digest. And yet, I will burden you with a couple more snippets.

The site, which has been reviewing adventures in various forms since 1998, has opened a web storefront specifically for adventure games. Hadean Lands is in the launch lineup, as are several other indie highlights: Dominique Pamplemousse, Lumino City, stacks of Wadjet Eye and Daedalic titles, etc.

( gave Hadean Lands a super-nice review back when I launched.)

Note the Adventure Gamers Store currently only offers Windows versions of these games. (They say they hope to add Mac/Linux in the future.) Also, everything is currently priced in Euros. (You can buy from the US or anywhere else, don't worry.) I've set the HL price at €4.39, which makes it a fractionally better deal than the $4.99 price I've got everywhere else. Snap it up before the winds of currency conversion shift!

And in other news about places that sell HL...

The Itch.IO site has just announced that they will start taking a share of game revenues. (For most of their history they have been a completely free service.) This change will happen on March 23rd.

Unlike most platforms, they are going to let the game author decide what cut Itch takes of their games. They suggest 10%, but the author can move that slider anywhere between 0% (author keeps all the loot) up to 100% (donating all revenue to support Itch).

This is a sweet idea, and very much in the spirit of the Itch service. I am happy to support it by offering them the same 30% taken by Apple, Steam, and (for that matter) the Adventure Game Store. You can buy HL via Itch here.

Tagged , , , , , , , | Leave a comment

Mazes from the depths of time

Occasionally someone asks me about porting System's Twilight to a modern platform, because setting up a Mac emulator is a pain. I figure that someday the Internet Archive's Software Library will have it, and I'll just point there.

(In fact JSMESS already supports early Macs, but I don't know how to set it up for a single game on my web site.) (No, this is not a task I intend to tackle right now.)

Anyhow, I started checking the status of the Software Library last night, and got distracted looking through the Apple 2 section. I played a little of this and that -- games I remembered from my childhood -- and then my attention was snagged:

Penqueriel Mazes (19xx)(Sadistic)

Yes, that's me.

I don't remember when I released this disk image. Somewhere in the 1982-1985 range, certainly. The mazes were designed earlier, on paper. I got the notion to implement them in interactive form. Then, no doubt, I dumped them on some modem pirate site in exchange for download credits.

What can I say about these things? They exist in the series of "Praser mazes", a label which I've used for puzzle and maze concepts since way back. Praser Maze #1 is justifiably lost, as are many of the later entries, but Praser 5 (word puzzle, reimplemented for Z-machine) and Praser 12 (non-interactive hunt-style puzzle) are on my web site.

The term "Praser" comes from a dream I had when I was a kid. The dream Praser-maze was my archetypical ideal of maze-puzzles: an inhabitable world of hidden doors, garden paths, elevators, subways, and so on. Really, there's a reason that Riven became my favorite adventure game when it appeared years later.

(I don't remember why I used "Penqueriel" in these programs instead of "Praser". Sounded better, I guess. Later, I named my TinyMUD home base the Penqueriel.)

Select "keyboard" mode in each game. Movement is with the IJKM keys. Nobody told me that WASD is easier on the fingers.

Both mazes are hard, but solvable with a lot of experimentation. Thirty years ago, I had the solutions memorized. Today, I haven't re-solved them.

As you can see, my teenage sense of puzzle-design was on the bastardly side. Maze #2 is unfair by any reasonable standard; it's a maze with invisible teleporters, and the only approach is to map it. Maze #3 is more interesting. You can carry up to two colored keys and store a third in the storage box. There are colored gates and one-way gates (and elevators, boat-docks, bridges, etc). Since Apple hi-res graphics offered only six colors, I had to resort to stripes for the seventh key type!

I was clearly fascinated with pushing the form as far as it could go. I was aware of the limited viewport -- I put amusing scenery within viewing range and hid important color-sources outside of it. I was careful to construct consistent scenery (in the apparently-isometric, actually-2D map). I built a scenic overlook, a bridge mini-maze, and some waterfalls. At one point you get a glimpse of the Promised Island where every key-color lives, but you can't get there.

(It's not actually isometric projection, right? What do you call that -- "cabinet projection"?)

I implemented these games in 6502 assembly, although the title screen is BASIC. (Someone came along later and added a pre-title "crack" screen, because somebody always does that. Of course I released the games without any kind of copy-protection. You can hit ctrl-C at the title screen and mess around however you want.) (You might have to blindly type TEXT after interrupting the HELLO program.)

I was proud of many of the tricks I came up with. Look at the way I correctly handle being over-or-under a bridge in Maze #3. (There's no visual distinction, but you can only leave on the same path that you entered on.) But the big trick, clearly, was faking an alpha-blend by flickering between two images. That's how the title menu places an impossible seven lines of text below the graphics. (Apple hardware only supports four lines of text there!) (Bitmap fonts were way beyond my capabilities.) Similarly, the "fade-in" of graphics elements when the title screen appears.

I used the same trick to "composite" the stick-figure protagonist with the background in Maze #3. (I could have made the screenshot above an animated GIF to depict this, but I didn't. You're welcome.)

I have not yet located a copy of Maze #4, which was much prettier. (I think I used double hi-res graphics, and designed some garden sculpture.)

And now, on an entirely unrelated topic:

(from The Sapphire Siren, Nictzin Dyalhis, 1934)

Tagged , , , , , , , , | 5 Comments

Trinity: design ruminations

This is not a detailed review of Infocom's Trinity, because Jimmy Maher has just finished that job. His sequence of posts (1, 2, 3, 4, 5, 6, 7, 8, 9) puts the game into its context in Infocom's history and, more broadly, in the history of the Atomic Age (remember that?) and the Cold War. Go read.

Inevitably Maher comes around to the question of the ending -- the "...what just happened?" denouement. (You can read just that one post if you're familiar with the game.) It's not the first time, of course. Maher links to a Usenet thread in which we went 'round this topic in 2001.

It's generally agreed that the plot logic of the ending doesn't really hold together. In fact, my teenage self was moved to write a letter of complaint to Infocom! I received a gracious response -- I think it was written by Moriarty himself -- which basically said "The game ends the way we felt it had to end." Which is unarguable. (This letter is in my father's basement somewhere, and one day I will dig it out and scan it with great glee.)

But today I am moved to be argumentative. If I were the author of Trinity, what would I have done?

(Oh, sure, I'm being presumptuous too. All due apologies to Moriarty. But we're both thirty years older; we're different people than the author and player circa 1986. It's worth a rethink.)

(I will assume that you've played the game and read Maher's post. If not, massive spoilers ahoy.)

As everybody has pointed out, Trinity is already constructed in the language of whimsy and metaphor; it starts out with a Lewis Carroll quote and builds from there. So expecting rigid logic is a fool's errand. Nonetheless, I do want a story to make sense when read at face value. (James Nicoll: "I don’t mind hidden depths but I insist that there be a surface.") Or, if the logic goes all Looking-Glass, it should do so in a thematic way.

Trinity offers the notion that the first atomic bomb would have "blown New Mexico right off the map" if we hadn't sabotaged it. Atomic bombs are vastly more powerful than we think. The little 20-kiloton blast that 1945 witnessed was "quantum steam", a side effect of changing history from a catastrophic New Mexino disaster to the timeline we know.

Maher discusses this in terms of eternal tragedy. Fine, I'd buy that -- except that it matters that atomic bombs don't work. Or work differently. Oppenheimer and Teller were wrong! All the physicists since then have been wrong. You can't just drop that into the story and not care what it means. Politics: all the mad calculations of MAD were orders of magnitude off-true. Science: the notion of fusion power, whatever that's worth, is built on quicksand. That's not a theme of "history is inevitable, we have come full circle" -- it can't be, because our history isn't what we think!

Or else the game isn't even about us, but about some other universe full of people. Sucks to be them.

But how else could the story have been cast?

Trinity could have followed through on its implied promise: you will prevent Trinity. Thus you prevent Hiroshima and Nagasaki; and the nuclear detente of the Cold War; and the envisioned nuclear conflict which ends civilization. A game which goes down this road is clearly pablum. It trivializes every triumph and disaster of our postwar history with a jovial "Well, don't do that then!"

Alternate history is tricky at best. We've all seen "if this goes on" think-pieces, which project some pet peeve into (inevitably) some variety of jackbooted dystopia, all in three smug pages and a glowering byline. They're laughable. You can just about build a respectable novel this way, if you spend the pages to develop an actual world and characters; if you have the human insight of an Orwell or a Walton. Infocom's shot at this was of course AMFV, and we generally agree that it didn't work. The world they packed into 256k of Z-code was just too sketchy.

For Trinity, whose body was a solitary metaphorical puzzle-quest, to develop a vision of a nuclear-free utopia in the last scene -- it would be a joke. We'd have no reason to care, and no reason to believe it beyond the author's "I said so." Scratch that plan.

Trinity could have ended by snatching the candy out of your hand. You begin in our history, foreseeing a nuclear war. You try to sabotage Trinity to prevent it. But you cannot: the Laws of Time (or whatever) are immutable. Thus, all comes to pass. We got the Bomb, they got the Bomb, we are rushing towards the end.

This would be bleak. (Bleak is already on the table, of course.) It would fit Maher's discussion of the moment of the abyss, the Great Change in the midst of inevitable tragedy.

But, on the other hand, you'd have to make it work as a game too. It's hard to make failure work as a satisfying ending of a puzzle-quest. Possible, of course! But Infocom had already done Infidel (with mixed success, although teenage-me was satisfied). Repeating that ending would make it seem even more of a gimmick.

You'd have to rearrange the ending, anyhow. Infidel works because the final puzzle has powerful narrative momentum (Indy always finds the secret treasure!) and a direct link to the tragic ending (the tomb has One Last Trap). If Trinity's final puzzle is sabotaging the bomb, you're going to sabotage that bomb. Any other outcome would feel like a failure to solve the puzzle. If the puzzle were to reach the bomb -- and reaching it truly felt like a climactic moment -- then the player might accept some other denouement. But, more likely, it would feel like a cheat.

A variation would be for the protagonist to refuse to complete the sabotage. It's hard to imagine the player buying into this, though. You'd have to spend the whole game arguing for the preservation of history. Sure, erasing it all is empty polemic, but -- faced with the awful alternative -- the player engaged with the story has every motivation to try it.

So scratch that too.

We might leave the final choice unresolved; leave the future in the protagonist's hand, and thus in the player's imagination. This avoids both the unsatisfying failure and the just-so story of success. If done barefaced, though, it would be just as unsatisfying as an unsolved puzzle.

One can imagine ways to make it work. Perhaps build the entire story around choice, with visible glimpses of alternate outcomes for each scene. More ambitiously: have every major puzzle embody a choice, so that multiple solutions serve as multiple paths-not-taken for the story. These wouldn't have to form an exponentially-branching tree; a collection of independent (but irrevocable, in the story-world) choices would make the point. Have the paths-not-taken hover and haunt the player. Now the player, facing an unknown and unresolved ending, will do the work of imagining the alternatives for us. Or so we hope.

Being me, I have to suggest the indirect, metaphorical ending. You leave the conclusion open to interpretation: what was dream, what was metaphor, what was the hallucination of a brain being incinerated in nuclear fire?

Infocom went some distance in this direction, or we wouldn't have long blog posts about the ending to begin with. But I'd say they provided a single clear narrative for the ending -- terse, but clear. Other aspects of the story (such as the time-loop nature of the Wabewalker and their corpse) are left more open; to me, more satisfyingly open.

This stuff can be made to work, if you spend the game building up plausible hypotheses. And the author has to have a logical framework, even though it's not explained to the player. I'll admit up front that I have such a framework for Hadean Lands, and no, I won't talk about it... But I'll go through the process of imagining what might underlie this alternate Zarfian Trinity.

The hallucination-while-dying gag is even more of a gimmick than the Infidel ending. Go ahead, accuse me of using it anyway. Well, if Terry Gilliam can pull it off after Ambrose Bierce closed the book on it... But we won't try to repeat it here.

Nearly as common is the you-are-not-who-you-think-you-are gag. This, at least, can be varied to suit the storyline. We might decide that the protagonist is a guardian of history, a peer of the giggling narrator. Or that the protagonist is the giggling narrator, talking to themself across the timeline. Or maybe the protagonist is Oppenheimer?

Not Oppenheimer, let's say, but all of the innocent (or guilty) bystanders in each of the history scenes. You are not the London vacationer; you take their viewpoint temporarily, up to the point where they enter the explosion. Then you take the viewpoint of a Russian technician, and so forth. The realization that you are in a different body in every scene would arrive gradually. This would require a different approach to some scenes, of course. (There is no NPC viewpoint in space, and the Bikini test -- the dolphin perhaps?) Then, at the Trinity site, you are Donald Hornig, babysitting the equipment until -- contra real history -- you/he find yourself at risk. There's your crucial, personal choice.

I rather like this plan; it gives us a chance to read the story from a real person's perspective, rather than the Infocom-style everynerd. (Of course, at the time Trinity was being written, Hornig was teaching down the street at Harvard! There's a real-people-fiction discussion to be had there, but I won't get into it.)

All of these storytelling gimmicks, while certainly gimmicks, serve to refocus the player's attention on the story. That's why I keep coming back to them. Rethinking everything that's happened from a new perspective is, well, thinking about everything that's happened! And when your ending is difficult to accept, it always helps for the player to figure it out rather than being handed it on a plate. It gives 'em a sense of investment, right? That's the point of interactive narrative in the first place.

Finally (for this post) we have the ending in which you choose between our history and some more terrible one. This was Moriarty's option, and I think it's workable. My objection is to how Trinity framed that choice: as a forked history in which neither choice is really our world.

Can it be reframed? Not, I think, with "sabotage the bomb" as the final puzzle. If the winning outcome is our world, the bomb must go off as planned. Perhaps the player discovers some deeper threat -- aliens? time police? paradox itself? -- and must divert, at the last moment, from sabotaging Trinity to defeating this enemy.

"Paradox itself" is a tidy way to frame the threat: the bomb must go off, or history evaporates in a puff of logic! Except that this really falls back under the "immutable Laws of Time" scenario we covered earlier. It comes off as a cheat.

No, we need an enemy that the player will feel good about defeating. Aliens are too out-of-the-blue. Nazis are too Godwin (even in a WW2 game scene). Time travellers could work; a faction from the collapsing Soviet Union, perhaps. (Science fictional in 1986!) Say they pose an extreme threat -- say, a plan to change the outcome of the war, followed by a joint Nazi-Soviet hegemony of the world?

This would have to be developed at some length, and again, it's unclear whether Infocom had the resources to pull off a solid alternate history. But it's the option I'd try. If, you know, I knew anything about history.

Posted in Zarf on Games | Tagged , , , , | 16 Comments

Sweet formatting for Inform 7 source code

One of my limited, high-level Kickstarter rewards was "The Hadean Lands source code, in book form". I had these printed in January, I mailed them out last week, and some of my backers have already received them. They're a hit!

@zarfeblong Hadean Lands source book looks fantastic. If I7 source is readable in book form, this is about as good as I'd expect it to look. (-- @dan_sanderson)

My Hadean Lands Source Codex book arrived. Wow - really nicely done. I'm in love with this strange artifact. Thanks @zarfeblong! (-- @telehack)

@zarfeblong Book received, really nice! What service did you use? Did I7 output source that nice-looking or did you post-process a lot? (-- @dan_schmidt)

That last is an excellent question. Everybody deserves nicely-printed source code, so here's how I did it.

(Spoiler: here's my Python script.)

Inform 7 syntax-coloring is a solved problem... sort of. The I7 IDE does it, right? Syntax-coloring plugins have been contributed for several editors and tools. But, of course, none of them were exactly what I wanted. So I had to grab a shovel and start digging.

(Maybe I should avoid that metaphor, given the past month of Boston weather. Hm.)

The most prominent syntax-coloring tool that I'm aware of is Pygments. GitHub uses it. Pygments picked up Inform (6 and 7) support in release 2.0, which is why you can visit a GitHub page like this Kerkerkruip test extension and see nicely-colored source code.

...well, sort of nice. There are some obvious problems here. The latest version of Pygments does a better job (I guess GitHub is using a pre-release version?) but it's still not ideal.

For I7, I want just a few text styles:

  • Ordinary code
  • Comments -- italics
  • Strings -- boldface
  • Interpolations (square brackets) inside strings -- bold-italics
  • Headers -- large font
  • Inform 6 inclusions -- fixed-width font

It's a little trickier because I6 inclusions can themselves contain comments and strings, so you also need fixed-italics and fixed-bold. That's still just eight styles total.

(Yes, you can further color I6 inclusions into seventeen styles based on the details of I6 syntax, but that's a terrible idea.) (I did toy with distinguishing I6 dictionary words from I6 strings, which is important for I6 programming, but I decided not to.)

Marking up I7 code this way is only moderately fiddly. (Fiddliest detail: I7 comments can be nested!) I've already written a BBEdit plugin that does it, so I just had to port the algorithm to Python and build a Pygments lexer class.

Problem solved... sort of. See, I decided to use Pygments's RTF formatter -- I wanted to generate RTF and then import it into AppleWorks. (I mean ClarisWorks. I mean iWorks. Oh, never mind--) What I found was that Pygments's RTF assumes a text-editor-like display -- all the same font, all the same font size. I had to hack around and repurpose some style attributes to get the effect I wanted.

Of course RTF is a terrible, stupid legacy format, but the Pygments people have done the hard work of figuring it out.

So, problem now solved? Well...

Here's the script I built to do the job: It contains my custom I7 parser, my custom RTF generator, my custom stylesheet, and some code to read in a bunch of files and glue them together. (HL comes as a set of nine files -- a master and eight extensions. I7 prefers one giant file, but I can't work that way.)

The script can generate colorful RTF, or plain black with only the font variations to distinguish styles. Obviously, for the book, I went monochrome.

Loading this into PagesWhatever went smoothly -- praise the little hobgoblins of consistency. However, I still had to do some hand-tuning. I added page breaks between each files. I also marked the title line of each file with a custom style, so that Pages would generate a table of contents for me. I added all the necessary fore-matter -- title page, copyright page, introduction. And then I spent a while tweaking margins and tab stops and font sizes so that the thing wasn't quite so much of a brick.

Generate a PDF, package it up, send it off to Whoops, nearly forgot the cover art... And then wait for the proof copies to arrive.

The proof copies arrived, and -- wow, they were bricks. Just because A4 paper size is a valid Lulu print option doesn't mean you want to ship thirty of them across the country. Or lift one of them, for that matter.

Also, there was an extra blank page after the title page. Yes that matters! My copyright page was on the right-hand side! All my page numbers were in the gutter!

I guess it goes to show that PDF is also a terrible, stupid legacy format. I verified with customer support that they had the same PDF I sent, and it didn't appear to have an extra blank page when they looked at it, but when it came out of their printer... oh well.

I had to reformat anyway, because A4 was hopeless. I knocked down the font size and the page size. (I settled on comic-book trim, 6.6"x10.25".) I messed with the margins some more. Magically, when I sent in the new PDF, the extra-page error went away. I'll never know why.

That's the story. Now I have Hadean Lands books. Twenty-nine lucky backers soon will too.

Tagged , , , , | 4 Comments

Forward planning for IF tools

I've been bemoaning the slightly run-down state of IF interpreter software. (The confusing font preference system in Gargoyle is just one example.) The fact is that the big surge of open-source IF activity was the late 90s and early 00s. Since then, coders have been drifting out of the community, and the ones still around have gotten lazy. (I include myself in that indictment, for damn sure.)

As a community, we do not have a tradition of mentoring and fostering new contributors to IF projects. All of our projects were made by people (most often solo developers) who got excited and wrote a whole application or library.

I like to think that we've got a good software stack, which smooths the path a little. You can write an Inform extension or a Glk library port or a Glulx engine core or a Parchment web service, and it will fit into the ecosystem. But it still starts with a person showing up with enough energy to start, build, and finish an idea. If someone shows up who is curious but not committed, we nod companionably and wait to see what happens. The results, over time, are predictable: activity slows down and stops.

With that introduction, you'd expect me to go on and talk about mentoring. But I don't know anything about mentoring. I'm one of the control freaks! I'd rather work on my own projects than collaborate.

Anybody want to think about community-building? (Hopeful look around...)

(Of course a lot of my projects are specifications and tools that interoperate with other people's code. So I kick myself in the ass and make it happen. But my natural talents do not lie in management.)

In this post, I'm going to talk about my plans as a solo IF tool developer. Warning: I will also talk about money.

I have a whole list of things I think Need Doing In IF (see footnote) but the one I intend to tackle next is Glk 2.0. This is pretty much the same Glk 2.0 plan I've been planning for years, but since it's been years, not everybody may remember it. (Or perhaps you remember it with bitterness and loathing, in which case I apologize.) In any case, I will explain it from the top.

The plan is: integrate Glk (the Glulx VM display layer) with CSS and Javascript. That is, you will be able to distribute Inform games with custom stylesheets and special display effects (see Vorple).

Why CSS and Javascript? Because they have already conquered the universe, so we might as well give in to our anger and rule at their side. Also, the most commonly-used IF interpreters are written in Javascript, which makes adding these new features trivial. (If we plan correctly.)

So how do we approach this? I'll admit up front that this plan isn't complete. This is a sketch; I have parts of it worked out.

The basic idea is to define a canonical HTML representation of Glk output. Or rather, a canonical DOM representation. (The DOM is the internal data structure that a browser builds when it reads in an HTML file.)

Currently, the Glk spec describes output in terms of windows, text, and text styles. The new spec will explain this in terms of HTML <div> and <span> elements, and the CSS classes for each one.

I don't mean that your Inform code will output HTML. For simplicity, and to maintain a clean separation of concerns, the Glk calls in the Inform library will remain the same. You'll set a style and print some text. The interpreter's job will be to either translate those calls into HTML (as defined by the spec), or do the equivalent job of text display.

Nor do I mean that interpreters will have to support every crazy CSS trick that Firefox is capable of! Far from it. The idea is this: whatever display capabilities the interpreter does have, let CSS guide where it's used.

It's easy to misunderstand this. Let me lay it out in an organized way.

  • This is a change to the way the interpreter (Glk library) manages the display, not a change to the way you write your Inform game.
    • But there will be some new capabilities available for Inform games. Mostly this will be about letting you use more styles.
  • The display of a stock Inform game will not change much. Any changes will be in the direction of more uniformity between interpreters.
  • This should not require interpreter maintainers to rewrite their code from scratch.
    • Javascript interpreters (Quixe) will work by generating HTML information and shoving it into the browser display. This is how Quixe has always worked. I'll just have to add the CSS and make some adjustments.
    • C interpreters (Gargoyle, WinGlulxe, Zoom, Floyd-bot, etc) can continue to work the way they work, by calling OS-native text-display calls (or use SDL or telnet or whatever). However, to decide on text display attributes for each style, they should start using CSS information. I will provide a library to make this easy.
    • Alternatively, C interpreters could switch over to HTML display. That is, they could throw up an OS-native HTML widget and shove HTML into it, just as Quixe does. This is optional, but it has some advantages -- see below.
  • The new plan will initially be available through an I7 extension. I expect that some future I7 release will make it the default.
  • What new features does this plan give us?
    • A game author will be able to include a CSS stylesheet with the game. This will customize the way the interpreter displays the game.
    • A player will be able to select a CSS stylesheet as an interpreter preference. This will customize the way the interpreter displays the game (overriding the author's stylesheet if necessary).
    • There will be some way to display more and fancier styles. I know we had an argument about this a few years back; let's not restart it in this post. I haven't nailed down the details anyhow.
    • A game author will be able to include a Javascript library (or libraries) with the game.
      • For HTML-based interpreters, the Javascript will be loaded into the browser page (or HTML widget). It can then perform arbitrary display tricks. Glulx Vorple can be built on top of this.
      • For interpreters which do not have an HTML layer (i.e. old-style C interpreters), Javascript tricks will not be possible. The game will have to degrade gracefully or give up.

Where am I with this plan? Not very far. Even after all these years.

I have a roadmap. I've just finished step 1. It will be a few steps more before anybody else has to start writing code.

  1. Write a simple, dependency-free C library to parse CSS. Done! I thought this would be a weekend hack; it actually took many days of work, because CSS is just as horrible as every other Web technology. (No, I didn't search for prior art before I started hacking. Who do you think I am?)

  2. Nail down the HTML representation and the Glk API changes it will require. Think about how it affects all existing interpreters.

  3. Update GlkTerm to the new model. GlkTerm is a terminal-window library (it's built on ncurses), so it can only support a few text attributes -- boldface, underline, ANSI color. This is enough for a proof of concept.

  4. Update Quixe to the new model. (And jQuery, while I'm at it.) Quixe is an HTML-based interpreter so it will allow the full range of CSS and Javascript fireworks.

  5. Write the I7 extension that enables this stuff.

  6. Write a lot of demos. (Not just to show off! Demos will let other interpreter authors know they're hitting the mark, display-wise.)

  7. Update RemGlk and CheapGlk.

  8. Unleash my reign of terror upon the world.

Easy, right?

You can reasonably ask how long all of this will take. Especially since I laid out much the same plan at least five years ago, and then again three years ago, and I've just managed to finished step 1.

Well, Hadean Lands is done. That's a big carcass off my plate. Also, for this semester I'm spending one day a week at MIT(*) and that's a nice regular schedule for working on the project.

(* But not this week, because it snowed some. And the Red Line caught fire or something.)

It's still a lot to promise; enough that I feel queasy just posting this post. I hate making promises that I don't keep.

Thus to the subject of money.

Post-HL, I would like to work more on open-source IF tools. I would also like to work on indie games that will pay the rent. (HL does not pay the rent in the long term, despite the stellar reviews I got this month.) There's also contract work and so on. Life balance, it's hard.

One way to converge these interests: find a way to crowd-source IF tool work. But this is not an easy model. It's not a Kickstarter -- it's ongoing work, not one big deliverable. It's not exactly a Patreon, because I can't give backers early access or bonuses. (But some people try this anyway?)

I'm signed up for Gratipay, which started as a tip model for GitHub users (but now supports any developer). I haven't publicized it at all; despite this, somebody is giving me 33 cents a week. (Thanks!)

Are there any other patronage systems which you folks think I should investigate?

(Note: I am not asking for money at this time! I'm thinking about ways in which I might ask for money in the future.)

I realize this is an awkward subject. Many people support IF software. I don't want to be The One Who Gets Paid while everybody else labors away for free. On the other hand, there's a lot of work that isn't getting done; this has been true for years. I can start to unstick this, but not to the exclusion of paying work.

Furthermore, the Glk 2.0 plan isn't the only thing on my plate. I'd love to get back to Tworld (the Seltani engine). I could dig into CocoaGlk and figure out why Mac Zoom occasionally crashes (and why Mac Inform 7 occasionally trashes my skein, and maybe why it occasionally eats somebody's source code...) I could spend some time experimenting with the rule-based language idea, zog help me.

What I'd really like is a patronage-and-voting system, where people could put money into different projects, with the understanding that the ratios determine how much time I put into each one. Does anything like that exist? (No I'm not going to build one.)

...Wow, this post has wandered in circles, hasn't it. A mix of plans, promises, positions, and pleas!

I guess I'm trying to figure out where the next phase of my life falls, relative to the IF community. I have taken stock, and this is what I see. Comments welcome.

Posted in Zarfplan | Tagged , , , , , , , | 28 Comments