Making MINESWEEPER in C++ - SFML Gamedev - Devlog

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • 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  2 ปีที่แล้ว +8

    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 ปีที่แล้ว +18

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

  • @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 ปีที่แล้ว +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!

  • @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.

    • @Kofybrek
      @Kofybrek  2 ปีที่แล้ว +2

      Interesting...

  • @Test-iv4pm
    @Test-iv4pm 3 ปีที่แล้ว +4

    5:18 is extremely satisfying

  • @laczikmarton2745
    @laczikmarton2745 ปีที่แล้ว

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

  • @deadbird99
    @deadbird99 3 ปีที่แล้ว +1

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

  • @BryanAnderson-o1u
    @BryanAnderson-o1u ปีที่แล้ว +1

    keep up the good work

  • @tekkvega
    @tekkvega 3 ปีที่แล้ว +3

    alexander lookin kinda cute ngl

  • @obligatoryfail9550
    @obligatoryfail9550 3 ปีที่แล้ว +1

    I really liked the video!
    And also,

  • @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.

  • @rohanharikr
    @rohanharikr 2 ปีที่แล้ว +1

    really entertaining videos - thanks and great job!

  • @slightlywetbaby830
    @slightlywetbaby830 3 ปีที่แล้ว

    Alexander is amazing.
    Alexander for president.

  • @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

  • @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.

  • @aeideevie6237
    @aeideevie6237 3 ปีที่แล้ว +1

    Its great

  • @armybrain
    @armybrain 2 ปีที่แล้ว

    I enjoyed your video. I like it )

  • @cjgamesstudios3289
    @cjgamesstudios3289 2 ปีที่แล้ว +1

    1:50 SuS

  • @NamePointer
    @NamePointer 3 ปีที่แล้ว +1

    Great video! You got a sub from me :D

  • @ElemenTalParkour
    @ElemenTalParkour 2 ปีที่แล้ว +1

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

    • @Kofybrek
      @Kofybrek  2 ปีที่แล้ว +1

      I might do it!

  • @holyguacamole3186
    @holyguacamole3186 ปีที่แล้ว

    all minesweeper player have octophobia

  • @thepawday
    @thepawday 2 ปีที่แล้ว

    Александр - okay

  • @dhadhabox9723
    @dhadhabox9723 2 ปีที่แล้ว +1

    Can you make a course on sfml please

    • @Kofybrek
      @Kofybrek  2 ปีที่แล้ว +2

      I'm planning on doing it at some point.

  • @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).

  • @santaboom2980
    @santaboom2980 ปีที่แล้ว

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

    • @Kofybrek
      @Kofybrek  ปีที่แล้ว +1

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

    • @santaboom2980
      @santaboom2980 ปีที่แล้ว +1

      @@Kofybrek it doesnt help :(

  • @wolfrust0
    @wolfrust0 2 ปีที่แล้ว

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