I thought I’d make a thread in case anyone working with Inform 10 was interested in discussing these new developments.
I’ve noticed that a section of Hybrid Choices by AW Freyr marked “for use with Flexible Windows by Jon Ingold” refers to syntax that is only in version 13 of FW.
To unset choice-window:
shut down choice window;
vs
To unset choice-window:
close choice window;
Since this particular problem was previously impossible to precipitate (there was no way for an I10 author to use FW with HC), this is a new thing. I can update Hybrid Choices to match unless there’s some other, more desirable thing to do.
I’ve used Inline Hyperlinks as well! After adding a definition that matched the hyperlink definition in Bisquixe, I could drop it into an existing Bisquixe project without any fuss. All the links work fine. I think it’s noteworthy that Inline Hyperlinks prints the injected command on the line below the command prompt (followed by an extra line break), while Bisquixe (and Daniel Stelzer’s games, too) populates the command prompt.
Does that matter? I don’t know! It’s a different look and two extra form feeds, though players will probably get used to whatever the system does.
Anyway, I’ve got these working and will try some experiments with FW, so this is a good place to discuss these new (to Inform 10) extensions, if anyone’s interested.
By default, the command portion of the hyperlink is interpreted as a command to be entered as if the player had typed it rather than clicking the link. (Due to various quirks the injected command is usually printed on a separate line, unlike normally-entered commands.)
I agree with you that this is a bug. I think the bug is in Gavin’s Glk Input Suspending, and I bet it’s fixable.
I think having the command input as it scrolls into the main window (I don’t know if there’s a handy name for this element. In Bisquixe/Quixe it’s .BufferWindow .input) display on the command line is ideal, as it’s customary for typed commands.
I’m continuing to use it (Inline Hyperlinks) in my current WIP, as I believe support for hyperlinks is probably better handled in a dedicated extension. Inline Hyperlinks also discusses some possibilities that may not be available in Bisquixe, so it seems like the better long-term commitment.
As a side note, I’ve been playing with FW. It’s very easy to make new windows! I was pleasantly surprised.
And I’ve also filed a PR to fix it, but I’m not very confident in my implementation.
I’m not very confident that I’m handling this correctly. I’ve tested the updated “Lab Session” example (from #187) in Spatterlight, Lectrote, Gargoyle, Windows Glulxe, and Parchment, and it works there, but disabling echo and capturing input seems kinda perilous.
I’ve incorporated this fixed version of Glk Input Suspending my current WIP, which is pretty hyperlink heavy. By luck, I’m hoping to playtest a bit within the week, so I can turn more people loose on it. Ideally, there will be a variety of interpreters involved.
It looks like a extra line break is being inserted still, though the current state of things is very much preferred. I’ll continue to use this as a daily driver and post if there’s any news.
include hyperlinks by gavin lambert.
include inline hyperlinks by gavin lambert.
lab is a room. "[link]east[end link].
[link]jump[end link].
[link]look[end link].".
closet is east of lab. "[link]west[end link].
[link]jump[end link].
[link]look[end link].".
It appears that the routine produce a room description with going spacing conventions is adding an extra line break before a room description. This is part of the Standard Rules’s Report an actor going (this is the describe room gone into rule). In the above code, the “jump” hyperlink handles spacing normally.
produce a room description with going spacing conventions is an Inform 6 routine. It came up as a curiosity during the Let’s Play: Basic Inform and Standard Rules thread a while back. I don’t understand Inform 6, so I haven’t more light to shed.
Spending more time on this: I’m laying the blame at the wrong feet. The hyperlink is currently injecting a line break for any action, including parser errors. So typed command “jump” in an empty project yields this:
>jump
You jump on the spot.
>
A hyperlinked “jump” input, on the other hand, looks like this:
>jump
You jump on the spot.
>
produce a room description with going spacing conventions was a bit of a red herring. It does create a line break, but so does the usual looking action. Hence, the two line breaks upon going.
>go east
closet
go west.
Try jump as a different action for comparison.
>
So I was flat-out wrong about produce a room description with going spacing conventions; that is doing what it always does. The concern is the added line break that prints for everything.
Playtesters have been playing my work in progress with this PR applied. It’s common for multiple links to be generated per turn. I think it’s been played through at least 20 times (add to this all of my develoment time). Lots and lots of links generated and used. Links seem very stable. Unless the PR needs to be tested in concert with other extensions, I think it has been proven reliable.
I have gotten some comments about line break discrepancies for typed vs linked commands. I guess that’s a question for the floor. Is this line break behavior (example below) a big deal? It bothers me, but I can be kind of intense about these things, haha.
I’ll be sticking with the extension either way, as using inline links is very easy and I think @mathbrush would rather focus on visual styling for Bisquixe (though I’m not speaking for him).
My previous examples seem a little busy. Here’s just the bare minimum
Example
include glulx entry points by emily short.
include inline hyperlinks by gavin lambert.
lab is a room. "Try clicking the link, then typing 'jump'."
when play begins:
now the command prompt is "[link]jump[end link]>";
before jumping:
say "If I type the command 'jump,' there is a line break above. If I click the hyperlink, there is a paragraph break above." instead;
output
jump>jump
If I type the command “jump,” there is a line break above. If I click the hyperlink, there is a paragraph break above.
jump>jump
If I type the command “jump,” there is a line break above. If I click the hyperlink, there is a paragraph break above.