"release along with 'Parchment' interpreter"

I’m back, with just a little less than 36 hours to deadline! So… this may be an academic question at this point.

Assumption 1: Many people who play spring thing games appreciate the convenience of playing games online.
Implication: Spending time on implementing that feature can provide players with good experiences.

You may remember me from my previous thread about the “release with an interpreter” feature of Inform 7. After some effort, I was able to get that looking pretty nice.

however

I have implemented a large menu system in-game. It contains several texts, a big hint system, player instructions, etc. Usually, if the player presses the “Q” or “ESC” keys, the current page will go up one level in the document tree, where player can continue browsing.

I say “usually,” because with a couple of interpreters, the ESC key will not work if the cursor is removed from the input field. That’s a pretty common use condition, actually. The majority of my playtesters mentioned it. I put a note in my help documentation about it. What else could I do? I can’t control what interpreter players use.

Once I got my “web page” working and looking the way I wanted it to, I realized: this interpreter is one of the ones in which “ESC” input is not accepted when the input field loses focus!

Oh, no. Well, I do seem to have a bit of control over what interpreter players use on the web page:

''RELEASE ALONG WITH PARCHMENT INTERPRETER``. Parchment would be great! I know that it doesn’t have the “ESC” limitation, because I’ve tested it myself. It’s one of the interpreters that I recommend in-game.

ok, after releasing, I can’t get the game to launch. The compass GIF hangs. I find this thread:

Just as an experiment, I extract the new template and dump it. It runs, but hangs. I guess it caches something nasty, because i have to clear out the game before iplayif.com will open the game (which it will in normal circumstances).

Is that thread still the state of the art? I tried to follow the instructions in the solution, but the python script immediately threw an error:

C:\RTE\Release>python game2js.py rte.GBLORB > RTE.GBLORB.js File "C:\RTE\Release\game2js.py", line 74 <title>quixe/game2js.py at master · erkyrath/quixe · GitHub</title> ^ SyntaxError: invalid character '·' (U+00B7)

This absolutely could be my fault, I dunno. I don’t understand what this script is doing.

Perhaps I should just ask @mathbrush about hosting an iplayif.com link.

Maybe these commands should be removed from the documentation. I really thought I’d be able to just compile and forget. I would have given myself more time if I had known what this would be like.

2 Likes

For spring thing, you’re free to have the “online play” part be whatever you want it to be, including an iplayif link.

But as far as I know using ESC to exit a menu isn’t a standard IF thing that most players will expect. You said almost all testers mentioned it; did they organically try ESC on their own and asked you to put that in as an option, or did you say in the documentation that “esc” backs out of menus and they tried it and had it fail due to lack of focus?

Because if it’s the second one, you could just take it out. Almost all if games that have menu systems work just fine without using escape, and mobile keyboards don’t even have an escape button (I played it exclusively on mobile for my first few years).

1 Like

It’s the lesser-known system by @severedhand, which I chose (and will keep) for its screen reader mode, among other things. Pressing escape is in the documentation, and in the on-screen instructions. My takeaway is that they used Q only after ESC didn’t work.

I think many people are kind of used to ESC in a lot of cases. Certainly outside of IF.

But… this is really just about things not working out as expected. Releasing to Parchment would have handled escape fine, I’m just trying to use Inform’s documented features to do things that are known to work with my game. Parchment is not outlier, renegade tech. I tested with Parchment, because I imagine that it will be what most people play my game with post-spring thing (if people play it, that is).

I’d like to know how to make this work for future reference (the frame for feelies on index is nice), but it sounds like iplayif is the way to go on Saturday, April 1, at 1:23 pm CST

2 Likes

That looks as if there’s an HTML <title> tag in there which comes directly from the Github page. You’ll need to make sure to download only the script itself (via the “Raw” button on the page or this link).

Also, here’s an alternative method:

2 Likes

The escape key has been a standard browser keyboard command for at least decades, if not forever.

I’d say this is Basic Help Menu failing to try to comply with browser-based terps more than it’s Parchment failing to try to comply with Basic Help Menu.

1 Like

How did you arrive at this conclusion? Parchment (and Gargoyle and the Windows IDE and winglulxe) all use escape as I (and my testers) expect. This is a thread about being unable to release with Parchment, a documented feature of Inform 7. The problem is with the default web 'terp. If my explanation is inadequate (very likely), you can recreate the problem without the web page, just pm me for details.

I’m now realizing that screen reader mode is no good ATM, since I can’t reasonably ask those users to click on the input field. So, I’ll either need to hack ESC out of the instructions, get Parchment working, or just do iplayif. Screen reader support for the menu is a must; I won’t publish a web version without it.

