I’m designing a hyperlink system to be built into Inform, hopefully to be included in the next major release. But there’s a lot of things that could be done with hyperlinks… so what do you all wish was possible? Here are some I’ve already thought of:
Entire command line replacement
Add some words to the command line but then return to the player who could edit it before submitting the command
Run some code (a rule or phrase)
Act like a keypress
Choosing the next passage of a choice-mode game
Not everything suggested here will be included built-in to Inform, but the system will make it easier for hyperlink extensions to work together without conflicts.
I agree, good support for using hyperlinks in other windows or hyperlinks that target other windows would allow those kinds of multi-window interfaces. You could image footnotes appearing in the margin like in the Windrift system.
Links that expand out or change other text (ala Twine) would be very neat, but perhaps that doesn’t gel with Inform’s basic assumption of an immutable transcript.
It should ideally at minimum emulate the features of the existing Basic Hyperlinks extension. However, I humbly suggest an improvement to the syntax. Currently if you want to use a link that posts a command, you have to keep a huge numbered list of commands. This is quite brittle design if you’re using hyperlinks extensively. What would be better would be about to put the command in the markup itself, like:
I [link x me]look in the mirror[end link] and [link shudder]don't like what I see[end link].
For reference, this is how I’d have to currently do the above with Basic Hyperlinks (which, in any case, no longer appears to work in the latest version):
The description of the Testing room is "I [set link 1]look in the mirror[end link] and [set link 2]don't like what I see[end link]."
Table of Hyperlink Glulx Replacement Commands (continued)
linknum replacement
1 "x me"
2 "shudder"
As you can see, it quickly becomes impossible to know what the links are doing without constantly flipping back and forth to the big table.
There’s actually three ways you can think about this, subtly different:
(1) Clicking a link fills in (or replaces) the input line with a given line of text, and then enters it. (The game then continues with regular parsing.)
(2) Clicking a link fills in (or replaces) the input line with a given line of text, and then generates a given action. (The game bypasses the parser and proceeds straight to action processing.) The line of text is purely output, to make the scrollback read nice to the player.
(3) There is no line input, only hyperlinks. Clicking a link generates a given action. (The game does no parsing and proceeds straight to action processing.)
(1) and (2) look the same to the player; the only difference is that (1) has a chance of generating a parser error or disambiguation question. (With careful game design the author can always avoid this – but it would be easy to screw up! Model (2) would be easier for most authors to work with.)
(3) looks a lot like “Choosing the next passage of a choice-mode game” to the player. There is no input line, just a Twine-style display of text and links. The difference is that there’s still a world model underneath and the game is built out of normal action rules, not passages.
That syntax doesn’t quite work in I7, but you can do it Inline Hyperlinks style,
[link]x me[as]look in the mirror[end link]
and so on. Which is close enough.
I vote for this, just because it feels conceptually the simplest, it means you only have to keep track of two pieces of information (link text, result text) instead of three (link text, result text, result action), and it’s what Dialog does so it’s what I’ve been working with for the past several months.
Everything I can think of has already been covered in this thread. For cycling and replacement links, though, one option is to use small amounts of text and clear the screen and reprint every time you click a link.
Does it? Not trying to be snarky—I really don’t know of a way to go from “taking the crystal ball” to “TAKE CRYSTAL BALL” except with a bunch of hacky regexes.
Hm, I guess there’s machinery for printing a stored action value (which comes out “taking the crystal ball”) and also for conjugating verbs (printing “[take]” in any tense), but those two features aren’t currently hooked together. It should be doable if the feature is desired.
For that matter, I think it would be okay (in a model-2 game) if clicking a link generated output like
I’d appreciate the feature, certainly! It would help a lot for narrating actions. (Which is why I made an extension for it with a bunch of hacky regexes.)
Lol. I (someone who tried Inform for the first time three weeks ago) had a thread over here last weekend asking about this precise problem, because Vorple hyperlinks need a “take the crystal ball” string but, as you say, stored actions come out as “taking the crystal ball”. I didn’t find a way of generating that. So far, I’m just storing the two tenses in a table, which will only allow a few verbs, but that would make sense if hyperlinks are the only way of interacting.
With which I mean: yes, this feature would probably make my highly hypothetical game easier to write.
I still like to make educational IF. Linking to media (which is already possible) and possibly remote sites to augment leaning and high order thinking skills is very useful.
You can’t include text inside a say phrase. But something like this will be possible:
The x me command is always "x me".
When play begins:
say "You should try [link command x me command]examining yourself[end link].";
The Inline Hyperlinks style is also very nice, but would probably need to remain an extension.
With all the improvements I’ve been working on to the broader Glk ecosystem all these would not be hard to implement. Perhaps some of them that don’t make it into the standard rules can be given as examples in the docs.
Yes, that’s definitely possible, especially for additional windows.
Are you thinking of a text compass rose in the status window, or a graphical one? Either are possible, though graphical compass roses would actually need to be implemented through mouse events rather than hyperlinks.
So external HTTP links? That’s not really possible in Glk at present (though some, but not all, interpreters will autolinkify a URL that’s been output as plain text.) I have thought about adding a Glk function that would open a URL, though it wouldn’t be feasible to add to Inform 7 yet as there aren’t any interpreters that support it.
Second, reproducing the interface from Infocom’s “Journey.” Clicking on any of the text in the bottom five boxes either advances the story or populates the box to the right with additional clickable text options (you can get a better idea of how that works by playing the Z6 version of “Journey” here).
Being able to hide the parser and make the entire experience point and click for release but also have it available for development and debugging would be nice.
I am a fan of Legend’s “Gateway” games (more info about both those games here and here for those of you not familiar with it), but I thought the interface was too “busy.”