Show HN: A mastermind-like version of Wordle (playhurdle.vercel.app)

40 points by prvnsmpth ↗ HN
Wordle reminded me of Mastermind, a game I played as kid, so just for fun I made a version of the game that plays a lot more like Mastermind. I think this version is way more challenging :)

61 comments

[ 3.1 ms ] story [ 25.2 ms ] thread
Where can we find it? :)
The title of the post is also the link, just like any other HN post! This is the link: https://playhurdle.vercel.app/
I always understood URL and text to be mutually exclusive—I believe this is the first item I’ve ever seen that has both. Consequently, starting from the discussion page, when I saw the text I initially overlooked the fact that there was a URL too.

(And I just found my second. OK, so this is a thing now, is it? I rather liked how it was until a few months ago where you could submit a link, or plain text with no links. Now some text submissions get links linkified, and now apparently you can have both text and URL, even if the submission page’s text still suggests they’re mutually exclusive.)

Definitely more challenging but it needs some nice to haves like showing which letters haven't been guessed or that couldn't possibly matter (a zero, zero row). Also, I don't like having to press enter. But overall fun.
Yeah, I think a keyboard that shows used letters just like Wordle does would be a nice addition. Thanks!
Of course the trick there is... does the keyboard show letters as eliminated? That's the deduction you have to do in mastermind.

And if the keyboard highlighted "right place" letters for the most recent guess it wouldn't be mastermind.

So really it would just show letters you have or have not yet guessed, but without any indication on if they are right, or in the right place.

That's right, wouldn't want to make it too easy!
1. Might be also nice to handle 0-0 case separately and grey out all those letters both in the guesses on the board and perhaps in a separate keyboard as well.

2. Can go one step further, e.g. if a guess has X-0 and all there's only X cells that are not greyed out (see above), mark them as green in all correct guesses on board.

3. After these two steps, step 1 can be applied again since there will be more such cases where it can be applied.

You might argue that it steals from the game, but I'd disagree - it leaves the high level strategy to the player while saving them from dealing with the boilerplate. A very good example of that is Good Sudoku game (app), where they've tried to innovate on classic sudoku interface for similar purposes - I highly recommend checking it out since it's somewhat close to this game in some regards.

When I lose it doesn’t seem to tell me what the correct answer was, is that correct?
That's right, I wasn't sure whether the answer should be revealed or not, so I left it out. Do you think the answer should be revealed, or should the player be given more tries?
How about two buttons, one to show answer and one to retry?
Yeah I think that makes sense, will add that as an option for the player to choose.
I would say something like "keep guessing" instead of "retry" but good suggestion.
Cool game!

My first thought is a button for [Add Extra Try] to add one row, and another for [I Give Up - Tell Me]

I also second the thought on not using red as the colors for the correct letters. Perhaps white-on-green for the in-correct-position count and white or blue-on-light-gray for the -present-out-of-place count?

Yeah I think that's the way to go, will leave it up to the player to decide. Will also change the colors to match the green/amber color coding, thanks!
I thought the colors were a nice nod to Mastermind.

So perhaps a Mastermind theme and a Wordle them?

:) If it's worth the effort!

Yeah I guess so! It isn't too much work :)
the easy/hard mode should increase the number of tries a person can make.

also, would be nice to keep track of time taken in secs - as I find myself coming back to it between other tasks.

Agreed, tracking time is an interesting idea!
Very cool. And way more challenging.

A way to make this a bit easier would be allowing a nonexistent word once per game or something like that.

> the red tile indicates the number of correct characters in the correct position

I suggest using another color for that, as red is associated with error most of the time. Why not using the green/yellow for the numbers too?

Well, I chose red and white because those were the colors used to score in Mastermind :) But yeah, I suppose green/amber are better, and consistent with the color coding of the characters in the grid.

> allowing a nonexistent word once per game

That's a good suggestion, I guess I can introduce easy/hard modes and implement this in the easy mode. Thanks!

