The idea for the game came to me in a dream (really) and I built the puzzle generator with my partner, who's also a software engineer. It's a labor of love! Any feedback or suggestions are welcome. Thanks for playing!
I would love a dictionary lookup. I'd expect a big part of the strategy to be working backwards from the possible 1/2 letter words, but there's no way to tell how reasonable the dictionary is without testing, and getting the game into the proper state to test would be just as hard as solving the puzzle in the first place.
Having two separate goals (eliminate all letters, find all the words) seems confusing. Honestly I find the latter to be a fairly tedious prospect, but the game really seems to push you toward it especially with the colors on the calendar depending on the % of words found. "Damn it, I got a perfect score with no undos, and all I have to show for it is a red square showing how bad a job I did!"
The UI (on a desktop) felt kind of broken at the start because nothing has hover effects. Anything clickable would benefit from some kind of an effect, but especially the letters on the words. If you don't want color changes or animations, at least set the cursor style.
The desktop UI suggestions are also very helpful. I've updated the desktop version with some minor hover effects and cursor styling. I've mostly been focused on mobile, so it was good hear some feedback for desktop.
solve("brats herbs", Steps).
and seeing: Steps = ['rats herbs', 'rat herbs', 'rat hers', 'rat her', rather, rater, rate, ate, at, a, ''] ;
The core is this grammar: whittle(S0) --> [S1], % state S1 comes from
{ select(_, S0, S1), % removing a char from S0,
phrase(valid_state(_), S1) }, % S1 must be all words,
whittle(S1). % and recurse.
whittle([]) --> [].
which describes a solution as a list of successful state changes from input to empty string. Each change removes one character from the string and must leave a valid state after doing that. Prolog's implicit backtracking search means that when it tries "cat","at","t" the valid_state check fails because "t" is not in the wordlist, it backtracks to the previous state "cat","at" and retries, getting to "cat,"at","a","" and success.So it's doing a depth-first search of the tree of all possible game states that come from removing each letter from each substring, only exploring each branch as deep as the first failure. It stops at the first success, but spacebar or 'next' will search for another solution. Find all 136 solutions by querying: findall(Steps, solve("brats herbs", Steps), Solutions).
It won't work in Scryer, it would need select/3 and the DCG helpers ported/included in the code, then changes to run on strings instead of character code lists. It would likely be more memory efficient then.
And I agree it would be nice if the game could detect when you've reached a dead end and notify you somehow.
rat he
It doesn't accept "rate" as a correct word. What am I doing wrong?
— my wife
That’s three puzzles in a row that she did first try. Nice work on the game.
https://news.ycombinator.com/item?id=44714167
Great work!
It’s also easy to accidentally spoil the game by clicking the unlabeled right tab. EDIT: Oops, didn't realize that was the words discovered list, not the complete wordlist. This should have a label to make it clearer.
Also, in the help screen, the dots in the UI made me expect to swipe (on mobile) to navigate between screens, so that was a bit confusing at first.
https://gist.github.com/IanCal/f3deffd5961a2cc2860094a4d68ed...
Uncaught TypeError: can't access property "puzzleLog", G is null
Other than that, nicely done game.
Also, Aug 4 was broken-- please try again for a new, solvable puzzle :)
Uncaught TypeError: Cannot read properties of null (reading 'puzzleLog')
Q -> O
W -> V
ETIPFHKLNM -> I
E -> F
B-> RP
R -> P
U -> J
GO -> C
M -> V
rat he
I remove "h" but it doesn't accept "rate" as a correct word. Am I missing something?