Show HN: I made a live multiplayer Minesweeper game
242 points
1 month ago
| 46 comments
| minesweeperpro.com
| HN
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

dimava
1 month ago
[-]
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/
reply
Arnavion
1 month ago
[-]
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.)

reply
sdwr
1 month ago
[-]
I couldn't make heads or tails of the UI, honestly.
reply
Arnavion
1 month ago
[-]
The dev does have a penchant for making dense and obtuse UI, but once you get used to it it stops being a problem. I remember when I first booted up Bombe I thought the UI looked as obtuse as the one in ComPressure, went to Steam to check, and lo and behold it was the same dev :D
reply
andrewla
1 month ago
[-]
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

reply
airstrike
1 month ago
[-]
that is such a peaceful experience... good stuff
reply
johnisgood
1 month ago
[-]
You need to sign up to play it though. :(
reply
slig
1 month ago
[-]
You can play without signing up, just tried.
reply
johnisgood
1 month ago
[-]
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.

reply
Arnavion
1 month ago
[-]
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.
reply
nerflad
1 month ago
[-]
Also, 2 APS is hardly competitive in this game.
reply
Paturages
1 month ago
[-]
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

reply
nstart
1 month ago
[-]
Definitely agree on the left clicking of mines requiring something a little more harsh. Possibly a 2 mistake max before exploding you out of the game or maybe a cool down timer which doubles on each explosive error.
reply
eCa
1 month ago
[-]
> counterintuitive to how high-level minesweeper efficiency works

Yep, once upon a time I was a reasonably fast player. All my best times (PB around 80 seconds on the large board) were done without flagging mines.

reply
dirkc
1 month ago
[-]
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.

reply
oneeyedpigeon
1 month ago
[-]
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 :)
reply
kenrick95
1 month ago
[-]
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...

reply
latexr
1 month ago
[-]
> 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.

reply
bluelegacy
1 month ago
[-]
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.

reply
B7wY90Zu3Z
1 month ago
[-]
btw, those flag placements are not working for me.
reply
avodonosov
1 month ago
[-]
Another cooperation approach - something like voting for each decision. E.g. majoriry must open a cell for it to really open.
reply
Retr0id
1 month ago
[-]
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.
reply
oneeyedpigeon
1 month ago
[-]
One person revealing and the other placing flags is a really nice twist — I'd love to see how that works in practice.
reply
apsv
1 month ago
[-]
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

reply
yangman
1 month ago
[-]
reply
vladde
1 month ago
[-]
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.

reply
aswerty
1 month ago
[-]
I just assumed they were bots since they seem to be clicking at the rate limit.
reply
pessimizer
1 month ago
[-]
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.

reply
Polemarch123
1 month ago
[-]
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.

reply
Suppafly
1 month ago
[-]
>The rate limit is extremely low for good minesweeper players.

This, I'm not good at minesweeper, but I've watch people who are and they generally clear a board before I even realize what's going on. I suppose it's a bit like NERTS, the multiple player solitaire, if you aren't that great at immediately recognizing solitaire moves, someone else beats you too them. I can play it with people I know but when I play with randoms that play all the time, I quickly lose.

reply
mitsu_at
1 month ago
[-]
I'm not that fast, but I often ran into the rate limit in situations where e.g. I know where the next handful of flags are, and I click in bursts.
reply
hxorr
1 month ago
[-]
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

reply
csmattryder
1 month ago
[-]
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.

reply
Toby1VC
1 month ago
[-]
First impression was that you prompted some LLM to make this.

The game itself is fun and has character (like the animated face).

And the subtle encouragement to login to not reset points is clever.

reply
kqr
1 month ago
[-]
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.
reply
cerebra
1 month ago
[-]
Far more addicting than I was prepared for. Nice work!
reply
Matthias247
1 month ago
[-]
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?

reply
Arnavion
1 month ago
[-]
That does work already. You don't even have to use both mouse buttons, just left click is enough.
reply
bluelegacy
1 month ago
[-]
Thanks for all the feedback! I hear you guys and am working on adding these in the following days:

1) Fast-paced mode

2) Private games

Cheers!

