Crushing Minesweeper | Game Dev's Revenge

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 92

  • @3v1l73ddy
    @3v1l73ddy Год назад +67

    Are you a duck, turtle, chameleon? Cause that's kinda cool but I can't figure out if I'm right about the duck part at least... Anyway, on topic, great video!

    • @uselessgamedev
      @uselessgamedev  Год назад +88

      It's an interpretation of the Kappa, a creature from Japanese folklore, it's a turlte-like water dwelling spirit that lives near water and "pranks" people ("pranking" goes from splashing to leading kids to their death drowning them).
      They have a bowl-shaped cavity at the top of their head that holds water, if they lose this water they lose their abilities.
      You can see them in tons of video games, the one that comes to mind is _Sakuna: of rice and ruins_ (great game).
      The art is made by Boskoop (link to their stuff in the description).
      It does look like multiple animals though, with the duck bill and turtle shell

    • @3v1l73ddy
      @3v1l73ddy Год назад +8

      @@uselessgamedev Oh that's super cool! I've heard of the Kappa before, should've thought of that hahah

    • @psykbryt2096
      @psykbryt2096 Год назад +3

      @@uselessgamedev Oh wow, I always thought they looked like the ones from Heroes of Might and Magic 6, with a bowl of water for a head.

    • @uselessgamedev
      @uselessgamedev  Год назад +6

      @@psykbryt2096 yeah I guess it's open for interpretation, I like the ones in Sakuna, the one in Monster Prom (who is also called Leonard) is cute too

    • @threemr01
      @threemr01 Год назад +1

      @@uselessgamedev now the name of the speakers on the theremin video makes sense!! Thanks for the explanation.

  • @mkks4559
    @mkks4559 Год назад +7

    After seeing this video, I felt like I finally understood how to play Minesweeper, so I tried playing it, and thanks to you, I lost again! I was given false hope that I may finally win. It's probably because I'm playing very late at night though (it's not but I like to live in denial).

  • @orad3093
    @orad3093 Год назад +28

    The revenge series seems quite interesting, keep at it!

    • @uselessgamedev
      @uselessgamedev  Год назад +5

      Thanks! I have multiple video ideas lined up for this series, so this should be fun

  • @jnjsorr
    @jnjsorr Год назад +18

    Keep up the good work dude. High quality and interesting content will always get noticed sooner or later.

    • @uselessgamedev
      @uselessgamedev  Год назад +3

      Thank you very much. The channel does get a lot more notice (views, subs, impressions...) with every video according to the analytics page, so we're getting there!

  • @clownkid
    @clownkid Год назад +17

    Wow, I've seen people lots of people recreate games to create neural networks to solve them - and I had no idea you could use Unity to parse the information on your monitor!
    Awesome channel, I winded up binge watching all of your videos! :P

  • @awdk7994
    @awdk7994 Год назад +4

    Bro you are super underated

  • @gabrielaportillo299
    @gabrielaportillo299 Год назад

    honestly I love the way your videos sound. I love the music and the sound effects.

  • @Pixelarity64
    @Pixelarity64 Год назад +1

    This is exactly the content I'm looking for! Yours was a very quick subscription. 😊

  • @liambenson5339
    @liambenson5339 Год назад +1

    Dude, it was so funny when you put the glasses on your character! Your character looks really cool!

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Thank you it was designed by my friend Boskoop (@EdwigeStoll on twitter), they chose a kappa because these creatures have a bald spot and so do I

  • @nunosantiago6720
    @nunosantiago6720 Год назад

    Excelent work, as usual. Leonard, you have very cool ideas for game dev videos. Ths is another winner.

  • @lemonlordminecraft
    @lemonlordminecraft Год назад

    This channel appears to be blowing up. As I slowly go through their backlog I am watching as their sub count steadily goes up by significant proportions of what it was an hour ago. Well-deserved!

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Thank you! Yeah it's getting significant growth for three days and it seems to be accelerating still. I'm blown away by the awesome response and encouraging comments

  • @minorseven8134
    @minorseven8134 Год назад

    I like that idea of getting back to a "problem" that has haunted you for years... now equipped with the skills to beat the hell out of it ^^
    Impressive result and I really like how you design and voice-over your videos, very casual, cool and easy to follow.
    You earned yourself another sub (*1-up noise*)

  • @teok9964
    @teok9964 Год назад

    I'm looking forward to more of your videos! Super interesting stuff, and very entertaining. Love it!

  • @calvinhirschler5876
    @calvinhirschler5876 Год назад +1

    Very cool! I know pros on minesweeper always start in the corner. Perhaps making your solver do that would increase the win rate percentage

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Good idea I was planning on testing each starting position with say 1000 games each to get stats on the "best" opening moves but never got around to it. Maybe another day

  • @konstantinosadamopoulos9918
    @konstantinosadamopoulos9918 Год назад +4

    I love your avatar!!!

    • @uselessgamedev
      @uselessgamedev  Год назад +3

      Thanks, the artist is Edwige "Boskoop" Stoll, you can check them out on Instagram a/o Twitter!

  • @AndriusKamarauskas
    @AndriusKamarauskas Год назад +2

    Funny comment for google algorythm

  • @RugnirSvenstarr
    @RugnirSvenstarr Год назад +1

    Pulling this through unity is a quite unusual approach haha. But hey it works, and not too slow

  • @SkippyDa
    @SkippyDa Год назад

    There is a trick in minesweeper, if you place a flag, and then left+right click on a number, and the correct number of flags are present, it will automatically click the ones that it can't be. Doubt it would improve speed a lot

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      I do this, I implemented it when the time between clicks was about .5s it did help a lot, but as I optimized it and it when to 300 clicks a second, it ended up making a negligible difference

  • @moadot720
    @moadot720 Год назад +1

    0:08 You can't be older than me without a fight!

  • @scorix_
    @scorix_ Год назад

    I think your probability function assigns undiscovered tiles with surrounding neighbours that are also undiscovered the wrong value.
    In my understanding, it is always better to choose a tile at the edge of discovered tiles rather than somewhere in the mist.
    I would set every tile that is surrounded by neighbours not-discovered to a 100% probability of hitting a mine.

    • @uselessgamedev
      @uselessgamedev  Год назад

      You might think that but by playing I found myself quite often in a situation where the most appealing tile is not at the border of the discovered area. Especially when the discovered area is approaching the edges of the board.
      Your suggestion might speed up calculation though it still has merits, it's hard to find the good speed/risk balance

    • @scorix_
      @scorix_ Год назад

      @@uselessgamedev hm, interesting. This might even need more research data.
      I am just thinking out loud here, but maybe considering how many mines are still non-flagged is also a metric you could consider when evaluating tiles in undiscovered areas.
      Great extra loop you took though, not choosing to programm your own game btw!

  • @trk.s7570
    @trk.s7570 Год назад +3

    liked your content man you should be 100k soon , TRUST ME YOU GONNA BE 100K SUBS SOON (i liked eva's content she became a star then violet's , sweetie fox's sameeee im kinda part-time star founder trust me) BUT producing speed should improved

    • @uselessgamedev
      @uselessgamedev  Год назад +2

      Thank you for putting this channel on the 100K tracks then! Producing speed should improve in 2023 (job change, more free time, etc) and I'm getting the hang of video editing so I hope I can get more videos out soon

  • @lucbloom
    @lucbloom Год назад +1

    I thought Minesweeper was a solvable puzzle, like Solitaire or Sudoku. Apparently it comes down to luck at one point. Shame.
    I wonder what the least invasive rule would be to make it a solvable puzzle. I guess generating “always logically solvable” grids is a cool programming exercise, but maybe also adding a rule like this:
    Add an arrow on a tentative tile, which points in the average direction of all mines. -1 or 1 per grid offset, divided by number of mines. If it’s 0,0 add a dot.
    That might be an interesting game mode. Would it help?

    • @uselessgamedev
      @uselessgamedev  Год назад

      Yeah I was kinda shocked to learn the top players win about 55/100 games, I didn't think it would be this random. I'm not sure adding rules to make it more deterministic would help. I like the simplicity of it

  • @Ballman404
    @Ballman404 Год назад +3

    Good vid

  • @KatHarpy
    @KatHarpy Год назад

    this is giving me the worst flashbacks to when I had to code an entire game of minesweeper with only strings for a project

    • @uselessgamedev
      @uselessgamedev  Год назад

      With only strings 🤔 can you elaborate? I'm intrigued, this sounds very... "useless" game dev ;)

    • @KatHarpy
      @KatHarpy Год назад

      @@uselessgamedev Like basically it just ran in the terminal off of recursion and conditionals. the entire board was just printed arrays. it was hell

  • @hexdump8590
    @hexdump8590 Год назад

    You got a new subscriber and fan :)

  • @Haguynitzan
    @Haguynitzan Год назад +1

    I love your content! Remember me when you get famous (:

  • @easyBob100
    @easyBob100 Год назад

    You could simplify the number checker thingie (2:49) by simply checking a single pixel (or two) color values.

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      I thought about doing that, sampling the few pixels that are determining, probably the center ones, but II was afraid there would be streaming artefacts, like some anti-aliasing stuff, and ended up sampling the whole tile. I tried to keep the kernel as small as possible though!

  • @termisher5676
    @termisher5676 Год назад

    You could make it even faster and more accurate by special formulas to calculate highest chance of it existing

    • @uselessgamedev
      @uselessgamedev  Год назад

      Can you elaborate on what those special formulas are?

    • @termisher5676
      @termisher5676 Год назад

      @@uselessgamedev ruclips.net/video/cGUHehFGqBc/видео.html

    • @uselessgamedev
      @uselessgamedev  Год назад

      Yes this is the same approach I take. I actually looked at their code in detail when I got stuck developing mine, but in the end the video by Merrick Huang in the description is what really unlocked this.
      As stated this doesn't make it faster (more processing is needed) but it does make it more accurate

  • @amadimus
    @amadimus Год назад +1

    Did you know you can click both mouse buttons on a solved cell to reveal all the remaining non-mine neighbours instead of clicking each cell one by one?

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Yes, it does that. But at this speed it doesn't make much of a difference. I intended to talk about this (and other details) but it didn't make it into the final cut

  • @NewbieIndieGameDev
    @NewbieIndieGameDev Год назад

    Take that, you cocky smiley face... Great video! 🙌

  • @Yipper64
    @Yipper64 Год назад +1

    oh I didnt know Unity could do this type of thing... I dont know *how* but now that I know its possible I want to attempt to make my own AI for games. I have a way to get the gameplay of my nintendo switch into my computer, and controller input from my computer into my switch, so... I could?

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Yeah, I guess! Go for it, people might be interested. I definitely would be

  • @yaim0310
    @yaim0310 Год назад

    I've want to learn how to do something like this as well. Do you think you can give a hint on how you got unity to see the Minesweeper window?

    • @uselessgamedev
      @uselessgamedev  Год назад

      Sure! I used OBS to stream to Unity via the "virtual webcam" feature. Unity just reads the "webcam" as a texture.
      I wanted to make this video a while ago but had to wait until a bug was fixed in Unity, it couldn't read the virtual webcam properly.

  • @jordanrozum
    @jordanrozum Год назад

    Why right click if it's keeping track of where the mines are in the internal representation? It's been a while since I've played this version, but I thought you can still win even if you don't use flags.

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Yes, you could keep a state in memory tracking where the mines where.
      What I didn't mention in the video because it was getting too long, is that I wanted this solver to be stateless, as in, able to resume any game from any point.

  • @operator8014
    @operator8014 Год назад

    Couldn't you check the exact color value of certain pixels in each square to instantly diferentiate between all different square states? A 7 and a bomb may be the same color, but they are not the same shape, so polling a handful of control pixels per square should perfectly identify each squares state. I would expect that to be faster than the process you described. I bet you could optimize that to get it below 1 second.

    • @uselessgamedev
      @uselessgamedev  Год назад

      In theory I could but I was scared of streaming artifact in the video that would result in slightly different hues so I decided to sample the whole square every time to get an average value which I though to be more reliable

  • @Teemsploit
    @Teemsploit Год назад +2

    couldn't you use threading to get it to do multiple tasks at once to make it faster?

    • @uselessgamedev
      @uselessgamedev  Год назад +2

      Yes, no, kinda. The solving strategy could indeed be multithreaded but doesn't take took much time in the end (10%) compared to asking the video stream for an image of the board (50%) and asking Windows to move the mouse and click (25%). And both of these are out of my control (except maybe lowering the resolution of the incoming image, which would drastically improve performance but I'm afraid I'd get parsing errors then)

    • @RyleeFerguson-vx7ti
      @RyleeFerguson-vx7ti Год назад +3

      @@uselessgamedev Unsure if you're doing it already but what about skipping the identification of cells you've already seen (not hidden), clicked or flagged? Yes you still need to capture the whole image, but after splitting you could skip over certain cells so that you don't need to do any further image processing (padding, removing grey, average color, etc.)

    • @uselessgamedev
      @uselessgamedev  Год назад +3

      Yes that would be faster, however something I don't mention in the video is that the solver is stateless, meaning it doesn't keep track of previous states of the board, every round is a fresh start. This allows to resume any game from any point, or suggest the next move to a human who asks for help. Both features were implemented but didn't make it in the final video because I didn't deem them interesting enough.
      So yeah in the end the whole board is parsed at every round, might not be optimal tho.

  • @quandale8707
    @quandale8707 Год назад

    cant you check the radius and ignore the stuff we already know arent mines and see if the radius overlaps

    • @uselessgamedev
      @uselessgamedev  Год назад

      I'm not sure I follow, what radius are you referencing?

    • @quandale8707
      @quandale8707 Год назад

      @@uselessgamedev i mean the immidiete neighbors

  • @jaumerovirabaurier2119
    @jaumerovirabaurier2119 Год назад

    did you kow that if you click a number that has all mines marked it auto completes the rest?

    • @jaumerovirabaurier2119
      @jaumerovirabaurier2119 Год назад

      coud have saved some lines of code

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Yes if you click with both buttons. It does that actually, I added the functionality when it was still super slow to save some time, but now it goes so fast that it wouldn't make a difference

  • @ShadowDrakken
    @ShadowDrakken Год назад

    Are the top solvers under a time limit? 55% seems really low... I'll have to track my win/loss and times now...

    • @uselessgamedev
      @uselessgamedev  Год назад

      Top human players* it may be unclear in the video

    • @ShadowDrakken
      @ShadowDrakken Год назад

      @@uselessgamedev no, I understand that. But I feel like I win a lot more than that; so I need to start logging to eliminate my bias :)

  • @chffguy
    @chffguy Год назад

    What programming language do you write in?
    I code in Python, so I don't know if you write in Javascript, C, C++, C#, or something else.

    • @uselessgamedev
      @uselessgamedev  Год назад

      This is C#, it's the language used in the Unity engine

    • @chffguy
      @chffguy Год назад

      @@uselessgamedev Thanks, didn't know unity worked explicitly on C#.

  • @nevernether3368
    @nevernether3368 Год назад

    My best time is 54 seconds. Im proud XD

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      Woah that's crazy! After months of playing my best time was like 125s and I felt I was at the top of my abilities.
      Of course now my best time is 7s 😎

    • @nevernether3368
      @nevernether3368 Год назад

      @@uselessgamedev I got my family playing to. My little brother did like 50s.

  • @HugoBDesigner
    @HugoBDesigner Год назад

    Microsoft's Minesweeper is a disgrace! Relying on luck to win a game that is otherwise completely logic-driven is terrible, so I've resorted to only ever playing Simon Tatham's Minesweeper. It's 100% reliable and logically solvable, there is never a point where randomly clicking a tile is the _only_ viable option :)

    • @uselessgamedev
      @uselessgamedev  Год назад +2

      Where's the thrill then? I feel like Minesweeper, even if simple and abstract, is good at making you feel like you're an actual minesweeper risking your life you know what I mean. If I wanted deterministic logic games I'd play something like Sudoku

    • @HugoBDesigner
      @HugoBDesigner Год назад +1

      @@uselessgamedev That's a fair interpretation! I just really like logic games is all :P
      Btw, great video! Very insightful and entertaining 😁

    • @uselessgamedev
      @uselessgamedev  Год назад +1

      @@HugoBDesigner thank you!