Gamefic

Adventure Games and Interactive Fiction

A Postmortem for Project Postmortem

by Gamefic on August 7, 2024

Voting in the ParserComp 2024 game jam ended last week. My entry, Project Postmortem, is the first game I've released using Gamefic 3.0. It's a short and simple text adventure that most players should be able to finish in ten or fifteen minutes. My main goal with it was to assure myself that the SDK project template is sufficient for building a playable game.

From a technical standpoint, I'm pretty happy with it. 3.0 fixes a lot of the flaky limitations of save/restore/undo features, particularly the ability to take snapshots of any scene type and reliably store subplot data. Subplots are robust enough to be a convenient and reliable way to organize complex stories (although Project Postmortem isn't complex enough to need them). The libraries are much more modular and extensible. Running unit tests in rspec-opal helps identify elusive bugs that only occur in Opal and not Ruby MRI.

There was one significant bug that arose early in the jam. In a multiple-choice scene, if the player entered an invalid choice, the game threw an error. (One fortunate thing: reloading the page would return to the point in the game right before the error occurred.) The bug is already fixed in both Project Postmortem and the core Gamefic library.

One common piece of feedback from reviewers is that the game is short and sparse. Guilty as charged. Now that I'm confident in the framework's stability and expressiveness, I hope to make my next project more ambitious.

Feedback also inspired me to make three major improvements:

  1. Pronouns in commands. The gamefic-standard library has always supported the concept of pronouns, but it didn't let you use them in commands, e.g., following a command like "examine the lamp" with a command like "pick it up." I started working on pronoun support a while back but didn't finish it before ParserComp. Since it was mentioned in a review, I went ahead and got it working in gamefic-standard 3.2.0.

  2. Command history. One reviewer mentioned he'd like the ability to cycle through previous commands with the up and down arrow keys. This feature was surprisingly easy to implement. It's included in react-gamefic 1.4.0.

  3. Quick and easy scenery implementation. The reason that unimplemented words suck is that they result in gameplay like this:

    > examine the painting
    
    A painting with a frame.
    
    > examine the frame
    
    I recognize "examine" as a verb but don't know what you mean by "frame."

    Even if the picture's frame is insignificant, the game should at least acknowledge its existence:

    > examine the frame
    
    There's nothing special about the frame.

    Much like Inform, Gamefic lets you create Scenery objects that respond to examination but are otherwise nonfunctional. This is great for providing deeper descriptions, but a little verbose when all you want to do is keep the parser from failing to recognize a word whose only purpose is to add minor detail to another entity's description. To make it easier, I wrote a gamefic-overlookable extension that lets you implement trivial scenery directly in the entity's attributes:

    make Thing, name: 'painting', description: 'A painting with a frame.', scenery: ['frame']

Many thanks to ParserComp's organizer @fos1 and everyone who participated. It's been fun.