Making MINESWEEPER in C++ - SFML Gamedev - Devlog

Поділитися
Вставка
  • Опубліковано 7 лют 2025
  • I made the classic Minesweeper game by myself using C++ and SFML.
    Discord: / discord
    Github: github.com/Kof...
    Itch io: kofybrek.itch.io
    Patreon: / kofybrek
    Subreddit: / kofybrek
    Twitter: / kofybrek
    Code: github.com/Kof...
    #code #coding #programming

КОМЕНТАРІ • 43

  • @Kofybrek
    @Kofybrek  3 роки тому +9

    If you liked it, please hit the like button and subscribe if you wanna see more content like this in the future. It helps me out and doesn't cost you anything.
    Also, consider supporting this channel on Patreon for exclusive content as well as early access to future videos and projects: www.patreon.com/Kofybrek

  • @Test-iv4pm
    @Test-iv4pm 3 роки тому +37

    Changing game_over(0) to game_over(1) probably only took a few hours to fix

  • @Test-iv4pm
    @Test-iv4pm 3 роки тому +19

    Steps to make a masterpiece:
    1. Cells
    2. Numbers
    3. Text
    4. Alexander

  • @Test-iv4pm
    @Test-iv4pm 3 роки тому +10

    Big fan of "this is intentional" after every step that goes wrong (even though it doesn't go wrong of course - because it is intentional.)

  • @wrenschultz
    @wrenschultz 3 роки тому +8

    I really enjoy your videos! Thank you for sharing them! In this game, you left out my favorite function which is when you click both buttons over an already revealed square (one that has a number in it), if you have all the adjacent bombs flagged, it will reveal all the other squares. This is a really key feature for quick solving.

    • @Kofybrek
      @Kofybrek  3 роки тому +2

      I didn't know this feature existed in the game.

  • @nicolabombace2004
    @nicolabombace2004 3 роки тому +4

    WONDERFUL! I really liked the style of this. Sir, have my sub!

  • @laczikmarton2745
    @laczikmarton2745 Рік тому

    i cant belive it, that you have only almost 7k subs, your vids are so good! you desserve more views imo

  • @yrds96
    @yrds96 3 роки тому +9

    Alexander turn this version even cooler

  • @iwir3d
    @iwir3d 2 роки тому +5

    In mine sweeper if you click a mine on the first click, it actually moves the mine. I was able to verify this by using a memory editor. Also the cells generate the numbers after you click them not before, this is so the mines can move. When you click a cell, it will count the 8 cells around it and put a number for how many bombs are there.

  • @Test-iv4pm
    @Test-iv4pm 3 роки тому +5

    5:18 is extremely satisfying

  • @BryanAnderson-o1u
    @BryanAnderson-o1u Рік тому +1

    keep up the good work

  • @rohanharikr
    @rohanharikr 3 роки тому +1

    really entertaining videos - thanks and great job!

  • @obligatoryfail9550
    @obligatoryfail9550 3 роки тому +1

    I really liked the video!
    And also,

  • @deadbird99
    @deadbird99 3 роки тому +1

    Sir, your videos deserver a whole lot more views, so I added mine. Oh and I subscribed too. Cheers!

  • @tekkvega
    @tekkvega 3 роки тому +3

    alexander lookin kinda cute ngl

  • @armybrain
    @armybrain 2 роки тому

    I enjoyed your video. I like it )

  • @giovannisolimeno5040
    @giovannisolimeno5040 3 роки тому +1

    the random bugged explosion was kinda cool tho

    • @Kofybrek
      @Kofybrek  3 роки тому +1

      If you mean 6:18 then for me it was too flashy. But it does look like a real explosion.

  • @aeideevie6237
    @aeideevie6237 3 роки тому +1

    Its great

  • @NamePointer
    @NamePointer 3 роки тому +1

    Great video! You got a sub from me :D

  • @miloz1950
    @miloz1950 3 роки тому +2

    Really great video but I would only have a few objections (tips/corrections):
    - You're putting literally too much comments in your code, like really most of them are not necessary, they're just telling obvious stuff (e.g. 'otherwise' comment before else, repeating the name of the object before it's decleration, except the funny ones of course),
    - Another aesthetic thing is (it can be a personal preference) comparing objects in ifs like so `if (constant operator variable)`, I've just never seen anybody writting like this. Rather more often you'll see `if (variable operator constant)`,
    - I also don't feel like putting only one function in a separate file should have place,
    - I would also write something about the naming convention, but it very depends on a personal preferences.
    So besides those things, nice work!

    • @Kofybrek
      @Kofybrek  3 роки тому +7

      Thanks for your feedback!
      I don't usually share my code, so every time I do, I feel like no one will understand it. Maybe that's why I comment too much.
      And everything else you described is just my personal preferences. I don't think they're that critical.

    • @giovannisolimeno5040
      @giovannisolimeno5040 3 роки тому +3

      The if (constant op var) syntax is useful to catch unwanted assignments

  • @cjgamesstudios3289
    @cjgamesstudios3289 2 роки тому +1

    1:50 SuS

  • @thepawday
    @thepawday 2 роки тому

    Александр - okay

  • @rsa5991
    @rsa5991 3 роки тому +1

    I think it would have been easier, if you'd made an explosion its own thing, that's just drawn on top of the cells, instead of putting it into cell logic.

    • @Kofybrek
      @Kofybrek  3 роки тому +3

      I don't think it would have been easier. I would have to write a new function/class for it.
      Also, in my opinion, the cellular explosion looks cooler. But everyone's taste is different.

  • @ElemenTalParkour
    @ElemenTalParkour 2 роки тому +1

    Got subscribed.
    Can you make a video of some game using box2d ?

  • @holyguacamole3186
    @holyguacamole3186 2 роки тому

    all minesweeper player have octophobia

  • @SHOJIBGAMING-1
    @SHOJIBGAMING-1 2 роки тому +1

    Can you make a course on sfml please

    • @Kofybrek
      @Kofybrek  2 роки тому +2

      I'm planning on doing it at some point.

  • @santaboom2980
    @santaboom2980 2 роки тому

    I have error that it says (namespace "std" has no member "clamp" )

    • @Kofybrek
      @Kofybrek  2 роки тому +1

      You need to use a compiler that supports C++17.

    • @santaboom2980
      @santaboom2980 2 роки тому +1

      @@Kofybrek it doesnt help :(

  • @Test-iv4pm
    @Test-iv4pm 3 роки тому +2

    You write the draw function to be called for every object you want to draw.
    Is that your choice? Or is this enforced by SFML? (Or something else?)

    • @Kofybrek
      @Kofybrek  3 роки тому +3

      If you mean window.draw(); then it's an SFML function.
      If you mean field.draw(); then it's my own function (but you still have to use window.draw(); to draw on the window).

  • @wolfrust0
    @wolfrust0 3 роки тому

    is he using a vector of vectors - angry hater guy from this vid