Fun and challenging! Looking forward to tomorrow's word.
Thanks! I hope you got today's word! I was able to guess it within 8 tries the last few times, but I failed today.
What's with Wordle like games popping out here on HN
It's the flavor of the month, for better or for worse :)
They're straightforward to code, fun to play, and someone just sold one for a million bucks.
You must have not been around during the floppening (a term I coined for the release of Floppy Bird to the world), when Floppy Bird clones abounded.
Can't backspace on Android chrome. To replace a letter I have to long press to highlight then hit my new letter
Oops, didn't try it on Android, thanks for pointing it out.
Don't know why but it takes 2 backspace to erase a letter on Android Firefox.
Well, you can blame my bad programming for that :)

When you press backspace, the focus shifts to the previous cell, deleting the contents of the current cell. When you've entered < 5 characters in the current row, the focus is on the next empty cell. So the first backspace only takes you back to the previous cell, and the second backspace clears the last entered character.

This is way more fun.

Wordle is cool, but short of purposely making bad guesses I'm not sure how anyone could lose at it.

I think Wordle is in part about how fast you can solve it, not just if you can.
Which is fair, but then it becomes more of a luck-based game because the luckiest first guesses will always yield the fastest 2/6 or 3/6 results. I play in an office of 60+ and first guess determines the winner most of the time.
Yeah, this was partly inspired by how easy it is to solve Wordle, 4/6 is doable in most cases. That said, I think most people play Wordle with the objective of getting a 3/6.
One tech note: please consider disabling autocorrect in the letter input fields, as I was getting popups whenever I entered an i.
Ah, yes I should have done that to begin with. Thanks!
Not sure how you make this more obvious, perhaps I'm just slow today, but I failed because I didn't twig that when I got a letter in the right place it would make the right hand number go _down_ as well as incrementing the left number. I.e. I thought the right number was the total correct letters rather than just the count of letters that were correct _and_ in the wrong place.
Ah, yes, I think the instructions should be a bit clearer about that.
each game should have an id that can be retrieved, so a link can be shared for that particular word...
An easy mode could provide a querty keyboard that one can eliminate letters.
My two favourite starting words (SOARE and CLINT[0]) are tagged as invalid here, whereas they're valid in the original game. Literally unplayable /s

(Seriously - cool idea, nice execution!)

[0] https://blog.scubbo.org/posts/cheating-at-word-games-part-2/

Thanks :) I'm going to update the dictionary to use the same one as Wordle's, so that should be fixed.
Very nice. I agree with keeping track of which letters were guessed, maybe giving users the ability to set flags on them to keep track of their deductions in place of auto-eliminating them.

My first real program (age 8) was an implementation of mastermind written in gwbasic. IIRC it worked surprisingly well.

Request - cursor keys, overtyping, delete, etc should work better. Right now there are a few glitches in the cells.

Got it in four, thanks to use of grep with the "enable1" word list and a bit of luck. Nicely done.
This is a cool concept especially now that the old one got susbsumed by the NYT.

I am currently using https://wordlle.app, but it still contains Google Analytics.

Does anyone here know of a clone that has absolutely zero tracking?

Take 2 or 3 presses for Enter to submit on Firefox on Android.
Thanks for pointing it out! Gotta fix this on Android...
I can't find a way to exit the "how to play" screen. Hitting back on Android exits the game.
Any tips on how to solve them? I start off with words like 'piano' and 'lemur' to get some idea of which characters to include, but after that it just seems like a brute force challenge?

E.g. let's say 'piano' gives you 0/1 and 'lemur' gives you 1/0, how do I proceed from there?

I'd know that the word will contain one of 'lemur' in that exact position, and none of the others. Likewise one of 'piano' but not in that position.

So the number of combinations possible right now is 5x(5x4)=100, each with 3 open slots that can contain 26-8=18 other characters. So 100x18x18x18=583200 options. And I only have a few guesses left.

So let's see if we can narrow it down with a word like 'jumpy'. I'm already screwing up now because I've used the letters 'u' and 'p' before already. Let's say 'jumpy' returns 0/0.

Did this narrow a lot down for me? I now know that we can ignore p and u, which means our options went down from 583200 options to 216000 options.

If I keep this up, I might get down to roughly 14000 options by the final line. Granted that only a few of these will be valid words, but still more than enough options to randomly guess.

So far I have not been able to get more than 1 letter correct.