[HN Gopher] Show HN: I made a live multiplayer Minesweeper game
       ___________________________________________________________________
        
       Show HN: I made a live multiplayer Minesweeper game
        
       Hi everyone! For several months now I've been stuck on the idea of
       a Minesweeper game that isn't just single player. This is what I
       came up with:  * Live games allowing several people to play at the
       same time  * Scoring system rewarding correct moves  * Grid size,
       mines count, and players count set to make games as balanced as
       possible
        
       Author : bluelegacy
       Score  : 154 points
       Date   : 2025-03-18 11:17 UTC (11 hours ago)
        
 (HTM) web link (www.minesweeperpro.com)
 (TXT) w3m dump (www.minesweeperpro.com)
        
       | latexr wrote:
       | > Scoring system rewarding correct moves
       | 
       | I felt this entirely undermined the stated goal. You didn't make
       | cooperative minesweeper but the exact opposite--competitive
       | minesweeper--because despite playing in the same board you're
       | both competing for who is faster and can get more _individual_
       | points.
       | 
       | True cooperation would be something like only one person being
       | able to reveal numbers and the other only being able to place
       | flags. Or each player having one turn at a time and all working
       | together to not lose (currently a wrong move is nothing but a
       | point loss, effectively removing consequences from the game).
       | 
       | Also, if it is possible at all, it wasn't clear how to place
       | flags on mobile.
        
         | bluelegacy wrote:
         | This is a fair point! It is a competitive multiplayer
         | minesweeper rather than co-op. but where everyone is rewarded
         | for their correct contributions to clearing the board. I'm
         | correcting the game descriptions related to this. Thanks!
         | 
         | Flag placements are touch & hold on mobile and right-click on
         | PC.
        
           | B7wY90Zu3Z wrote:
           | btw, those flag placements are not working for me.
        
         | oneeyedpigeon wrote:
         | One person revealing and the other placing flags is a really
         | nice twist -- I'd love to see how that works in practice.
        
         | Retr0id wrote:
         | Alternatively, you could have the grid be a checkerboard.
         | Player 1 can only interact with black tiles, Player 2 can only
         | interact with white tiles.
        
         | avodonosov wrote:
         | Another cooperation approach - something like voting for each
         | decision. E.g. majoriry must open a cell for it to really open.
        
       | georgeplusplus wrote:
       | Looks and plays awesome. I would love to do something similar. Do
       | you have anything to share that documents your accomplishment
       | that could help myself and others to get started into multiplayer
       | gaming?
        
         | ChicagoBoy11 wrote:
         | Not opp, but I built a real-time sensitive app for a few
         | friends of mine and have to say I was really impressed by
         | Firebase's realtime database. There were all sorts of issues
         | around concurrency/first-mover that I had to deal with that
         | firebase's implementation made it pretty straightforward to
         | address.
         | 
         | If I were trying to copy the same thing opp did, that'd be the
         | first place I'd reach if it were me.
        
       | csmattryder wrote:
       | Ok, that was fun. Pipped Ginko to the win by one point, they
       | should've calculated the last square was a flag faster than I
       | did.
       | 
       | It'd be cool to be able to put your own name in though, without
       | signing in. Just a suggestion.
        
       | phkahler wrote:
       | Can we have private matches? I've been playing usdoku with a
       | friend and we could use a new game. That one allows private
       | matches as well as public.
        
       | travisgriggs wrote:
       | Care to share what tech you used? What worked well and what
       | didn't? What you wish you could do differently?
        
       | cerebra wrote:
       | Far more addicting than I was prepared for. Nice work!
        
       | EGreg wrote:
       | Feels a bit like those arcade game machines w high scores, no?
        
       | Paturages wrote:
       | played as "birch", here's my first impressions and feedback
       | 
       | - my play style was definitely limited by the "2 actions per
       | second" limit (I had to actively control my pace), and also
       | disrupted by the info tooltip appearing over the cells I want to
       | click when those extra fast clicks happen to be towards the
       | bottom
       | 
       | - placing a mine counts as an action, which incentivizes farming
       | hunting mines while letting others explore for you if you're
       | aiming for points, this also is counterintuitive to how high-
       | level minesweeper efficiency works (you usually ignore mines that
       | are obvious to let the autofill work in the end to save time)
       | 
       | - I agree that the point system (especially the 2x round win
       | bonus) steers the game towards competitiveness rather than
       | cooperation
       | 
       | - mistakes, specifically left-clicking mines, could be more
       | punitive: maybe outright switch the player to a different room if
       | they "explode", which could encourage "safer" gameplay
       | 
       | - otherwise pretty fun! I think it's a solid foundation to build
       | more modes and features on
        
       | learncomputer wrote:
       | Cool twist on a classic! How did you handle syncing the game
       | state across players in real-time--WebSockets or something else?
       | Love seeing creative takes on old-school games like this
        
       | avodonosov wrote:
       | What LLM did you use for that?
        
       | dirkc wrote:
       | This is probably the first ShowHN where I wanted to see the app
       | much more than see the discussion, well done!
       | 
       | I played with 2 other players and we quickly cleared the field!
       | 
       | The only thing I missed was a way to celebrate the victory with
       | my fellow mine sweepers at the end.
       | 
       | Well done!
       | 
       | ps. I didn't really care about the competing, I was more curious
       | to see if people would collaborate and trust each other or
       | deliberate set mines off.
        
         | oneeyedpigeon wrote:
         | Our game reached an interesting stage where, I think, we were
         | forced to guess. Cue a _big_ pause until, eventually, someone
         | was brave enough to take the plunge and, fortunately, we won :)
        
       | deadbabe wrote:
       | Enemy players should be able to lay mines in untouched regions.
        
       | B7wY90Zu3Z wrote:
       | how do you place a flag? can't seem to figure that out :)
        
         | kerv wrote:
         | right click
        
           | B7wY90Zu3Z wrote:
           | strangely does not work for me
        
             | kqr wrote:
             | You must do it on a mine. If you do it on a clear square it
             | is revealed and you lose points.
        
       | pizzafeelsright wrote:
       | Not sure if I was playing AI or not but we were both good, I got
       | a 28 which was the higher score between us.
       | 
       | I am curious about the backend.
        
       | yangman wrote:
       | Neat! Takes me back to highschool...
       | https://lostmediawiki.com/Minesweeper_Flags_(lost_Windows_Li...
        
       | jsd1982 wrote:
       | On mobile I couldn't make a mistake. Every tap was charitably
       | interpreted as the correct action to take on that square whether
       | it be flagging a mine or revealing empty space / numbers. I
       | clicked every tile and never exploded a mine.
        
         | Retr0id wrote:
         | It seems like when you perform an incorrect action, it does the
         | right thing but you lose points.
        
         | Polemarch123 wrote:
         | Game design suggestions for preserving the Minesweeper flavour
         | (e.g. tension to not explode!) and to discourage random
         | guessing: - Every time you explode a mine, you can't perform
         | any actions for the next 5 seconds in addition to losing a few
         | points. - Exception: for the first little bit (say 5-10
         | seconds, or until a certain percentage of the board is opened)
         | no punishments for incorrect actions (maybe just scores, but
         | don't allow scores to go negative). - Modify flagging to be
         | private per-user information (don't provide any points for it)
         | and allow undoing flags. As someone else mentioned, this keeps
         | with the flavour of the original minesweeper where the goal is
         | clearing; mines are automatically flagged at the end.
        
       | acc_297 wrote:
       | Very fun - cool concept
        
       | kqr wrote:
       | I felt like a good strategy was to react quickly to when other
       | players revealed large parts of the board, and immediately mark
       | the "obvious" mines in there even though I was looking at another
       | part of the board. Though now that I think about it, marking
       | those mines is just as much a "correct" move as revealing the
       | numbers that come out of such marking activity, but I still have
       | a sense that it is a quick way to gain a few points.
        
       | netsharc wrote:
       | Feature request: allow the Windows 3.1 Minesweeper cheat code.
       | But I guess you'd have to disable scoring or even participation
       | if you allow this.
        
       | kenrick95 wrote:
       | This looks great and well polished!
       | 
       | Brings back memory to the hackathon project that's quite similar
       | to this that me and my friends did back like 9 years ago!?
       | https://github.com/SpanishArmada/Minesweeper-Battle?tab=read...
        
       | Dove wrote:
       | Delightful. I love the coopetetive aspect. I'd love to be able to
       | send a game link to people I know. :)
       | 
       | ... I naturally play faster than 2 moves per second sometimes.
        
       | andrewla wrote:
       | There are a couple of cooperative multiplayer minesweeper games
       | around -- of note is [1], which is an infinite (or very large)
       | persistent minesweeper world where you can just start solving
       | subsets of the board, and move up leaderboards, etc.
       | 
       | [1] https://m3o.xyz
        
         | airstrike wrote:
         | that is such a peaceful experience... good stuff
        
         | johnisgood wrote:
         | You need to sign up to play it though. :(
        
           | slig wrote:
           | You can play without signing up, just tried.
        
             | johnisgood wrote:
             | I get "Sign in to open and flags cells not adjacent to
             | already opened and flagged cells".
             | 
             | Other than that, it does work, you are right.
        
       | erkt wrote:
       | This is actually way too much fun. Congrats!
        
       | OsrsNeedsf2P wrote:
       | Would love private rooms to play with friends/coworkers :)
        
       | revskill wrote:
       | What tech stack do you use ?
        
       | dimava wrote:
       | If you didn't heard of it yet, there's a Minesweeper game where
       | you try to solve it Algorithmically
       | 
       | I.e. you make rules like "If there are 2 free cells around number
       | 2 them flag them" and the game recursively applies them to the
       | board
       | 
       | Except simple levels solve fast and in ten minutes you are on
       | monstrosities like                   ?2??         ?32?
       | 23x2  x-bomb         x?3?  ?-unknown
       | 
       | https://store.steampowered.com/app/2262930/Bombe/
        
         | Arnavion wrote:
         | For me Bombe was fun, but I lost interest once rules needed to
         | be complicated enough that I would have to run them for
         | multiple hours to solve further levels. You either end up
         | needing rules with four or five variables to apply fully
         | generally, or you break down and define a combinatorial
         | explosion of rules with some of those variables specialized.
         | The priority system doesn't work reliably either; I frequently
         | see a new rule I just added with max priority not running while
         | other slower rules keep running for thousands of ticks.
         | 
         | It's not the dev's fault because Minesweeper is inherently hard
         | for a solver (the game uses Z3) to solve in this way, but it
         | took the fun out of it for me. But the amount of fun I got
         | until I reached that point was well worth the sale price. (Also
         | I can never be too negative about a dev who supports Linux
         | first-class as brejc does.)
        
           | sdwr wrote:
           | I couldn't make heads or tails of the UI, honestly.
        
       | Matticus_Rex wrote:
       | Great stuff! Playing as meowth.
       | 
       | 3 clicks per second would be a big upgrade. It was hard not to go
       | over 2, but 3 would almost never screw me up.
        
         | Matticus_Rex wrote:
         | After a bit more play:
         | 
         | I'm sure skill-based matchmaking would make this waaaay more
         | complex, but a way to self-sort into skill buckets might be
         | nice. I suspect it's not fun for most people to play with me,
         | rapidash, or a few others I saw who are obviously long-time
         | players.
         | 
         | Also, mistakes should be more punitive. I saw a few people
         | random-clicking as quickly as they could, and in one case where
         | I came in halfway and just viewed the rest the guy almost won.
        
       | 01HNNWZ0MV43FF wrote:
       | What is the difference between "live multiplayer" and
       | "multiplayer"?
        
         | Arnavion wrote:
         | There are asynchronous multiplayer games like Super Auto Pets,
         | where you build a "team" of some sort and pit it against ghost
         | teams of other players who played recently. Though I can't
         | imagine how that would work for Minesweeper.
        
       | vladde wrote:
       | This is super fun!... until you meet someone who is just sweeps
       | (pun intended) the floor.
       | 
       | There is no way for me to even play with some players. I wish I
       | could "block" them, because the fun is gone when every tile is
       | gets completed before I can even react.
       | 
       | My best game was my first, where I played against people my
       | skill. Whenever the user "rapidash" is in the lobby, I might as
       | well just quit, since I won't be able to get in more than one or
       | two correct placements.
        
         | aswerty wrote:
         | I just assumed they were bots since they seem to be clicking at
         | the rate limit.
        
           | pessimizer wrote:
           | The rate limit is extremely low for good minesweeper players.
           | My mean time for finished expert games without marking is
           | something like 130 seconds. If I half-mark in order to use
           | the left+right click effectively, that knocks like 20 seconds
           | off.
           | 
           | The rate-limit seems to be 2 clicks/sec. a 130s time at
           | expert is 3.8 clicks/sec. My record is just a little more
           | than _half_ that.
        
             | Polemarch123 wrote:
             | I agree with this, for good Minesweeper players (my record
             | on expert is around 55 seconds) a rate limit of 3 per
             | second is low enough that it feels frustrating and glitchy.
             | I think I averaged approximately 5 clicks/second on vanilla
             | Minesweeper, but presumably with higher peaks. I imagine at
             | launch you're getting more curious first-time players, but
             | your community would likely gravitate towards more
             | experienced players over time.
             | 
             | A simple suggestion to encourage more fair matchmaking
             | without building a big system for it is to have separate
             | Beginner, Intermediate, and Advanced boards, and let
             | players self-select.
        
       | 90s_dev wrote:
       | Surprisingly fun, and a strange feeling to be interacting with
       | other people in this comment section so _immediately_ yet
       | opaquely.
        
       | apsv wrote:
       | Played a bit as "oxer", agree on all notes about the gameplay
       | being steered towards observing and competing rather than
       | collaboration. A few notes:
       | 
       | - Maybe flagging shouldn't trigger correctness checks: in
       | traditional minesweeper, placing a flag is just a marker of "I
       | believe there is a bomb here.", but to actually know you need to
       | check.
       | 
       | - Chording doesn't seem to be fully taken into account: sometimes
       | clicking a single empty spot will open up a large area, but still
       | only counts as one point. Maybe if flags aren't checked, chording
       | can become "dangerous" as it'll check multiple possible bombs.
       | 
       | - Not a fan of the action limit, but it serves as a skill leveler
       | of sorts. With a ranking system in place it probably wouldn't be
       | necessary from a gameplay perspective.
       | 
       | - If the objective is a collaborative experience, maybe taking a
       | spin on the game, like adding turns or planning, would be nice
       | 
       | Really fun
        
       | estacado wrote:
       | The context menu shows up when I right click. Very annoying.
        
       | naveed125 wrote:
       | This is neat
        
       | Matthias247 wrote:
       | Besides whats called out by others: It would be nice to have the
       | usual action of "press both mouse buttons" on a number to open
       | all non flagged fields around it. That reduces the amount of
       | required clicks a bit.
       | 
       | But maybe its intentional to avoid one player scoring too many
       | points at once?
        
       | Arnavion wrote:
       | If the rate limiter buffered your action instead of just
       | reverting it entirely, with some indication like a faded out
       | ghost to indicate that the action will be played out later, it
       | would be much better. Otherwise it's too frustrating to have to
       | click everything three times because the game keeps undoing what
       | you did.
        
       | jtbayly wrote:
       | That's a lot of fun. Thanks for sharing. When I read the title I
       | was thinking of a very different implementation, but I couldn't
       | figure out how to make it work.
        
       | admiralrohan wrote:
       | Working smooth. What is the business model? Don't see any
       | pricing.
        
       | hxorr wrote:
       | Minesweeper can be more difficult than meets the eye...
       | 
       | I made a minesweeper solver a couple years back that solves the
       | exact probability of a mine in any uncovered space
       | 
       | Its actually pretty hard, you have to factor in every single
       | possible permutation of mines in the uncleared areas. That's OK,
       | there are some optimisations you can do, but for certain board
       | configurations the processing time needed would skyrocket. I
       | suspect someone has made algorithms which solve it a lot faster
       | though.
       | 
       | There are some minesweeper games that only show you boards where
       | you can solve yourself algorithmically, where every space can be
       | cleared with 100% probability that it will not be a mine. But
       | what about making a game similar to that but it relying on the
       | player's ability to guess probabilities more, the game would
       | reward the player (ie, cleared space is not mine) if they
       | correctly choose the best possible play probability-wise (but
       | that otherwise would not be 100% certain).
       | 
       | I'm sure there are many other variants that could be made too
        
       ___________________________________________________________________
       (page generated 2025-03-18 23:01 UTC)