Player input getting a ? in between a word being typed

Hello!
I have discovered while testing my Glulx game in Gargoyle that sometimes the input gets a bit laggy, and sometimes prints a ? in between the input. Is like it is scanning for something while typing in the background.

For example I get:
go n?orth : this one will mess up completely.
or n? : this one will be caught by one of the extensions and transformed in “go north”

I was trying to find out where is it coming from, to avoid it from happening.
I am using Poor Man’s Mistype and Smarter parser by Aaron Reed. I am also using sound with Music extension by Daniel Stelzer.

Any clues that might help me to get rid of it?

Thank you in advance!

Well, I remember that there are multiple recorded incidences of smarter parser / poor man’s mistype causing lag (I’d like to cite even one, for instance I’ve got one in a review I wrote, but I can’t Google it and I don’t want to skim read 145 reviews)… going back years. But not bad lag in a desktop interpreter.

Lag is a function of the platform the game is played on, as well as what is specifically causing the lag within the game. Typically playing on mobile is worse than playing in Parchment is worse than playing in a desktop interpreter like Gargoyle. The fact you’re getting lag in Gargoyle on desktop is alarming.

I have to say I don’t understand when exactly it is that you see the ? appearing. Is it replacing odd characters you’re typing with ?. Or are you saying the ? spontaneously appears. If spontaneous, it would have to be as you are typing the line, wouldn’t it?

In summary, we’d need more information about the problem.

-Wade

Hi Wade, I am happy to provide more information, I just didn’t know what was useful information to start with.

It appears spontaneously as you are typing the line, but it does not replace characters. The ? interferes in the middle of typing, if I type random letters in a long string I can see that it appears several times.
I couldn’t determine a pattern either.
It is not happening in the IDE.

I tried disabling Poor man’s and it still is happening.

Also, maybe off topic, but maybe related, when debugging rules, I’ve noticed that when printing the description of the room these four rules are repeated many many times, is it normal?

[Rule “don’t mention player’s supporter in room descriptions rule” applies.]
[Rule “don’t mention scenery in room descriptions rule” applies.]
[Rule “don’t mention undescribed items in room descriptions rule” applies.]
[Rule “use initial appearance in room descriptions rule” applies.]

What OS are you running?

If you’re using a music extension, its functions may not work in the IDE (they don’t on the Mac, anyway) whereas the sound and music will work in Gargoyle. That could explain a music extension-related problem only happening in Gargoyle. The music extension uses real-time timing, so it could somehow be dispensing input/output to the wrong window at moments (in real time, explaining how it could happen while you’re typing). And the timer could also be causing lag. That’s one idea I had.

Other ideas: Any chance your keyboard is malfunctioning? Could a modifier key be malfunctioning, or an alternate character set be in use from some system setting, or from another piece of software you’re running? Perhaps another program is typing characters into Gargoyle that it can’t properly display, hence it shows a question mark when they are.

I think the presence of Poor Man’s Mistype is just distracting us in terms of the question marks, as that extension cannot insert characters as you type, though it does display any modified commands after you type them. That’s similar to what you’re describing, but not actually what you’re describing.

Then again, Poor Man’s Mistype can definitely cause lag.

I admit I’m suspecting the music extension at the moment. Have you added any programming and music to it yet, or just added the extension?

Other ideas to check:

  • What if you play a different IF game in Gargoyle, one you didn’t write? Do you get the random ?'s appearing then?
  • Are you using the most up-to-date Gargoyle for whatever OS you’re running?
  • And what about if you play IF in a different interpreter? Any ?'s then?

-Wade

I’m running on Mac.
I know that the sounds are not working in the IDE in the Mac, but that hasn’t been a problem for testing so far.
I’m using the latest version of gargoyle.
My keyboard works well, and I tried the external keyboard and the built in keyboard on the laptop.
Yes, I have sounds already there, and some programming to trigger the sounds, but not too weird or complicated.

I’m having some ideas based on your questions and the tests. And I think the solution / discovery is so not related to anything that I’m laughing out loud.

I was trying Transparent (with sounds) in gargoyle and Lectrote (does not support sounds). And Uscientific Fiction (no sound) in same platforms.

Independently of the sound having sound or not, I had the same question mark issue in gargoyle. But the issue was not there in lectrote.

When you hold a key, or type something strange, Mac (in any typing window, box or program) would give you the option of a special character on that specific key, or will try to auto correct the text. It behaves in the same way in Lectrote as in any other writing space, but not in gargoyle, which I think is kind of triggering that behaviour but not getting the right answer.

based on new tests, inspired by that discovery, my guess is that I was typing (say ‘ne’) too fast as to press both keys at the same time. And I assume that the lags are happening when I’m typing something that Mac tries to autocomplete or correct. So I can now trigger the ? on demand (so to say).

Does it make any sense, or am I being delusional?

1 Like

I think the question marks are an input bug in Mac Gargoyle. It’s not correctly handling the modify-next-key signal, which is sent by either holding down a letter key or using an option-letter combo. (Option-e means “accent on the next keystroke”, for example.)

This is unconnected to the lag situation.

These rules are checked for every object in the location. It’s not a problem unless you have fifty or a hundred objects lying around.

Yes, is what Im mostly inclined to think.
I have the feeling that the lag is only happening when Mac it is trying to “complete the word” or something on the lines of the modify-next key… because otherwise is not happening…

I don’t have so many objects, so as you say it won’t be a problem, thanks for the clarification, now I can sleep in peace.

Sounds like you’ve solved it. I’m still not sure what system settings on your Mac might be causing it to autocorrect so frequently, though.

For instance, I see I have ‘correct spelling automatically’ ticked in my preferences (System Preferences → Keyboard → Text). I didn’t even know it was on, and I don’t think I’ve ever seen it try to autocorrect anything in, say, Lectrote. This is in OS 10.13.6 (High Sierra).

-Wade

This has nothing to do with autocorrect.

What is it to do with?

I don’t know if this answers your question, but I was meaning these guys:
Screen Shot 2021-05-15 at 23.58.27
Screen Shot 2021-05-15 at 23.58.42

Well, even though I don’t know how you made that submenu of accent characters appear, I can see that in Gargoyle I can make ?'s appear half the time by typing option-e or option-a. So that’s close enough to me understanding.

-Wade

You get that by holding any key that might have accents or variations for different languages, e, a, o, u, etc.