I Added Terrain Generation to My MINECRAFT Clone in C++ - OpenGL Gamedev - Devlog 3

Поділитися
Вставка
  • Опубліковано 7 лют 2025
  • The first 500 people to use my link skl.sh/kofybre... will get a 1 month free trial of Skillshare premium!
    This time I added terrain generation to my Minecraft clone in C++ and OpenGL. I also used SFML for 2D terrain generation. I tried using the Perlin noise but I couldn't manage to make it work.
    Previous part: • I Added 3D Lighting to...
    Discord: / discord
    Github: www.github.com...
    Itch io: kofybrek.itch.io
    Patreon: / kofybrek
    Subreddit: / kofybrek
    Twitter: / kofybrek
    Code: / 114055036
    This video is sponsored by Skillshare
    #code #coding #programming

КОМЕНТАРІ • 66

  • @Kofybrek
    @Kofybrek  3 місяці тому +12

    The first 500 people to use my link skl.sh/kofybrek10241 will get a 1 month free trial of Skillshare premium!

    • @mxsteri0
      @mxsteri0 3 місяці тому

      hello kofybrek

    • @Sirbozo
      @Sirbozo 3 місяці тому +1

      will see

    • @Sirbozo
      @Sirbozo 3 місяці тому +1

      k

  • @grilotc
    @grilotc 3 місяці тому +34

    Kudos for drawing the popcorn!

  • @baptFulbion
    @baptFulbion 3 місяці тому +23

    it starts looking like minecraft! im proud of you!!

  • @mibi88-code
    @mibi88-code 3 місяці тому +11

    Looks cool! I saw that you care about performance. For better performance you could cull hidden faces, not just cubes (and if you aren't doing it yet, you could generate the chunks as single meshes, which results in fever draw calls, if you aren't doing any instancing). Maybe perlin noise would be faster than value noise, but I'm not sure about it, it surely heavily depends on the implementation.
    EDIT:
    I just saw that you tried to use perlin noise. You could use stb-perlin, which is very simple to use.

    • @walidyider7766
      @walidyider7766 3 місяці тому +3

      no, not one mesh for the whole world, if the whole world is a single mesh and you decided to update something then you have to update the whole world with it , instead you should generate a mesh for each chunk , each chunk updates its blocks and mesh , also this is good for frustum culling

    • @mibi88-code
      @mibi88-code 3 місяці тому +3

      @@walidyider7766 I just read my comment again, I meant a chunk, not the world, sorry I'm tired.
      EDIT:
      Not sure frustum culling is useful in his case because as far as I know it's quite expensive, it's only useful when handling very big amounts of voxels.

    • @walidyider7766
      @walidyider7766 3 місяці тому +4

      ​@@mibi88-code no no its not really expansive specially with AABB and sphere they are so fast, and the cost of using frustum culling for each chunk is lower than the cost of rendering the chunks themselves , you should know when to use it and not.

  • @TheMadProgrammersOfficial
    @TheMadProgrammersOfficial 3 місяці тому +1

    THIS IS MY FAVORITE CHANNEL!!! SUPER UNDERRATED

  • @TychoVan
    @TychoVan Місяць тому +1

    amazing video!!
    didnt pay too much attention to the code, so idk if you know abt/tried placing the array on the heap. That should prevent the stack overflow :)

  • @JakobWrzosok
    @JakobWrzosok 3 місяці тому +2

    Awesome popcorn! I couldn't draw this well to save my life.

  • @nafets5
    @nafets5 3 місяці тому +7

    Why does this channel doesn't have 1 M subs??????? Amazing video

  • @juanmacias5922
    @juanmacias5922 3 місяці тому +1

    Good job on the noise implementation :D

  • @KerzL6324
    @KerzL6324 2 місяці тому

    Video is great, but I noticed that the popcorn is especially goog looking!

  • @deannosgeek
    @deannosgeek 3 місяці тому

    It helped me building this one .
    Nice explain

  • @bigsmoke-u6r
    @bigsmoke-u6r 3 місяці тому

    ngl that popcorn looks so good!

  • @eitanl9640
    @eitanl9640 24 дні тому

    Nice, popcorn drawing.

  • @ohimdabiggestbird
    @ohimdabiggestbird 3 місяці тому +1

    im happy, at least we got the terrain part of minecraft before he disappeared again lmao

  • @TOZA
    @TOZA 3 місяці тому +3

    0:28 in Minecraft there are cubes called sub-chunks, so its still similar to original

  • @jahinahnaf
    @jahinahnaf 3 місяці тому

    Seems cool, keep it up!

  • @iamtheredstig
    @iamtheredstig 3 місяці тому +1

    Awesome popcorn!!

  • @ridhamsharma618
    @ridhamsharma618 3 місяці тому +1

    I think adding frustum culling, Multithreading and using the power of GPU or iGPU will be a good optimization addon and you might even get libraries for that in c++.

  • @ShivamKumarPal-nc3nx
    @ShivamKumarPal-nc3nx 3 місяці тому

    Wow!!

  • @Niro_MC
    @Niro_MC 3 місяці тому +6

    nice popcorn

  • @AlbertRyanstein
    @AlbertRyanstein 3 місяці тому

    Great video.

  • @ncot_tech
    @ncot_tech 3 місяці тому

    6 nested loops is pro level 10x coder skills.

  • @fckyu5440
    @fckyu5440 3 місяці тому

    I love this channel. I love you, Kofybrek

  • @fazin85
    @fazin85 3 місяці тому

    Nice job ❤

  • @jemko
    @jemko 3 місяці тому +2

    7:09 germany spotted

  • @Helveta-g4f
    @Helveta-g4f 3 місяці тому +1

    wasted plug 0:12 harry styles

  • @jorgeraymason
    @jorgeraymason 3 місяці тому

    The mouse Kofybrek at 0:55 LOL

  • @Purple_Prog
    @Purple_Prog 3 місяці тому

    nice popcorn !

  • @TheArtistFroglus
    @TheArtistFroglus 3 місяці тому +1

    Nice

  • @tall_guy81
    @tall_guy81 3 місяці тому +1

    Nice popcorn tho

  • @Xizilqou
    @Xizilqou 2 місяці тому

    This is cool but the dirt and grass look completely deep fried

  • @cheeseboi9740
    @cheeseboi9740 3 місяці тому

    W vid

  • @Cinarbayramic
    @Cinarbayramic 3 місяці тому +1

    pretty cool, im also trying to make a similar thing using sdl2 i currently just added perspective projection and now trying to figure out how to map textures on the polygons do you have any ideas on how i can do that

  • @jamesmcneice7825
    @jamesmcneice7825 3 місяці тому

    Great popcorn

  • @poper505
    @poper505 14 днів тому

    Se que no hablas castellano, pero solo quiero decirte que te quiero

  • @oglothenerd
    @oglothenerd 3 місяці тому +14

    Why didn't you use the more traditional face culling approach?

    • @Kofybrek
      @Kofybrek  3 місяці тому +7

      I did think about it. I just didn't have time to research it and write it. I'll probably do it in the next part.

    • @oglothenerd
      @oglothenerd 3 місяці тому +5

      @@Kofybrek I really hope you do! It isn't that hard, there are tutorials on UA-cam that explain it in under 15 minutes.

  • @growwithanshuman
    @growwithanshuman 2 місяці тому

    could you please share your linkedin profile ?

  • @debsarkar4893
    @debsarkar4893 3 місяці тому

    Second comment ( someone said not to comment first so yeah ....)

  • @Hamaj635
    @Hamaj635 3 місяці тому +1

    fifth comment

  • @LucasDevelop
    @LucasDevelop 3 місяці тому

    Such great video! I love your content :D
    Especially this part: ua-cam.com/video/WTKvEgJj2Dk/v-deo.html
    "Now you see, this is not a bug. The artist was clearly trying to express their deep feelings and desire--" 🤣

    • @rhubarb5297
      @rhubarb5297 3 місяці тому +1

      You know you can write the time code like this: 5:19

    • @LucasDevelop
      @LucasDevelop 3 місяці тому +1

      @@rhubarb5297 well now I do xD

  • @dimitrisgkofas7787
    @dimitrisgkofas7787 3 місяці тому

    Do it with faces hehehe not blocks hehe...

    • @dimitrisgkofas7787
      @dimitrisgkofas7787 3 місяці тому

      AND also do the trick with faces direction to not show faces that are behind!!!

  • @KristOFF-T
    @KristOFF-T 3 місяці тому +10

    This comment is to prevent someone comment "first"

    • @rhubarb5297
      @rhubarb5297 3 місяці тому +6

      This is the equivalent of people saying first

    • @Atrulion
      @Atrulion 3 місяці тому +2

      @@rhubarb5297 That's exactly what someone mad cuz they didn't get to comment "first" would say

    • @santiagobarbosa615
      @santiagobarbosa615 3 місяці тому

      first

  • @XR55OR
    @XR55OR 3 місяці тому

    I see a C++ Super Programmer, C# ⚔C++ who win?

    • @ridhamsharma618
      @ridhamsharma618 3 місяці тому

      Don't act like an amateur by comparing languages.

  • @Sirbozo
    @Sirbozo 3 місяці тому

    im cooler than you

  • @H8r44
    @H8r44 3 місяці тому

    2:43 So real. I should be coding and improving my coding skills but whenever i start a project im getting onto some shitty problem and i never come back to this. That is so frustrating and i dont know what should i do

  • @MarcosDehner-n2v
    @MarcosDehner-n2v 3 місяці тому

    Kudos for drawing the popcorn!