[HN Gopher] Show HN: The classic Minesweeper on an irregular grid
___________________________________________________________________
Show HN: The classic Minesweeper on an irregular grid
I'm experimenting game mechanics that are usually seen on a typical
grid, but transposed on an irregular one. This is a first game
based on Minesweeper. The changes an irregular grid brings are
that cells don't all have 8 neighbors. Some can have less, some can
have more. So when you try and deduce if a tile has a mine, you
have to pay closer attention at the number clues and which tiles
neighbors it. My intention is to make a very classic game a bit
more challenging & fun. I've also released a first version of
Checkers/Draughts, and plan to test similar variants for Chess,
Othello and Go.
Author : frading
Score : 93 points
Date : 2024-02-02 18:48 UTC (4 hours ago)
(HTM) web link (polyreplay.com)
(TXT) w3m dump (polyreplay.com)
| netsharc wrote:
| Neat... but I'm missing the left+right click, in the Windows
| Minesweeper, say you have a square with 4, and you've marked 4
| squares around it as bombs, you can left+right click on the
| 4-square and uncover all the unmarked squares around it, instead
| of going one by one.
|
| Also "undo" is cool, but "lose 60s" seems backwards, considering
| one would get 60 seconds added to one's time.
| umvi wrote:
| left+right click reveal works for me (linux + chrome 120).
| Middle click also does the same as left+right click.
| frading wrote:
| Thanks a lot for trying it and the feedback. As a sibling
| comment said, left+right click should work (as well as middle
| click). Which OS/browser are you using? I like to fix this.
|
| And you're right for "lose 60s", It's not the ideal wording. I
| was thinking it in terms of the less time you end up with, the
| better your score is. But "gain 60s" wouldn't work either. I'll
| have a think, but curious to hear if anyone has suggestions for
| this.
| baobun wrote:
| "+60s"?
| Szpadel wrote:
| maybe "60s penalty" would be better wording?
| frading wrote:
| yes, that's indeed better, thanks a lot for your help, I
| appreciate.
| piranha wrote:
| Middle click does not work for me on a Mac. Maybe cmd+click
| or double click would be ok to do?
| frading wrote:
| Thanks a lot for the feedback and suggestion. And yes, I
| think it makes sense to add those.
| o11c wrote:
| Middle-click to progress works, but middle-click to flash
| (with no net effect, just so you can count) doesn't. This
| would really help work around the unintuitive neighbors
| problem mentioned elsewhere.
| frading wrote:
| ah yes. I have not added that, but it's on my list. I
| completely agree it would help. I'll see if I can get to
| it. Thanks a lot for the nudge, that's super useful.
| alanbernstein wrote:
| "suffer 60s"
| TehShrike wrote:
| I'm using a trackpad, so I don't have middle-click or
| right+left-click - could you make a single-click or double-
| click on the number cause the clear?
| nyanpasu64 wrote:
| I'm used to double-clicking to perform the same action.
| dorianmariefr wrote:
| I got tricked, nice
| https://gist.github.com/dorianmariefr/652c1c6c5b84cc242b6692...
| frading wrote:
| Nice! Almost there. Still, you're now ready to move on the
| intermediate/expert grids :D
| dorianmariefr wrote:
| And for the Checkers https://polyreplay.com/checkerstwist
| pjsg wrote:
| I'd like to have the option to show "remaining" mines. I've
| played https://pwmarcz.pl/kaboom/ enough in "countdown mode"
| (i.e. where the numbers are the number of hidden mines) that I
| can't adjust to this....
| frading wrote:
| On the left of the face emoji, in the top bar, you should see
| the number of remaining mines. It's not exactly like the
| version you linked, which should "number found / total", as
| what I show is simply "remaining mines". Is that what you mean?
|
| Although the number I show is actually a bit sneaky, as I
| subtract the number of flags placed to the total number of
| mines. So if you were to place more flags than mines, you'd see
| a negative number. (which I realise as I type that your version
| is similar, as the number can also go above the total).
| mminer237 wrote:
| Neat. Does this ensure there's no 50/50 guesses needed then? That
| seems easier when you can split a square in two.
| frading wrote:
| It doesn't sadly. I had tried to implement that, but couldn't
| find a provable way to prevent 50/50. It's especially trickier
| as I can't use an algo with just rows and columns, it has to
| work on a graph. And it would need to be fast enough as to not
| slow the grid generation (which already takes a few seconds on
| the maximum size). So I'd love to add this ultimately, but not
| entirely sure I'll have the resources.
| quectophoton wrote:
| Also though they are rare, there are some nasty beginnings
| too, like this one: https://imgur.com/a/tjHg5if
|
| I might be overlooking something tho.
| frading wrote:
| ah yes, it's a nasty one. I can't see an obvious way to
| progress without luck either.
| SnooSux wrote:
| There are definitely ways to progress from here, but they
| may be more advanced?
|
| The 1 SouthEast of the bottom 2 touches two tiles, and
| the 1 immediately West touches a superset of those two.
| The difference between the larger and smaller set must be
| clear. And you can go further off of that.
| frading wrote:
| ah yes, very well spotted! as the dev, I should really
| have seen that.
| milicat wrote:
| This is really cool. Fascinating how the intuition maps neatly
| onto this grid
|
| As a notorious Minesweeper speedrunner I find the animation
| uncover animation when middle clicking to be a little slow as I
| find myself waiting it for it to finish for a second or so.
| frading wrote:
| ah very interesting!
|
| I've done quite a few iterations of the speed at which they get
| uncovered, and it's definitely tricky to nail down. I've tried
| to find a middle ground between something that's
| rewarding/satisfying (so should take 1-2 seconds, long enough
| to be enjoyed), but also doesn't block you (so should be
| instant). And that animation would need to very different if
| it's revealing 10 tiles or less, or 500+. I realize this still
| isn't quite right.
|
| So thank you for saying that, I'll try and improve it.
| viraptor wrote:
| An idea (not sure if it will work well) - how about
| uncovering fields with a "wave" rather than one by one? So
| instead of linear time, make it linear-by-distance time.
| First reveal the original tile, then its neighbours, then
| their neighbours, ... It should still feel pretty fluid, but
| faster.
| frading wrote:
| If I understand correctly what you're describing, it's more
| or less what's happening now. But it may not look like it
| if you're on the beginner grid, and may only look
| good/better on the larger grids (either expert size, or
| custom with very large size).
|
| But in short, when you uncover the first tile of this wave,
| at each frame I uncover only 1/60 of the total. So if
| you've uncovered 600 tiles, 10 should be uncovered on each
| frame, and it should be done in 1 second if your display is
| at 60FPS.
|
| But if you uncover 60 tiles only, it will uncover 1 per
| frame, and that can look pretty bland. Could it be what you
| see? If that's the case, I believe (with a good 60%
| certainty!) that I mostly need to revisit the method when
| it's for a small number of tiles.
| viraptor wrote:
| Yes, I'm on a small grid, so only see a "chain" of the
| boxes being uncovered one by one. It does feel pretty
| slow, even though I'm nowhere close to speed solving : -
| )
| ghostly_s wrote:
| Cool, thanks for making it mobile-friendly--though on my (small)
| phone screen, the tutorial dialog covers half the play board and
| couldn't he completed. the actual game works fine.
|
| Been awhile since I played actual minesweeper, but shouldn't
| revealing a tile with a number on it which otherwise has empty
| neighbors also uncover those neighbors? I could swear that's how
| the original works.
| frading wrote:
| ah very sorry about the dialog being too large. Which phone
| have you used it on? I should really fix this.
|
| I've tested on an iphone mini, and even though the dialog is
| quite big on it, so I should indeed try and shrink it, it
| doesn't prevent completing the tutorial. But it looks like I
| wrongly assumed this would be the smallest phone I could test
| it on.
|
| And as far as I know, the empty tiles only gets uncovered if
| you uncover another empty one, so I followed this principle. If
| that was also the case when you uncover a number, this would
| reveal too much.
| polygotdomain wrote:
| I love this, and it brings an interesting twist to an old
| favorite. What initially tripped me up is the cells at the points
| are considered a neighbor. Of course as I write that it makes
| perfect sense, but because of the irregular nature it's a bit
| harder for me to register them as such. Not a complaint, just an
| intriguing side effect of the irregular grid.
| frading wrote:
| Yes, completely agree. It does take time to get used to it. And
| even after having playing many games of this one, I can still
| trip me up at times.
| dhimes wrote:
| What a cool idea! Nice job.
| frading wrote:
| thanks a lot!
| kaesve wrote:
| neat! I've wanted to add irregular grids to my infinite
| minesweeper. Playing your version, it definitely adds something.
| How do you generate your grid? Is it voronoi cells on top of blue
| noise?
| frading wrote:
| Thanks a lot. And I've had some thought about making this
| infinite, but it's a bit harder!
|
| The generation is inspired by what Oskar Stalberg has done for
| his game Townscaper. It is done with those steps: - start with
| triangles (ideally in an hexagonal pattern). - merge pairs of
| triangles into quads, randomly leaving some as triangles. - we
| subdivide both quads and triangles, and end up with quads only.
| - smooth the whole to get nicer shapes
|
| It can be a bit abstract with just this list, so you can see
| some videos in my tweet:
| https://twitter.com/fradingue/status/1712218108826460428
|
| I've also created a webgl engine to solve this type of
| procedural modeling for the web, and you can see 2 examples
| scenes where you can play with parameters that affect the shape
| of the irregular grid: -
| https://polygonjs.com/gui/irregular_quads/edit -
| https://polygonjs.com/gui/irregular_quad_relaxation/edit
| quectophoton wrote:
| Looking at the high scores, is that "." a decimal separator? Are
| those scores for the beginner difficulty "one and a half
| seconds"?
| dmoy wrote:
| Sub 0.5 second is world record for normal beginner minesweeper.
| So, could be, yea.
| frading wrote:
| interesting, I wasn't aware of that. Is there an official
| list?
| frading wrote:
| Yes, you're correct, it's the decimal separator. I remember now
| that this is not international. I believe the comma is used in
| the US? Having grown up in France, I'm used to the dot.
|
| And that score is indeed suspicious, although there are some
| protections to prevent cheating. Someone would have to be quite
| motivated to go around them. But it might be possible, as you
| don't need to flag all the mines in order to win, you can wind
| by just uncovering the non-mines. I felt this could be allowed
| as this is really the same outcome. But I can see that if
| you're really lucky, the mines are placed in a very convenient
| way, a quick win could happen. But I assume this can only
| happen on the beginner grid, not on the larger ones.
|
| In any case, I'll reconsider this, and may force all mines to
| be flagged in order to win, that might be safer.
| rrr_oh_man wrote:
| Excellent on iPhone 12 mini. Love it. Thank you for sharing!!
|
| Q: Would it be possible to make the grids... even more random?
| What's your gridding approach? I was almost a bit "disappointed"
| that the grids still looked like, well, grids.
| frading wrote:
| Thanks a lot to you for the kind words, that's great to read!
|
| And I explain the generation method in another comment, but
| here it is as well:
|
| -------------------- The generation is inspired by what Oskar
| Stalberg has done for his game Townscaper. It is done with
| those steps: - start with triangles (ideally in an hexagonal
| pattern). - merge pairs of triangles into quads, randomly
| leaving some as triangles. - we subdivide both quads and
| triangles, and end up with quads only. - smooth the whole to
| get nicer shapes
|
| It can be a bit abstract with just this list, so you can see
| some videos in my tweet:
| https://twitter.com/fradingue/status/1712218108826460428
|
| I've also created a webgl engine to solve this type of
| procedural modeling for the web, and you can see 2 examples
| scenes where you can play with parameters that affect the shape
| of the irregular grid:
|
| - https://polygonjs.com/gui/irregular_quads/edit
|
| - https://polygonjs.com/gui/irregular_quad_relaxation/edit
| --------------------
|
| So even though you're currently seeing a flat grid, it's all 3D
| under the hood. So I'm also considering having those grids on a
| sphere, a torus, or even a custom 3D model. I had done some
| earlier test:
| https://polygonjs.com/gui/minesweeper_torus_sphere/edit So it's
| technically possible, but there's more work to have this easy
| to navigate around, and to still look visually minimalist while
| still being pleasant.
|
| If the steam version becomes profitable, I'll definitely
| explore those directions. I agree this can be stretched
| further.
| jyap wrote:
| Lol this kept me entertained for a bit. Found it a couple of
| weeks ago.
|
| Hoping my number 1 ranking on Intermediate stays up a while.
|
| I'll need to see if I can crack that Expert high list.
|
| Cheers
| frading wrote:
| ah welcome back! For the scores, right now, they all keep
| accumulating on the same page, but I may do weekly/monthly
| lists, so previous highscores won't stay on the main page for
| too long.
| Rygian wrote:
| Bug report:
|
| https://ibb.co/Db44nWp
|
| The orange arrows point to a cell that should show "2" but shows
| "1."
|
| EDIT: Nevermind :-)
| ryannevius wrote:
| There are a lot of bugs in that screenshot
| city41 wrote:
| I think it's ok. One of the mine spots is incorrectly
| labeled. The spot that the upper orange arrow is touching is
| not a mine.
| stuart73547373 wrote:
| actually none. 2nd flag from the top is wrong
| frading wrote:
| Thanks a lot for the feedback. Although I've received several
| bug reports like this, and unfortunately every time, it was the
| player who placed a flag incorrectly. So at the moment I'm more
| leaning to one of those 2 flags being incorrect. I think out of
| those 4 flags, the second from the top shouldn't have been
| placed.
|
| But my assumption can certainly be wrong! To be sure, could you
| take a screenshot of a loosing screen? as all the mines will be
| revealed then, and we can see if the number is indeed correct
| or not.
| g105b wrote:
| Love it. It feels great, and I particularly like that you can
| left-right click on the numbers like a pro!
| mtlmtlmtlmtl wrote:
| This is really cool. I have wasted far too many hours playing
| minesweeper and this adds a bit of challenge back to a game
| that's become a bit too mundane for me(I mostly play it to fall
| asleep now).
|
| I will say though that it seems like the map ends up a bit empty,
| reducing the difficulty. Managed to get through the expert
| setting without encountering a single 5, for instance.
|
| And a question: Does this generate maps where guessing is
| necessary, like the original? I didn't come across any, and I was
| curious whether that was by accident or design. I hate those
| situations in what is supposed to be a logic game.
|
| Great work!
| labster wrote:
| I couldn't beat the tutorial on iPhone SE, the modal text covers
| where the game needs you to click
___________________________________________________________________
(page generated 2024-02-02 23:00 UTC)