Hi. I’ve spent the last few months trying to sort out the state of Inform 7 techniques on browsers and Android interpreters. One thing that has caught my attention is how broken many of the extensions are currently, mostly out of date syntax, and how a lot of authors are on older versions of Inform 7 and not the latest 6M62 when working with sophisticated layouts. What people were doing a decade ago almost seems like a lost art.
Five windows: top status window, main window, top right graphic image window, bottom right inventory window, bottom helper (hint) window
Hyperlinks to touch on the hint window
The graphics and inventory are on the right side of the screen which I think is ideal on modern mobile phone screens because it keeps any ‘cut off’ portion to the right if you want to scroll and see it.
What is lacking here is source code for Inform 7 to reproduce an interface like this! Something new authors can start with as an example project - and something even the various interpreters can be tested with (this almost works on Parchment / Quixe, currently it seems to error on the Hyperlink hints cross-window Input). And that’s the topic here where I’m asking for help. Can we get together working Inform 7 source code to produce this type of interface? And discuss best practices like how to hide the hint window (bottom window) if a user does not want to see hints? Or how do you refresh the Inventory window so it changes when items are picked up or removed?
If you have free time and skills to make an Inform 7 source example, today and now, please do! I will start sharing what I can figure out step by step, but really I’m hoping someone with more experience can put together a working bundle of extensions + source code for Inform 7 6M62 quickly. Thank you.
So, it seems like Glulx + Glk is always adding an extra blank line of output to a window which can cause Gargoyle and Quixe to have troubles rendering a window of limited height. Example code:
"GlkWindowBottomExample0" by "Community"
Include version 15/161003 of Flexible Windows by Jon Ingold.
The story-hints window is a text buffer g-window spawned by the main window.
The position of the story-hints window is g-placebelow.
The scale method of the story-hints window is g-proportional.
The measurement of the story-hints window is 12.
The rock number of the story-hints window is 335. [ "If we set numbers ending in 5 for our manual rocks, we will never conflict with the automated numbering."]
The background color of the story-hints window is "#FFDEA0". [light brown/tan]
Toggling the story-hints window is an action out of world.
Understand "storyhints" as toggling the story-hints window.
Carry out toggling the story-hints window:
if the story-hints window is g-present:
close the story-hints window;
open the story-hints window.
Rule for refreshing the story-hints window:
[ToDo: set a counter and increment so we have some idea of how frequently this redraws.]
say "Stuck in the story? Do not dial 911 in the USA![line break]Line two.".
Place is a room. "Command 'storyhints' should toggle a window on the bottom.".
On Gargoyle, if I resize the window to a shorter, a --more-- prompt appears even though there are only two lines of content. Like there is a phantom 3rd line or ending newline?
The issue in that post was a zero-height window. You’re not doing that. (Don’t do that, in general.)
The issue you’re seeing is that a buffer window shows a “more” prompt when it are full, and the definition of “full” is loose. The display code is treating the newline at the end as the start of a third line. (Which is what you’d expect in a text editor – it’s a common idiom.)
Thank you for the explanation. Is there a way to suppress that final newline on a statement: say “Stuck in the story? Do not dial 911 in the USA![line break]Line two.”. - or some alternate way to put text other than ‘say’ (like the difference between print and println in other languages)?
EDIT: Yes, there is “[run paragraph on]” and “[no line break]” - but not having much initial success.
I thought that I had made it so that the final new line in refreshing rules would be suppressed (by pushing and pulling the relevant I6 variables before and after running the refreshing rules.)
Just thought I’d say that IMO the ecosystem is in a relatively healthy state at the moment. I’m slowly working at improving extensions, but a lot are already in a very good state. Lots of rare bugs have been fixed.
The extensions do work, the problem is sample code and documentation beyond trivial use of the extensions. And I don’t mean full-blown working games with dozens of interdependent extensions such as Counterfeit Monkey or Kerkerkruip (both of which are open source). I mean an example game like Graham Nelson’s Balances gwindows.trenchcoatsoft.com/gwin3.htm that isn’t a real lengthy game - but more a technical demo - and even notes on what interpreters execute which aspects correctly. Especially now that Quixe is much more mature than it was years back (a lot of outdated information on capabilities come up via search engines).
So, the extensions do seem to be getting attention - and thank you for that! The problem is that there are so many tutorials, books, source code for stories - that doesn’t work any more due to the extensions changing in syntax. That’s the syntax I’m referencing. I’ve seen many problems such as color table format syntax changes and no automated way to rewrite the source code. Example: docs.textadventures.co.uk/ifansw … fects.htmlI tried compiling the “Gnome’s Holiday” example that comes with Aaron Reed’s Keyword Interface extension, but got the following errors.
I am working on a ‘working sample’ here publicly, but it’s slow learning and testing to get these things right. Hence why I’m asking for assistance in reproducing the 5-window interface of Dead Cities by Jon Ingold. And even some comments (in code and otherwise) on best practices for things like cross-window HyperLink clicking (which is actually broken on a lot of interpreters with Dead Cities due to some changes in the past 10 years) and how to refresh auxiliary windows only when needed and not every move of the player. Detecting screen size (I’m working on now), etc. And I think the code needs to be all public domain for this ‘sample Inform 7 story’ - as people need to be able to copy and pate or use it as a template for new authorship without concern that they accidentally violated GPL. Not every small time fiction writer can hire an intellectual property lawyer to check their ‘fair use’ of sample code off github Even copying and pasting two bits of code from two sources can mix license (GPL + Creative Commons) which is property rights nightmare.