I have had mixed results with screen readers and other menu systems. The old .z5 invisiclues transcriptions are iffy, for instance…

Thanks for the help, @StJohnLimbo I’ll give it a shot.

1 Like

I did get to get the script to complete. I noticed that the generated js file is 2 mb larger in size, while releasing with an interpreter ususally drops in size (due to cut images). The browser hangs at a white screen now, no compass.

i’m probably just doing something wrong. I disabled my custom css file just in case. Couldn’t think of anything else I’ve done that could change things.

I tried the other method. Does the current v10 install have a different file? I did a search for *.app files and didn’t get any useful hints.

If you’re using 6M62 then make sure you’ve downloaded an updated version of Parchment as its version is very old. There should be no issues with Esc now.

2 Likes

Yeah, current parchment works great. I use it all the time!

I’ve tried using both of the scripting methods. ifsitegen.py isn’t working for me, because I can’t find the template file. I unhid all file types, even system files, but I can’t find inform.app searching *.app. Does it change in v10? That’s what I’m using.

I’ll try nuking everything, blanking out my css, and just start clean with the new templates from github. It’s very possible that I trashed something along the way.

1 Like

The “.app” thing is MacOS-specific, AFAIK. On Windows, Inform consists of a bunch of “.exe” and other files.

The Inform folder should be under Program Files or Program Files (x86), if you didn’t install it somewhere else.

Edited to add:
I successfully made a Parchment-playable web version of Wade’s Help Menu extension example by compiling it in the IDE and then, after copying the game file and the ifsitegen script into a new folder, executing the script like this:

python ifsitegen.py -i parchment-for-inform7.zip -a C:\Software\Inform7_v10 mygamefile.ulx

(C:\Software\Inform7_v10 is where I installed I7 v10.)

1 Like

Oh, OK. Yeah inform.exe is at “c:\program files\inform”, so I’m not sure what’s happening there.

So. Everything seems to be working now. I think a few things were going wrong:

  1. The process in the documentation does not work.
  2. For whatever reason, the known fixes (two different methods w/ scripting) were not working. Once created a large file that would not open. The other could not find my installation of Inform). Based on @StJohnLimbo 's successful testing, this second problem was probably my error.
  3. The CSS that worked so well with the default 'terp seems to cause the game to hang. I think It wasn’t carrying all settings over anyway, echoed text input color as one example.

So, I miss the presentation of my colors and fonts :crying_cat_face:, but the menus will be usable without any problems. I hope. I’ll run a bunch of testing scripts later tonight, just to be sure.

I’m very grateful for all the constructive suggestions, and will drop an update later.

4 Likes

If you’re using the updated Parchment, then just set colours with Glulx Text Effects or Glk Text Formatting. Or you can set a Parchment theme using CSS variables.

Changing fonts is trickier because I’ve carefully calibrated Parchment for its fonts. But again you can change them with CSS variables. See asyncglk/core.css at master · curiousdannii/asyncglk · GitHub

Also, if any interpreter hangs like you described, there’s a decent chance there will be an error in the browser console. I’ve tried to make Parchment catch all the errors and display them to the user, but sometimes errors won’t be caught and you’ll have to check the console for them.

Ok. I’ll give all this a look in a bit. Thanks for the tip!

So… things are mostly pretty good.

There is one weird thing going on, and it isn’t specific to this compile. It happens at iplayif.com with just my GBLORB. Nobody ever tested this specific case… playtesters seem to use local terps a lot, and my tests were about usability, visibility, etc. I never had occasion to close and return with the same build.

If I close a tab, then return to iplayif.com (or my local installation), my game picks up where it left off. Only it hangs after accepting one command. I checked the console:

When I open the console, the error “exit not implemented” appears

It makes no difference where/when in the game I am or what the command is. I can close the tab on the first turn, return, type “look”, and it croaks. This game has never had a reported interpreter problem. I have no idea what this is about. This may be the reason I thought the first script wasn’t working, but I’m not sure.

``
web.ts:261

   Error: Quixe run: Error: Call to non-function. (NaN) Call to non-function. (NaN) Error
at Pe.error (web.ts:238:21)
at Object.Le [as fatal_error] (glkapi.js:1216:12)
at Object._ [as resume] (quixe.js:187:18)
at _e (glkapi.js:253:8)
at Pe.me [as accept_func] (glkapi.js:226:9)
at Pe.send_event (glkote.ts:319:14)
at Pe.send_event (web.ts:339:15)
at on_gameport_resize.Ie.leading (metrics.ts:166:25)

