Autocomplete Input Prompts (mind the silly exhausted mania)


I’m at wit’s end here!! Buckle up!

(I wrote more about this in another thread, but long-story-short, I’m making my own interactive fiction library in Java, and am designing a user interface in Java Swing. I’m primarily doing this because I have a radically-different system in mind for how the game world should be simulated, and how actions should be handled, and it would require WAY too much gutting and rewriting of other IF platforms (like Inform 7 and TADS 3). I keep realizing a lot of my IF ideas have a lot of these simulation mechanics in common, and it would be better for me to just make a personal code foundation for them, rather than wonder how I’m going to attempt to get TADS 3 to cooperate again.)

One of the things that I had at the top of the project to-do list was input prompt autocomplete, preferably in the style of Minecraft commands. As you type into the input text field, it will offer suggested words in a little bubble above your input (generated through a combination of context clues,
and the letters typed in so far). You can then press a key to automatically fill in the rest of the word/noun.

Now, I’m maybe halfway through implementing this, but I absolutely refuse to ever live my life according to the sunk cost fallacy, so it is never too late for me to toss out all the work I just did, and put myself on a better path to continue on!! :upside_down_face: [exhausted, manic breathing]

I’m at the point where I’m realizing that writing a parser is one thing, but trying to write a parser that uses context clues to suggest words to the player is a bit steeper than what I had first predicted!

I mean, I’m always up for steep coding challenges, but I’m also realizing that screen reader support is going to add another layer of complexity to this suggestion system (Java Swing support for screen readers is…not amazing, and very few people online have any helpful resources for supporting it, but I aim to write accessible software whenever possible).

There’s…also another major problem I had not considered: Autocomplete might offend the average IF parser game player. :star_struck: :tada: (woooooo this is why people generally do not throw themselves at every mildly-interesting coding problem they think of! It’s because they plan their goals better! haha yaaaayyyy)

So, pretend that I have not just sunk a week of effort into the autocomplete suggestion system, and tracked down one of the hardest bugs I’ve ever found for a whole day. Just ignore all that. If I need to blow a hole in this ship and swim to shore for a better ship, then I will. I literally do not care. Try me.

So: would you–as a wonderful, insightful, (and quite-fashionable) player of an IF parser game–be put off by autocomplete? Do you prefer to discover the nouns and actions in the game yourself, and only think to type them in after reading them from a screen? Is it better to figure out what to type for yourself, without assistance of something that would only make a minor increase in input speed?

I literally did not consider this perspective yet. Silly me. What a rapscallion I am. I was REALLY hyperfocused on terminals where you can autocomplete long file names, or programming IDEs that autocomplete function names and variable names. Autocomplete is literally a cornerstone of my world. However, these are environments where typing is part of a chore, and what you type can often get very long. It did not occur to me that people play parser games because they enjoy the complete freedom of figuring out and typing in commands for themselves. In fact, this is why I prefer parser games over choice games and hyperlink games. You discover words and plan your actions as your own.

(Now, I would like to point out something: This engine of mine will not only come with an action reference list, but actions will also be revealed/unlocked as the game progresses. Categories of actions can also be marked as active/inactive according to the situation, with the player being alerted accordingly. After all, I don’t want the player to think they have to try actions that only work when in combat, until they’re actually in combat [“You have entered combat; combat actions are now available”]. So if there’s a benefit for reducing guesses at the dictionary, I already have a separate feature for that. Granted, it’s a bit game-y, but a lot of my planned IF games will lean harder on being a game than being a deeply-immersive story.)

So, what do ya say?

Am I onto something with this autocomplete stuff? Or should I blow a big ol’ hole in the hull of this ship? Should I…really axe these sails and leap in the water? Maybe set it on fire, and see if I can race the flames to the lifeboat? Maybeeeee…write some silly messages in the captain’s quarters for future seafloor explorers to find? For the laughs, perhaps? The giggles? Cause I can do it. Frankly, I’m chomping at the bit to toss this whole autocomplete thing out! Maybe wiping out all the work I put into this would be cathartic? It could just be that I would be swimming home crying tears of joy (or laughing maniacally, as I tend to do)!

