(This came up in a question about hyperlink input. I’ve made enough progress to start a separate thread.)
The Glulx Entry Points extension basically exposes the I6 Glk interface (the input loop, the low-level entry points) at the I7 level. This is very flexible but hard to use correctly.
I am working on an extension that manages all this stuff in a controlled way. That is, the extension is responsible for making and cancelling all input requests. This is a lot smoother because the input request state is, essentially, a hidden global variable – you can’t have two pieces of code trying to manage it; they’ll step on each other.
The other difference is that Glulx Entry Points tries to be polite and only customize the library through defined I6 entry points. My extension is a complete rethink of the I6 input loop. I’m ripping out the assumption that the Inform parser only operates on lines of text.
That is: with GEP, if you want to generate an action from e.g. a hyperlink, you have to generate a line of text (“GET LAMP”) and let the parser get to work on it. With my extension, you can generate an action (the action of taking the lamp) and bypass the parser entirely. This will make life much cleaner for pure hyperlink or choice-based games.
In general, Unified Glulx Input results in simpler solutions. What we have now is a series of hacks accreted onto the old (Inform 5, Z-machine) input model and it’s a bit of a mess.
UGI is a long way from done. However, it’s at the point where you can take a look.
github.com/erkyrath/i7-exts/blo … 0Input.i7x
(Hyperlinks and timer input are not yet there. But I have a tidy example that demonstrates keystroke input.) (Using the old generate-a-line-of-text approach, because the action-generation system is not yet there either!)
Because it hacks down to the parser level, it replaces large chunks of the parser template. It should therefore be considered experimental. I expect that the action-generation path will become standard in a future version of I7 – I know that Graham is interested in that capability.
I don’t know whether that means merging my extension in with I7, or adapting UGI’s features into GEP and merging that in, or leaving both extensions as optional add-ons. Hopefully, once I get to a stable UGI, people can start trying it in games and getting an idea for how good a solution it is.