top expert

a biting cat website

let’s make IF #16: tools for disabling and testing built-in commands

A couple of tools for disabling–and checking–commands from the standard rules.

and now for our regularly-scheduled disclaimer.

This is a good time to restate my purpose here: “Let’s Make IF” isn’t about making great code, let alone perfect code. It’s about making “functional code that won’t stop me from making a good game.” Repeat the Ending, a game that has done pretty well (thank you if you’ve played it!), used only three extensions in its first three releases. There is one bit of Inform 6 that someone wrote for me: it hides the status bar. Two other people wrote regular expressions for me, one apiece. There are no relations, for instance, or scenes. Most of it is just basic action processing stuff: the kinds of things we talk about here all the time!

You don’t need to be a programming genius to make a good Inform game. That’s the message of this blog: it’s OK to be a beginner, and it’s OK to be messy. It’s OK to be inefficient. Don’t give up, OK? Let’s make IF.

last time, on let’s make IF…

In last week’s episode, I discussed two methods for disabling commands for a limited parser game. In the first, I showed a way to disable every command associated with a specific action. By default, players trying to use actions disabled in this way will get a parser error in return (“That’s not a verb I recognize.”).

The second and more laborious approach involves creating new, custom actions and remapping known commands to them. This allows us to give custom responses per action, as well as providing a way to separate responses to familiar commands (we’ll handle with rules) to commands that simply aren’t supported in the Standard Rules (we’ll handle with a parser error).

My thought is that a player will know the difference between typing “push rock” and “adkjsfdhkfsaj”, and so should my game.

going all the way.

I decided to push this as far as I could. Disabling most commands would be a good learning experience, I thought, and I could reuse the code in other projects. While building it, I realized that I needed a reliable way to test the changes. And so, a few workdays later, I present…

Disabling and Testing Inform 7 Commands by Drew Cook

Break it open and experiment yourself! Please note that these extensions are very much a work in progress. Over the next week, I’ll try to move these over to our own project source code. This template is very nearly complete.

Short update today, because the update is in the extensions. I hope they look useful, or at least educational. Let me know if you experiment with them!

next.

I’m hoping that I will be ready to write about a feature-complete template for my Inform 7 poetry project. Stick around!

Categories: , ,

Leave a comment