But if autocomplete is actually a really cool idea, and I don’t need to sink this ship, then I will continue to figure out just how I’ll get this gosh-darned computer to predict what the player is typing as they type it, and what suggestions would be relevant to the situation and task at hand!

Let me know!

It is almost 7:15 in the morning here, and I have yet to get any sleep at all, so I will check back here after I’m done passing out!


Looking at it purely as an adjunct on top of a regular parser game: I’m happy for it to anticipate common commands and allow me to hit RETURN to drop those in. If a command’s listed in the help file, autocomplete could anticipate it. If it’s not in there, I wouldn’t want autocomplete dropping it in until it was something I’d entered myself.

Maybe I’d tolerate it dropping in nouns that are in plain sight or that I’ve used before.

So ignoring verbs only, I don’t think I can entirely draw a line around the issue. Unless handled pretty conservatively, autocomplete is a game design issue. The game design and writing are attached to each other in parser IF. When you add autocomplete, you change the relationship, which can change the experience, etc.

Having had some severe bouts of RSI in life, I like typing less. My games will never make you type a number and press return; they will just take the number and act. Even little stuff like that comes from my personal taste to avoid pointless typing. But I’m not pining for autocomplete.


1 Like

Hahaaaaa if you thought I was asleep you would be wrong! :smile:

(Actually just woke up for a sec; returning to sleep after writing this)

Okay, so if I’m understanding you correctly: Autocomplete for verbs would be handy, but autocomplete for nouns should be avoided, or reserved for ones that you’ve seen, interacted with before, and can interact with currently?

EDIT: Now I’m wondering if verb-only autocomplete might be kinda handy and not too intrusive…

I would have said exactly the same as @severedhand , only possibly less eloquently.
I don’t think it’s something I’m crying out for, but it could be useful for some. (Discalimer - I don’t really like autocomplete on my phone. Maybe I’m just too old.)
Being very old-school in my tastes, I like a bit of ‘hunt-the-verb’ so long as it isn’t too obtuse and, if it were over-used, it would essentially become a Lucasarts-style Point ‘n’ Click game.

1 Like

I hate autocomplete and autosuggestions. I turn them off everywhere I can. I can type on my own.

BUT, if you’re going to have long, complex names or words that are easily misspelled, I like having common misspellings allowed. Like if you have a balaclava in your game, or a character named Amalethea, allow several spellings.

1 Like

If a game had autocompletion like most UIs implement it with half a dozen candidates updating on the screen at all times, being a persistent irritating distraction, then if I couldn’t turn it off, odds are very bad I would play it.

I think offering tab-completion would be a good thing, though.

1 Like

This is what Jon Ingold did in The Colder Light.

He released an I7 extension to manage autocomplete functionality, but I’m not sure it works with the latest version of I7.

1 Like

Was this something he added later? I mean, I completed the game, and reviewed it (years ago) and don’t remember what amounted to autocomplete. My review talks about keywords and hyperlinks:


@joningold 's Interactive Parsing demo The Wilds of Orkney (gblorb file) has autocompletion in essentially the manner I complained about above. He refers to having made a glulx version of Make It Good that included Interactive Parsing, but A Colder Light doesn’t include it, at least not the version of it in the zip archive on IFDB.

No, I definitely recall it being in one version. He might have added it. I recall the game as being a display piece for the functionality, though, but I may have misremembered.

I suppose we could always ask him. @joningold ?

I do autocomplete in the UI and not in the game engine. It works by reading the text output and learns from it. Like that, it cannot suggest anything that hasn’t already been mentioned.

Here’s an i7 game with autocomplete for you to kick the tyres. Press TAB to complete a word and press TAB again for alternative suggestions.

A Colder Light uses a completely different input system; I think it’s more of an interesting toy than a good direction (oh, except I quite like the game itself).

“Interactive Parsing” was an I7 extension (I think?) which built full autocomplete functionality into Inform. As I recall it worked pretty well – removed a lot of frustration without removing the “hidden power” feel of IF. If I was still making parser games I’d probably use it. It may still work, I have no idea.

I did also hack it into Make It Good, which was an I6 game, but I didn’t complete that project; I was imagining a fairly large overhaul with windows for a notepad, etc, and I never got to the end of it.


And I am awake!!

This is my favorite forum in the world! Everyone is so open and honest, but also so respectful and friendly!