reply
Matticus_Rex
1 month ago
[-]
Awesome. When you're ready to scale it a bit some social sharing stuff would probably make it pick up a lot.
reply
georgeplusplus
1 month ago
[-]
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?
reply
ChicagoBoy11
1 month ago
[-]
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.

reply
jtbayly
1 month ago
[-]
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.
reply
phkahler
1 month ago
[-]
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.
reply
netsharc
1 month ago
[-]
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.
reply
90s_dev
1 month ago
[-]
Surprisingly fun, and a strange feeling to be interacting with other people in this comment section so immediately yet opaquely.
reply
Matticus_Rex
1 month ago
[-]
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.

reply
Matticus_Rex
1 month ago
[-]
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.

reply
boxed
1 month ago
[-]
100% broken. Placing a flag reveals instantly if your guess is correct or not. This is not how minesweeper works.
reply
Matticus_Rex
1 month ago
[-]
This is how this game works, and all wrong answers (including flags) get punished. You obviously can't port 1:1 minesweeper to a non-single-player environment, but this is basically minesweeper with as few changes as necessary (though I do think some tweaking would make it better).
reply
boxed
1 month ago
[-]
Punished how? You win by just placing mines everywhere...
reply
Matticus_Rex
1 month ago
[-]
No, you win by having the most points. Guessing wrong loses points.
reply
boxed
1 month ago
[-]
oh, I thought it was cooperative. Well that makes much more sense then.
reply
pizzafeelsright
1 month ago
[-]
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.

reply
erkt
1 month ago
[-]
This is actually way too much fun. Congrats!
reply
travisgriggs
1 month ago
[-]
Care to share what tech you used? What worked well and what didn’t? What you wish you could do differently?
reply
Jean-Papoulos
1 month ago
[-]
The 1s limit is sooooo frustrating for someone who knows how to solve the game efficiently :')
reply
maliniakh
1 month ago
[-]
the 1s limit is too restrictive for somebody who used to be the second best in the world :)
reply
01HNNWZ0MV43FF
1 month ago
[-]
What is the difference between "live multiplayer" and "multiplayer"?
reply
Arnavion
1 month ago
[-]
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.
reply
dspillett
1 month ago
[-]
Multiplayer is a more general term that encompasses things like turn-based multi-player which could be anything from live-ish (people taking turns immediately after each other, like traditional board games) to very high latency (like chess by post¹).

--------

[1] https://en.wikipedia.org/wiki/Correspondence_chess

reply
robertlagrant
1 month ago
[-]
This is extremely fun. Great idea! How did you do the multiplayer comms?
reply
revskill
1 month ago
[-]
What tech stack do you use ?
reply
admiralrohan
1 month ago
[-]
Working smooth. What is the business model? Don't see any pricing.
reply
jsd1982
1 month ago
[-]
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.
reply
Polemarch123
1 month ago
[-]
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.
reply
Retr0id
1 month ago
[-]
It seems like when you perform an incorrect action, it does the right thing but you lose points.
reply
zoidb
1 month ago
[-]
Can you write a bit how you built it and what tech was used?
reply
OsrsNeedsf2P
1 month ago
[-]
Would love private rooms to play with friends/coworkers :)
reply
B7wY90Zu3Z
1 month ago
[-]
how do you place a flag? can't seem to figure that out :)
reply
kerv
1 month ago
[-]
right click
reply
B7wY90Zu3Z
1 month ago
[-]
strangely does not work for me
reply
kqr
1 month ago
[-]
You must do it on a mine. If you do it on a clear square it is revealed and you lose points.
reply
deadbabe
1 month ago
[-]
Enemy players should be able to lay mines in untouched regions.
reply
acc_297
1 month ago
[-]
Very fun - cool concept
reply
EGreg
1 month ago
[-]
Feels a bit like those arcade game machines w high scores, no?
reply
estacado
1 month ago
[-]
The context menu shows up when I right click. Very annoying.
reply
specproc
1 month ago
[-]
Totally pwning these n00bs.
reply
naveed125
1 month ago
[-]
This is neat
reply
Dove
1 month ago
[-]
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.

reply
avodonosov
1 month ago
[-]
What LLM did you use for that?
reply
learncomputer
1 month ago
[-]
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
reply