error @ web.ts:261 Le @ glkapi.js:1216 _ @ quixe.js:187 _e @ glkapi.js:253 me @ glkapi.js:226 send_event @ glkote.ts:319 send_event @ web.ts:339 on_gameport_resize.Ie.leading @ metrics.ts:166 await in on_gameport_resize.Ie.leading (async) H @ debounce.js:95 ge @ debounce.js:144 Q @ debounce.js:132 web.ts:261

   Error: exit not yet implemented
at Pe.exit (web.ts:265:15)
at Pe.update (glkote.ts:240:22)
at Pe.update (web.ts:354:15)
at Object.Le [as fatal_error] (glkapi.js:1219:12)
at Object._ [as resume] (quixe.js:187:18)
at _e (glkapi.js:253:8)
at Pe.me [as accept_func] (glkapi.js:226:9)
at Pe.send_event (glkote.ts:319:14)
at Pe.send_event (web.ts:339:15)
at on_gameport_resize.Ie.leading (metrics.ts:166:25)

``

And this as well:

JS stack dump B: Error: Call to non-function. (NaN) at g (https://iplayif.com/dist/web/quixe.js:3:3691) at zf (https://iplayif.com/dist/web/quixe.js:3:48145) at Object.Lr [as enter_function] (https://iplayif.com/dist/web/quixe.js:4:147) at eval (eval at tr (https://iplayif.com/dist/web/quixe.js:3:3791), <anonymous>:13:6) at mf (https://iplayif.com/dist/web/quixe.js:18:11225) at Object._ [as resume] (https://iplayif.com/dist/web/quixe.js:2:107) at _e (https://iplayif.com/dist/web/main.js:3:31488) at Pe.me [as accept_func] (https://iplayif.com/dist/web/main.js:3:31251) at Pe.send_event (https://iplayif.com/dist/web/main.js:1:12416) at Pe.send_event (https://iplayif.com/dist/web/main.js:3:13853)

I’m clearing my cache every time I launch, and I’ve tried Edge, Chrome, and Opera.

They all do the same thing. I also tried with a new, unused user account (Windows). No change.

Unless there’s an easy fix, I’ll go back to QUIXE and try to hack references to the escape key out of the menus.

4 Likes

Hmm, it seems the autosaves in Parchment have become a lot more fragile recently, but I don’t know why. I don’t think I’ve really changed anything that would affect them, but obviously I have.

I’ll take a look into this. At the very least I’ll be able to fix the “exit not yet implemented” error, and then hopefully it will just be the more common autosave error, which will at least have a “restart” button in the error bar.

3 Likes

I’ve seen similar behavior recently, but couldn’t track down what the source was. Basically, z-machine files being played online on chrome occasionally getting ‘stuck’ with no way to restart the interpreter and no way to enter commands. I didn’t know it was a thing happening to others (my computer has a lot of dumb stuff), so if it happens again I’ll collect data and post it here.

2 Likes

OK! I have Parchment and Quixe releases ready for this thing, so I’ll just see how things are looking later today. I do prefer Parchment (disregarding the autosave problem), because I think players will intuitively reach for the ESC key, regardless of what the on-screen instructions say.

Basically this

1 Like

When you said this, I thought you meant escape has been a standard command for the browser and web apps shouldn’t try to intercept it!

Did I get that backwards?

As I said, I don’t think the problem is Quixe (GlkOte) accepting the escape key – it does. The problem is refocusing when the cursor has come off the input line. I wanted browser commands like page-up/page-down to work in the browser context if you weren’t typing directly to the game.

But it sounds like it makes sense for escape to have refocusing behavior, same as alphanumeric keys.

(Now that I test in Advent/Quixe , escape does refocus. What it doesn’t do is refocus and get passed to the game. If you’re in the help menu and the cursor has moved, hitting escape twice has the desired effect.)

3 Likes

By “desired,” do you mean return the cursor to the input field? I can’t get multiple ESC keypresses to do anything (this is in Advent/Quixe, not my game). That’s with Edge, Chrome, and Opera. I don’t have Firefox at the moment. Space bar, on the other hand, works anywhere as expected (since it prompts for space bar). Tab does seem to return focus, but I might as well tell people to press “Q” at that point.

I think I’ll go ahead and submit in Quixe, since it’s noon on Sunday. @Dannii if you do an update, I’ll try again, and pass it on to @mathbrush if everything looks ok. I feel that people will try to use the escape key even though I’ve removed the prompts from the game, and I can’t tell people using screen reader mode to return focus to the input field. So as things stand I’d like to release with Parchment.

Thanks for everyone’s assistance.

E: changed to specify that I was using Advent/Quixe in the keypress discussion above

1 Like

That had been what I meant, yes. But I hadn’t understood the actual problem described was in a different vein.

1 Like