8 ms·
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
- pizzafeelsright 2y agoNot 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.
- latexr 2y 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.
- bluelegacy 2y agoThis 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 2y agobtw, those flag placements are not working for me.
- oneeyedpigeon 2y agoOne person revealing and the other placing flags is a really nice twist — I'd love to see how that works in practice.
- Retr0id 2y agoAlternatively, 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 2y agoAnother cooperation approach - something like voting for each decision. E.g. majoriry must open a cell for it to really open.
- georgeplusplus 2y agoLooks 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 2y agoNot 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 2y agoOk, 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 2y agoCan 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.
- deleted 2y ago[deleted]
- travisgriggs 2y agoCare to share what tech you used? What worked well and what didn’t? What you wish you could do differently?
- cerebra 2y agoFar more addicting than I was prepared for. Nice work!
- EGreg 2y agoFeels a bit like those arcade game machines w high scores, no?
- Paturages 2y agoplayed 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
- nstart 2y agoDefinitely 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.
- eCa 2y 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.
- deleted 2y ago[deleted]
- learncomputer 2y agoCool 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 2y agoWhat LLM did you use for that?
- dirkc 2y agoThis 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 2y agoOur 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 2y agoEnemy players should be able to lay mines in untouched regions.
- B7wY90Zu3Z 2y agohow do you place a flag? can't seem to figure that out :)
- kerv 2y agoright click
- B7wY90Zu3Z 2y agostrangely does not work for me
- kqr 2y agoYou must do it on a mine. If you do it on a clear square it is revealed and you lose points.
- retroflexzy 2y agoNeat! Takes me back to highschool... https://lostmediawiki.com/Minesweeper_Flags_(lost_Windows_Live_Messenger_game;_2000s) https://lostmediawiki.com/Minesweeper_Flags_(lost_Windows_Li...
- jsd1982 2y agoOn 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 2y agoIt seems like when you perform an incorrect action, it does the right thing but you lose points.
- Polemarch123 2y agoGame 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 2y agoVery fun - cool concept
- kqr 2y agoI 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 2y agoFeature 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 2y agoThis 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=readme-ov-file#demo https://github.com/SpanishArmada/Minesweeper-Battle?tab=read...
- Dove 2y agoDelightful. 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 2y agoThere 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 https://m3o.xyz
- airstrike 2y agothat is such a peaceful experience... good stuff
- johnisgood 2y agoYou need to sign up to play it though. :(
- slig 2y agoYou can play without signing up, just tried.
- johnisgood 2y agoI 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 2y agoThis is actually way too much fun. Congrats!
- OsrsNeedsf2P 2y agoWould love private rooms to play with friends/coworkers :)
- revskill 2y agoWhat tech stack do you use ?
- dimava 2y agoIf 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/ https://store.steampowered.com/app/2262930/Bombe/
- Arnavion 2y agoFor 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 2y agoI couldn't make heads or tails of the UI, honestly.
- Arnavion 2y agoThe 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
- Matticus_Rex 2y agoGreat 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 2y agoAfter 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 2y agoWhat is the difference between "live multiplayer" and "multiplayer"?
- Arnavion 2y agoThere 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.
- dspillett 2y agoMultiplayer 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 https://en.wikipedia.org/wiki/Correspondence_chess
- vladde 2y agoThis 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 2y agoI just assumed they were bots since they seem to be clicking at the rate limit.
- pessimizer 2y agoThe 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 2y agoI 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.
- mitsu_at 2y agoI'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.
- 90s_dev 2y agoSurprisingly fun, and a strange feeling to be interacting with other people in this comment section so immediately yet opaquely.
- apsv 2y agoPlayed 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 2y agoThe context menu shows up when I right click. Very annoying.
- naveed125 2y agoThis is neat
- bschmidt80 2y ago[flagged]
- Matthias247 2y agoBesides 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 2y agoThat does work already. You don't even have to use both mouse buttons, just left click is enough.
- Arnavion 2y agoIf 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.
- nerflad 2y agoAlso, 2 APS is hardly competitive in this game.
- tastenbier 2y ago[dead]
- jtbayly 2y agoThat’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 2y agoWorking smooth. What is the business model? Don't see any pricing.
- hxorr 2y agoMinesweeper 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
- zoidb 2y agoCan you write a bit how you built it and what tech was used?
- Jean-Papoulos 2y agoThe 1s limit is sooooo frustrating for someone who knows how to solve the game efficiently :')
- maliniakh 2y agothe 1s limit is too restrictive for somebody who used to be the second best in the world :)
- bluelegacy 2y agoThanks 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!
- Matticus_Rex 2y agoAwesome. When you're ready to scale it a bit some social sharing stuff would probably make it pick up a lot.
- specproc 2y agoTotally pwning these n00bs.
- robertlagrant 2y agoThis is extremely fun. Great idea! How did you do the multiplayer comms?
- boxed 2y ago100% broken. Placing a flag reveals instantly if your guess is correct or not. This is not how minesweeper works.
- Matticus_Rex 2y agoThis 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).
- boxed 2y agoPunished how? You win by just placing mines everywhere...
- Matticus_Rex 2y agoNo, you win by having the most points. Guessing wrong loses points.
- boxed 2y agooh, I thought it was cooperative. Well that makes much more sense then.
- Toby1VC 2y agoFirst 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.