Numpad navigation - can Inform 7 trap keypresses?

Exactly what it sounds like. :wink:

I was reading this “outsider” review of Anchorhead, which showed frustration with the game’s classical navigation system (i.e., n, w, sw, open door, in, nw…).

His suggestion is to implement a “go to x location” command, which is excellent and useful when available, but potentially difficult to code, and potentially unwanted on the designer’s part.

Regardless, it got me thinking about other input systems, and made me wonder if something like this was possible:

Ideally, you could just press a button on the numpad and it would execute the command without needing to press enter. Is this possible to implement in Inform, without messing up the standard prompt in the process?

I understand that interactive fiction is not to be taken lightly - we’re not meant to tap buttons quickly to explore the world. But in larger games with many locations, I believe that this could be helpful. I’ve often wanted a way to travel without needing to type specific directions every time, and the fact that the numpad is a perfect compass rose makes movement much easier to visualize.

What do you think? You could even implement a way to change the “hotkeys” to whatever you want, such as in a game where you have to “drink water” or “cast spleckinham” often.

This is planned for Glulx but it’s not available yet. It’s possibly in Z-code. (I don’t think number-pad keys are trappable, but function keys are.)

Taking a step back: I suspect that this idea would not satisfy the writer of that review; taking steps with the number keypad is not much less annoying than using the standard abbreviations.

Alright, I’ll keep an eye on developments.

And you’re right, I didn’t mean to imply that it would satisfy that particular reviewer, but that it would satisfy me. :slight_smile: I am tolerant of IF conventions, but this addition would help speed up my meanderings in the absence of a “go here” command.

One other question, and this could probably be answered easily by looking around, but while I’m here: could an image like that be clickable to achieve the same effect, such as in old LucasArts games? Or perhaps more accurately, an interface like the one featured in Eric the Unready, minus the graphics:

Not just like it, because it is actually kind of gross, but I mean with at least some common verbs and nouns listed somewhere that are clickable.

I hope this sort of idea isn’t considered in poor taste to the community, but there are many people who favor mouse-driven interfaces in their entertainment. I hope this wouldn’t be considered the sort of outreach that might be disruptive (ideally you could disable it at any time).

I could be wrong about this, but didn’t someone release a Glulx game with a clickable compass rose?

…and here we are: … compasses/

which then refer to Erik Temple’s graphical extensions. Given the Glulx paint program that Erik is working on, I think this is totally doable.

If a “go to” command would be even better, why not just implement that? It’s not hard to code and there are even several extensions available that add the functionality automatically.

I actually quite like the interface in that screenshot you posted. I like the idea of being able to list all of the discovered items in a particular room, saving room for more narrative.

Yes, you can definitely do this in I7, compiling to Glulx. Using the Flexible Windows extension, you can have separate “windows” (really panes within the larger game window) that display either text or graphics. If you create one or more subsidiary text windows and use Emily Short’s Basic Hyperlinks extension to hyperlink the items you print in those windows, you’ll get something very like the verbs and noun lists of the Eric the Unready interface (including automatic handling of scrollbars when the text goes beyond the bounds of the window). Currently the exact look of the hyperlinks will be controlled by the interpreter used to play the game, but the forthcoming CSS-based Glulx style system will, I believe, allow you as the author to control the styling.

As for the compass rose, Emily released a game called City of Secrets a while back that included something like the compass rose interface you were discussing earlier. CoS displayed “mood” graphics, the location name, and a clickable compass rose in a graphics window(pane), and had a smaller text window beneath the main window that provided clickable text–mostly used for conversation and help menus. CoS was written in I6 but all of this is quite doable in I7.

George mentioned my extensions for adding graphics like compass roses and so on. There’s an extension available now (Graphical Window Sprites) that will let you do compass roses, clickable maps that reveal themselves as the player moves the game-world, etc., but only in a single graphics window. It also comes with a set of examples, including a clickable compass rose.

I’m currently working on a set of extensions that will be a much more powerful version of Graphical Window Sprites, one that works with any number of graphical windows and includes lots of new features. Actually, I’m pretty well done with it, and am engaged in writing the documentation (pure drudgery, unfortunately). This thread has more information.


Thanks for the replies, I’m glad to see the possibility has been explored. I think it’d be a nice option to have, primarily for newcomers.

I would lay it out differently, but I do like the idea of interactive items listed…except for the theoretical drawback of breaking immersion. It’s the same reason why most good games opt to say “a weathered shovel lies half-buried in the mud” rather than allow the default “there is a shovel here.” I wouldn’t want to sacrifice colorful descriptions just to be explicit about interactive nouns, nor would I want players to get into the mechanical process of clicking the compass rose, scanning the noun list, and leaving.

You have to weigh your options!

Perhaps you could only have the items appear on the list after they have been examined once. Leaving important clues in the item descriptions as well would give players a reason to examine them.