So, there’s a lot to take in, and I still need to decide what I’m going to do. I’m leaning towards no autocomplete, because it seems to be something that the replies say is more likely to be a nuisance, and is only a mild convenience when it’s implemented perfectly. However, if I add it in the final version of the engine, I’ll make it optional in the UI settings, and have it turned off by default. There will also be an initial options screen (when the engine first opens) where it can be turned on, in addition to the necessary accessibility settings.

Also, if the final version does have it, I might have semicolon be the autocomplete key, because for Java Swing reasons, I need every UI element to be keyboard-navigable for screen reader compatibility to even be possible, which means the tab key is off-limits.

At the moment, the autocomplete style is (unfortunately) the five-item popup-list that @Zed mentioned, and I’m not sure how useful autocomplete would be with invisible suggestions if I’m also accepting abbreviations (x = examine) for common verbs, as well as misspelling forgiveness (balclava= balaclava).

Additionally, I’m still adding a dynamic verb reference list/dictionary screen to hopefully prevent the “hunt-the-verb” situation that @TheGlassFractal describes.

So it’s sort of a thing where it’s a lot of effort (with a lot more to go), and I’m not seeing much of a benefit, which might explain why I haven’t seen it in too many IF titles lol.

I would like to poll @severedhand to ask if one-letter shortcuts for commands would be sufficient to relieve most difficulties with typing. If not, then that’s reason enough for me to continue implementing autocomplete.

Again, thank you all for feedback!

1 Like

Also of interest here is Poor Man’s Mistype by Aaron Reed.

1 Like

Thank you for linking this; I’ll see if I can port this over to Java code! I might need to refresh myself on the syntax of Inform 7; I’ve been using TADS 3 for a long time before attempting this new engine.

After some thought, I think I’ll finish the autocomplete system. It can’t hurt to have more options for players, and I’ll make the system optional for the engine, with it defaulting to off.

It’s also doing 75% of the parser’s work, so I can just share the autocomplete’s effort with the parser and save myself some coding later.

If I can also figure out how to get the story prompt to behave with screen readers (which is a necessary requirement for this project), then I’m sure I can get autocomplete to behave too.

I won’t be burning this ship after all! :smiley:

Thank you all for your insight! I wasn’t so shy, I’d probably post more and lurk less, lol. This place is wonderful!

1 Like

Yeah, don’t let me stop you (and you already haven’t let me stop you, so good). I think my main point is, in games already built how they are, I don’t pine for autocomplete. And bolting it on some of these games could mess them up. Others will be okay, or just different.

If someone builds a game from the ground up with the autocomplete in place, that’s where I’d expect the best results, because it’s figured in as part of the design. Those results will also be best for people who enjoy autocomplete in this context; people who don’t will probably dislike such a game, as its moved into a new, autocompletey area.



That’s also why I’m making autocomplete be off by default, and have two modes: pop-ups on and off.

Another thing is this engine was designed with autocomplete in mind, so it won’t be just the one game that has it; all games with this engine will provide the option, which is set according to user preference for all games. The UI part of this system already works, and I can reuse most of it for the parser.

Also my dad said he would play IF more often if autocomplete was a thing, so there’s also that, lol.

After a manically-insane episode of binge-coding, I now have the computation part of the autocomplete context system running, so it recognizes what verbs you might be using, and what nouns you are in the process of typing in. It won’t suggest words you haven’t seen yet, and it won’t suggest words in a noun that you’ve already typed in. (For example, if you have entered “large blue plastic”, it will narrow down what player-known nouns this could describe, and it will not suggest “large”, “blue”, or “plastic” to you again, until you have finished typing that noun)

This system is also an excellent midpoint to finishing the parser, too. Bonus! If you have autocomplete turned off entirely, this system will still run the first half of parser calculation, so either way this was a good investment of effort (and sanity).

Next up, the easy part: filling out the rest of what you were typing, after you select an autocomplete suggestion.

This will probably be the last reply I make to this thread, as I don’t want to spam the forums lol.

1 Like

I’m enjoying seeing you document your decision-making process and build of your system! I don’t consider it spam at all. I think many people here like to have a window into innovative things folks are doing, if you are inclined to share.