Making SUPER MARIO BROS in C++ - SFML Gamedev - Devlog 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 125

  • @earthbender731
    @earthbender731 2 หลายเดือนก่อน +1

    KOFYBREK RISE FROM THE DEAD PLEASE I NEED MORE C++ SFML VIDEOS

  • @Test-iv4pm
    @Test-iv4pm 2 ปีที่แล้ว +31

    Things that make this a kofybrek game:
    1. Tire skid sounds when mario changes direction
    2. Mario gets cool glasses when defeating a goomba
    3. Mario's eye tells us that he has seen things that he cannot unsee

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

    For input control it's best to use a delta_horizontal and delta_vertical for instance. So when you press the left key, delta_horizontal += -1. If you press the right key delta_horizontal += 1. This means that when both keys are pressed, they cancel ech other out. No need for defining every edge case with a different if statement (which is slow).

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

      That's a pretty great idea... I'm gonna try that in my next project.

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

      That's a really good idea!

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

      @@Kofybrek And if you really want to flex, you could make an array of bools which are the current state of every (relevant) key press. So make an enum MovementDir { LEFT, RIGHT, UP, DOWN, numKeys }, then make an int keys[MovementDir::numKeys]. Add some logic to the SFML keypressed that determines whether the key is down this frame. Then just do if (keyPressed == SFLM_left_key) keys[LEFT] = isDown; And then you can do delta_horizontal -= keys[LEFT]. No need for any if statements for handling the input in your game logic.

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

      @@SanderVermeer Thanks! I will use this when I need to work with a lot of keyboard inputs.

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

      @@SanderVermeer Why stop there, just hack the sf::Event to get the info, store that info in a 64-bit integer, and read straight from the bits using ASM code with comments in binary

  • @Alan-bi5un
    @Alan-bi5un 2 ปีที่แล้ว +3

    I saw some of your videos, I like the way you talk about the topics of each video. You are such a spectacular developer and you can see the dedication to the details
    (srry 'bout bad grammar)

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

    Hey man, I absolutely love how this turned out! And also the fact that you explained every thing that you had to do for the game, it really helps break things down into very simple and meaningful tasks! My opinion on you using c++/sfml for coding games is that you're based, keep it up! 😁

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

    UPDATE!!!! I UPLOADED THE NEXT PART: th-cam.com/video/6SnGgsgV_GY/w-d-xo.html
    This video took a long time to make. So if you enjoyed it, please press the like button and subscribe if you wanna see more videos like this in the future. It really helps me out.
    Also, consider supporting this channel on Patreon for exclusive content as well as early access to future videos and projects: www.patreon.com/Kofybrek

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

      Awesome... got here from Reddit btw... cool post

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

      Please make a Tutorial I am suffering to learn SFML

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

      This comes up as tutorial but you just talk around what you did which requires a full understanding so not really a tutorial.

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

    I'm using your videos to cope with the fact that code bullet isn't coming back.

    • @sytnoff1
      @sytnoff1 4 หลายเดือนก่อน

      What is code bullet ?

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

    oh my god, this is AMAZING!

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

    bro’s a c++ master I hope I can be like u one day

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

    Bro your content is amazing haha ! LOve it.

  • @arthurdut7959
    @arthurdut7959 วันที่ผ่านมา

    Good job!

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

    4:42 Same, it's so cool to see the smoke and mirrors in games sometimes

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

    Amazing work, thank you!

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

    You deserve a lot more subscribers.

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

    Thats so good , I like it so much 👍🏻, I think you can make it better with a good mic because its so enjoyable and really good mic will make you a legendary content creator 💙👍🏻.

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

      Yes, I'm planning to buy a new microphone once I reach my Patreon goal, since I don't have the money for it right now.

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

    you tube is broken brother !! your videos deserves millions of views!!!

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

      But instead Jake Paul gets millions

  • @ArunKumar-ry2jf
    @ArunKumar-ry2jf 2 ปีที่แล้ว

    You just blow my mind. It is awesome

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

    yey new video!!

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

    You sir....are one smart guy! Very nice video!

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

    It's amazing 🤩

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

    Voce merece o mundo, amigo!

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

    Good work brother.. 😲 (Alexander)

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

    l've heard you from your minecraft video in c++ and l can't stop watching your videos!!
    Congrats from Greece! :D
    Edit: l didn't mean minecraft video l'm sorry hehe

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

      You mean my raycasting video?

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

      @@Kofybrek yes

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

    Love the humour, style & content. Get ready for a well deserved exponential increase in subscribers...

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

    We will never know what kofybrek has to say after each video :(

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

    can you please make a tutorial video about how to use sfml with c++ for making game

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

    sir. you saved me. now i know how to start my homework. thanks a lot

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

    Such great content hope u upload more

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

    SUPA MAIRO ON THE PS4 UAOOOOOOOOOOOOOOOOOOOOOOH!

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

      Anything console-related would be a struggle to make

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

    Sick.

  • @xman3336
    @xman3336 5 วันที่ผ่านมา

    you make me laugh

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

    Excellent

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

    Cant wait for part 2

  • @goldestperson
    @goldestperson 11 หลายเดือนก่อน

    7:51 - Bro did the wall cling storage

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

    Nice work!

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

    your video is so great !!!

  • @_brian.
    @_brian. 2 ปีที่แล้ว

    This is amazing

  • @yaxier2558
    @yaxier2558 7 หลายเดือนก่อน

    @Kofybrek in your personal experience: Do you think is better to make a tilemap by setting and drawing a single VertexArray or by drawing a rectangle multiple time? Im trying to find an efficient way to create one but i could only code a tilemap generator with multiple rectangle shapes drawings

    • @Kofybrek
      @Kofybrek  7 หลายเดือนก่อน

      I've never used VertexArray to draw tiles. I think it's easier to use rectangles.

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

    That complex collision check can be done with simple bounding boxes. Level format is a bit odd, I would just use simple indexes for tile types lookup for sprite, collision, etc, and store as a 2 dimensional array, significantly reducing code complexity and reducing errors. Since Mario and Goomba are similar you should have them both inherit a base class to reduce code duplication. Why are you loading from disk death sprite every death instead of just preloading it and on the fly rendering whatever state Mario is in?

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

      Why are you pretending that this was done for any reason besides getting ad revenue on youtube? There was never any intention of making anything good.

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

      Probably because his computer can run 16000x what this game uses and there was no need to optimize it anyways.

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

      @@puppergump4117 My comment mostly geared towards the overly complex code. The part of not loading death sprite is just basic common sense, not really an optimization, and it would also simplify code. If you load everything you need up front, then when you need them you can directly reference them, without loading every time you need, which will make for some very ugly code.

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

      @@xeridea Maybe he did that on purpose to make people angry, seems like something he'd do

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

      I tend to ignore “ … is just” comments but your comment is pure garbage. You probably don’t even know what a pointer is.

  • @rickraydubs
    @rickraydubs 10 หลายเดือนก่อน

    "It works." Every time my code compiles.

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

    Him saying goomba is hilarious

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

    Man , you made me love c++ more

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

    sweet engine

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

    Hello. Good video :D

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

    Very good

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

    very pog video

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

    cool

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

    Watch out, Nintendo might try to make you spontaneously disappear.

  • @ashwinalagiri-rajan1180
    @ashwinalagiri-rajan1180 2 ปีที่แล้ว

    I thought you were making a nes emulator lol. Would like to see it done with sfml.

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

    wonderful !!!

  • @bobsaturday5840
    @bobsaturday5840 7 หลายเดือนก่อน

    We're getting sued by Nintendo with this one🎉

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

    Hey. You could make a tutorial how to write simple C++ games with SFML... I WOULD LOVE IT cuz I need this)

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

      I'm thinking about doing it.

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

      @@Kofybrek OMG. I will hurry in complete learning C++ 😂

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

      I approve it !

  • @a.s1210
    @a.s1210 2 ปีที่แล้ว

    awsome but what app you made tuxtures with?

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

      Aseprite.

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

    Great video! thanks!!! When I compile solutions a error message appears : " Clamp is not a member of STD"

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

      You need to use C++17.

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

      @@Kofybrek Unfortunately it's the first thing I looked at but the error persists

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

      @@creative1978 Strange. Maybe you're not including the correct libraries.

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

      @@Kofybrek Thanks for the reply. However I solved it by writing a small function instead of clamp

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

    Hhha fun and cool

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

    "please work... oh yeah"

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

    Hi bro, you always use chorno library in your c++ game, do you install the library or it is built in?

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

      It's a C++ standard library like

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

    to be honest i dont watch your videos for the nollage of coding, i watch it for its entertaining and very funny idk why, you should try make Donkey Kong the original one, replie please

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

      Glad you enjoy it! People have already suggested Donkey Kong so it's on my list of ideas.

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

      @@Kofybrek good to know

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

    Where did you made this game in which application i want to know i am also making it in C++

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

      I use Visual Studio.

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

    This is neat, but why didnt you use the tiled editor for the maps?

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

      I thought about using it. But it's only 1 level, so I don't think it's worth it. If I decide to add more levels, I'll use it.

  • @anonimowyanonim7629
    @anonimowyanonim7629 หลายเดือนก่อน

    Hi! This is a great video but I can't built the source code.

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

    3:27

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

    Seems strange that nintendo didn't already sued you

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

    What is the tool that used to draw the mario?

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

    U use visual studio code or visual studio

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

    Thank you very much for the video. What about a super simplified Minecraft?

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

      I was thinking about doing that. I need to learn OpenGL though. But I will do it!

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

      MC is far more complex, but doable, as shown in this video. MC from scratch no game engine 48 hours. th-cam.com/video/4O0_-1NaWnY/w-d-xo.html

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

      @@xeridea Well there's really no point to using no game engine since you'd just write your own in the process of making something

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

      @@puppergump4117 Generally game engines are the way to go, not always. Some games are unique enough in design it makes more sense to make your own. Minecraft is extremely simple, but can benefit greatly from a custom engine. The point of my comment though was that MC isn't terribly complicated, just need a basic 3D engine that takes heavy advantage of culling, deterministic world generating code, perlin noise or something similar, and a basic physics system.

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

    Is this C++
    Listen i don't know programming but I've some plans and no I won't try to make these at first but I'll learn
    What's the language please

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

      C++ and I'm using SFML for graphics.

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

      @@Kofybrek Thanks

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

    Your my Nye thicher

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

    The colors are way too saturated with your textures

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

      Well, I like bright colors.

  • @ruchikhobragade269
    @ruchikhobragade269 11 หลายเดือนก่อน

    Bro In which app have u made mario game???

    • @Kofybrek
      @Kofybrek  11 หลายเดือนก่อน +1

      I use Visual Studio Community.

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

    The video has begon hope i will not be dissapointed
    Update: was not dissapointed

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

    Sdl2 is better

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

    I hate coding heres should coding be
    A)-show*(true)*collision*(false)*jump)fix
    -friction(false)rick)starts(true)rolls

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

    bro cant even draw mario

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

      I tried my best!

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

      @@Kofybrek you swap the red and blue

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

    Amazing