Hey guys! Thank you for watching the video. I know it's been a while. I'm going to try to upload at least one video a month from now on, but we'll see how it goes. Feel free to hold me accountable to that lol. Let me know if there's anything you'd like to see in future videos!
Thanks for the sub! Most of the code wasn't specific to C++. When I made that comment, I was specifically referring to my C++ knowledge and not my programming abilities as a whole. I struggled a lot with things like rendering and threads. I could see why it would sound like a humble brag in the video, though
I also jumped into the deep end and started learning 3D programming, C++ and OpenGL for the first time by making a minecraft clone and went through pretty much the exact same steps you did but hit a brick wall due to my lack of knowledge. Seeing a simple and easy to read working model (even if inefficient) like yours is going to make my learning so much easier! Thank you for sharing this project!
It is actually very suboptimal to create a new thread for every chunk. Creating a thread has significant overhead. Your program has to reach out to the OS and the OS itself takes really long to create this thread. Instead, what you usually to is to create many threads at the start of the program (usually as many as you have CPU cores) and build some sort of task queue, from where the threads take tasks that need to be executed. This is called a threadpool and there are libraries out there. These tasks might also be referred to as "light threads" or similar. And having more threads running than the CPU has cores, leads to bad performance too. In this Situation, every core has to run multiple threads (with similar amount of work) at once, which leeds to excessive context switching. This means, the core has to switch the running thread every few cycles, which has major overhead.
Thanks for the suggestion! I did come across threadpools in my research, but I had so much trouble implementing threads that I decided to hold off until a future video
I started my first c++ project a little over a year ago, and I'm still working on the same game (albeit I've restarted from scratch twice) and the improvement is massive. Keep going!
You should try making a small project in just a few days, like Ludum Dare, so you'll have taken a project through all stages of production. It really helps.
Directional diffuse lighting is easy to implement and will make it way easier to see blocks. Also, I made a (unfinished) Minecraft clone as my first C++ project and did it mostly how you did. Don’t worry about optimizations right away, just get things working, I feel like it’s better learning to make mistakes and then fixing them rather than worrying about all optimizations at the start. Also, if you think 140 lines of code is a lot for a triangle, just wait until you try Vulkan
I'm definitely going to be playing with shaders in the next episode. Now that I look at it, the video is a bit hard to look at lol. I agree with you about the optimizations. I'm going to be slowly optimizing it over time instead of doing it all at once. I did a bunch of optimizations at the end because I was so close to 10 minutes of runtime and wanted to push it past that point. Vulkan sounds scary lol
@@wsalevanvulkan is the german word for volcano. people already died from volcanos. therefore i can agree that they are scary. jokes aside it was a great video.
Impressive from both coding and video making sides. Really thought I'm watching some popular youtuber before I've noticed the sub and view count. An amazing job as for someone new into this!
This is such a cool and entertaining video. your video got recommended to me and i just clicked on it to check what this is. i watched thru the whole video since i like programming and reading code etc. and the way you edited the video and told how you did things etc it made everything so well done! great job you got me subscribed mate:)
One Russian man named MihailRis has already done minecraft in C++ and continues, I hope you get something like him, he already has an interface, main menu, mods and much more!
I'm planning on adding all those features! My videos are focused more on the learning process than the result because I'm new to C++, so it might take a while to get that far lol. But I'll get there someday
Bro i had nightmares trying to make a gui with cpp... It was so bad that i quit it forever and went to web development 😂 this bro casually comes with sunglasses on and says ah yes... I am new to cpp, so i am making MINECRAFT CLONE! and proceeds to make the basics like a chad. What a man! Well done 🔥 it's really impressive 👍
Thanks! I'm working on the next part now. I'm definitely going to be implementing level of detail at some point. I have other essential features I want to add first, though.
If Microsoft ever sees this and are interested in achieving the dream of ending off Java edition Minecraft, they're probably gonna wanna hire you onto their team and aquisate you for your amazing project clone...
yeah, he also explains it more and shows it unlike other people who just say what they added removed or changed that the player would notice (e.g new block, lighting, etc)
very noice. c++ is my favorite language with c being second. also, you should see the amount of code required to create a window using raw WinAPI, its pretty awful
This is NOT bro's first C++ project 💀 But genuinely, This is so fucking impressive. My first project in C++ was a login/registration system in the terminal.
Thanks! It is my first project though it is also my second attempt at it. The first one failed miserably but taught me a lot lol. That's why this one went as well as it did.
@@wsalevan also how tf do you deal with C++ you inspired me to try to learn C++ and C++ inspired me to jump into traffic me and my small brain will stick to regular C :D
@@wsalevan WAIT THAT"S SMART I dont understand the point of references, why cant we just use pointers/addresses Could you explain why you'd use a reference instead of an address
A while ago I saw a video, where somebody optimized the performance for rendering in minecraft. Not sure where to find it, though. He got the rendering performance up by a factor of a million or something by taking advantage of the fact, that all faces only face in once direction and only the surface ones are shown.
When I get better at C++, I wanna make a whole tutorial series. I just use Visual Studio, so I never downloaded a separate compiler. As for OpenGL, I followed learnopengl.com
I am very unqualified to make a tutorial and would probably do more harm than good if I tried making one. I don't know about C++ Minecraft tutorials but I learned everything about C++ and OpenGL from learncpp.com and learnopengl.com
5:35 DEBUG builds typically have NO optimizations so real-time rendering will be extremely slow. In large codebases such as UE5 it isn’t uncommon to compile _most of the program with optimizations_ on and to _turn off optimizations for the few functions_ you need to debug.
Yeah I definitely didn't explain myself very well in the video. I knew that debug builds don't have optimizations but I wasn't expecting that big of a difference. It's not shown very well in the video but the chunks take about a fifth of the time to generate when in a release build
@@wsalevan It depends on the task but yup, while computers are extremely fast the overhead of no optimizations, debug information, exceptions, and type safety can add up _significantly._ On a few Wii games I worked on I built our graphics library with full optimizations and compiled the rest of the game with debug info. and no optimizations to make it easier to trace when it crashed. It is always fun to see the performance difference between no optimizations and -O2 or -O3.
@@wsalevan If you haven't seen it already you will love checking out Matt's excellent Compiler Explorer (godbolt) to see how various compilers optimize code.
@@wsalevan 😅 How and where did you learn making vertices to make 3d shapes. I have learned C++ from my university and they never told us about 3d shapes and GUI like stuff. I tried to find online but didn't understand anything. I have made apps in java with android studio and dart in flutter but they provide premade library. I want to create something custom like you have in this video. Can you tell me a little bit of road map. Do I really have to learn openGl with this as well? My skill level in C++ is.... In my last project I made a game which ran in cmd. It was a robot catching numbers. I used 2d array to create game area. And gave the game some colors using ANSI escape characters, Which control the color of text and it's background.
To start making graphics, you need some sort of graphics library which is probably why they never taught you about it in university. I would recommend OpenGL to start with but there are others such as Vulkan and DirectX as well. If you want to use OpenGL, I would recommend following learnopengl.com.
I have the next few videos planned out already but I'm definitely planning on adding collisions soon and greedy meshing at some point when I do a bunch of optimizations
I suggest not using OpenGL anymore, but WGPU. WGPU is a more modern rendering API written on top of the lower level Vulkan, originally supposed to be a more modern OpenGL for the web, but not as close to hardware as Vulkan, which would be difficult/impossible on the web. But it's just a modern rendering API, without the old features and closer to Vulkan. It especially doesn't use global variables internally, but instead relies on structs. Also it's cross platform and works on Apple, which doesn't support OpenGL anymore.
I used learncpp.com and learnopengl.com for this video. I would recommend just starting simple and working your way up from there. Take each step of the process of making a game like this one step at a time and don't worry too much about optimizations or anything until you get it working.
yeah though bedrock edition was originally created as minecraft for phones but then they replaced console edition and kinda tried to replace java but they failed
Idk if you’ll answer but how did you learn c++ im 11 but super interested in how to code and it would help me as all the RUclips tutorials I don’t really understand
I learned C++ from learncpp.com. Though I already had a lot of programming experience when I started learning it. I actually started learning coding when I was 11 and I started with Scratch. If you want to start making games right off the bat, I would recommend learning something easier than C++ such as Scratch, Python and PyGame, or Unity/Godot/Unreal. If you learn an easier language, most of those skills will be easily transferrable to more difficult languages.
Hey guys! Thank you for watching the video. I know it's been a while. I'm going to try to upload at least one video a month from now on, but we'll see how it goes. Feel free to hold me accountable to that lol. Let me know if there's anything you'd like to see in future videos!
I would like to see a much more technical and in depth explanation of the code
Isn't bedrock programmed in c++ ?
@Scudmaster11 Yup
@Mineninja12 Bet
You do realize thank you very much made your own version of Minecraft bedrock edition does Minecraft bedrock edition was made in c+ C++
bro said I'm not good at c++ then makes a Minecraft Clone. Good video you just earned a sub
Thanks for the sub! Most of the code wasn't specific to C++. When I made that comment, I was specifically referring to my C++ knowledge and not my programming abilities as a whole. I struggled a lot with things like rendering and threads. I could see why it would sound like a humble brag in the video, though
XD
This is actually insanely impressive for your first c++ program, great job
Thanks!
true. +1
not its first, 100%
With this big magnitude for your first c++ project I can't imagine how many companies out there are trying to recruit you
None :(
Microsoft made a c++ clone of minecraft too
Lmfao
True
bugrock
yeah but directx not opengl
@@smqfland the original
Minecraft Java:Lag Edition
I also jumped into the deep end and started learning 3D programming, C++ and OpenGL for the first time by making a minecraft clone and went through pretty much the exact same steps you did but hit a brick wall due to my lack of knowledge. Seeing a simple and easy to read working model (even if inefficient) like yours is going to make my learning so much easier! Thank you for sharing this project!
I'm glad my project could help you!
It is actually very suboptimal to create a new thread for every chunk. Creating a thread has significant overhead. Your program has to reach out to the OS and the OS itself takes really long to create this thread. Instead, what you usually to is to create many threads at the start of the program (usually as many as you have CPU cores) and build some sort of task queue, from where the threads take tasks that need to be executed. This is called a threadpool and there are libraries out there. These tasks might also be referred to as "light threads" or similar.
And having more threads running than the CPU has cores, leads to bad performance too. In this Situation, every core has to run multiple threads (with similar amount of work) at once, which leeds to excessive context switching. This means, the core has to switch the running thread every few cycles, which has major overhead.
Thanks for the suggestion! I did come across threadpools in my research, but I had so much trouble implementing threads that I decided to hold off until a future video
I started my first c++ project a little over a year ago, and I'm still working on the same game (albeit I've restarted from scratch twice) and the improvement is massive. Keep going!
Nice. C++ is a difficult but fun language. Thanks! Good luck on your game!
You should try making a small project in just a few days, like Ludum Dare, so you'll have taken a project through all stages of production. It really helps.
Directional diffuse lighting is easy to implement and will make it way easier to see blocks. Also, I made a (unfinished) Minecraft clone as my first C++ project and did it mostly how you did. Don’t worry about optimizations right away, just get things working, I feel like it’s better learning to make mistakes and then fixing them rather than worrying about all optimizations at the start. Also, if you think 140 lines of code is a lot for a triangle, just wait until you try Vulkan
I'm definitely going to be playing with shaders in the next episode. Now that I look at it, the video is a bit hard to look at lol. I agree with you about the optimizations. I'm going to be slowly optimizing it over time instead of doing it all at once. I did a bunch of optimizations at the end because I was so close to 10 minutes of runtime and wanted to push it past that point. Vulkan sounds scary lol
@@wsalevanvulkan is the german word for volcano. people already died from volcanos. therefore i can agree that they are scary. jokes aside it was a great video.
Haha I'm glad you enjoyed the video
Impressive from both coding and video making sides. Really thought I'm watching some popular youtuber before I've noticed the sub and view count. An amazing job as for someone new into this!
Thank you! I'm glad you enjoyed the video!
This is such a cool and entertaining video. your video got recommended to me and i just clicked on it to check what this is. i watched thru the whole video since i like programming and reading code etc. and the way you edited the video and told how you did things etc it made everything so well done! great job you got me subscribed mate:)
Thanks! I'm glad you enjoyed it!
Video's awesome. Aesthetic, clean, and fun. Touched all the nerdy parts of my brain I haven't touched since I graduated CompSci. Subscribed.
Thanks!
I have no idea what video I watched to subscibe to you, but I'm glad that I am subscribed lol, good video ❤
Thank you! I'm glad you enjoyed the video!
Nicely done mate! That’s impressive. Can’t wait for the next vid
Thanks! The next one will come soon ;)
One Russian man named MihailRis has already done minecraft in C++ and continues, I hope you get something like him, he already has an interface, main menu, mods and much more!
I'm planning on adding all those features! My videos are focused more on the learning process than the result because I'm new to C++, so it might take a while to get that far lol. But I'll get there someday
A company named Mojang has already done minecraft in C++ and I hear its the most sold game of all time. Seems like its a pretty useable platform!
THIS LOOKS AMAZING ALREADY! (I could never)
Thanks! You can accomplish amazing things if you put your mind to it... and research
I'm in the video, yes you should do a video about the first attempt. This is very impressive for your first C++ project and the editing is also great
Thank you! I'll definitely make that first attempt video
🇷🇴
Bro i had nightmares trying to make a gui with cpp... It was so bad that i quit it forever and went to web development 😂 this bro casually comes with sunglasses on and says ah yes... I am new to cpp, so i am making MINECRAFT CLONE! and proceeds to make the basics like a chad. What a man! Well done 🔥 it's really impressive 👍
Thanks!
that's insane bro, waiting for the next part. btw what do u think about implementing Distant Horizons' render distance mechanics in the future?
Thanks! I'm working on the next part now. I'm definitely going to be implementing level of detail at some point. I have other essential features I want to add first, though.
This video inspired me to also make a minecraft clone. I've always wanted to give it a try.
That's awesome! Good luck!
bro made bedrock edition..
Very well done for such a "small" channel. You wont be small for long...
Thanks! Hopefully...
A new minecraft edition on the horizon: Minecraft Evan Edition.
That looks soo cool. Love you content
Thanks!
1:07 wait until you find out about Vulkan…
This is definitely gonna blow up
We'll hope so
Hello brother you are on fyp congrats!!!🎉🎉🎉
Thanks!
If Microsoft ever sees this and are interested in achieving the dream of ending off Java edition Minecraft, they're probably gonna wanna hire you onto their team and aquisate you for your amazing project clone...
Totally
Amazing video
I love how you show the code
Thanks!
yeah, he also explains it more and shows it unlike other people who just say what they added removed or changed that the player would notice (e.g new block, lighting, etc)
Here at 900 subs bro! I believe in you
Thanks!
very noice. c++ is my favorite language with c being second. also, you should see the amount of code required to create a window using raw WinAPI, its pretty awful
I don't even wanna know what that looks like...
DAMN, making a c++ game without even using unreal ... balzy
That is amazing bro
Love the vid, am thinking about making one myself as well. Please upload a more technical breakdown of the code
Thanks! I'll definitely make one at some point.
"I Made a Minecraft Clone in C++" you mean bugrock edition but without bugs? YEY
I think it'll end up with way more bugs that bedrock edition lol
Sun is burned into my eyes so I can't watch your cool video fully
Oh no
This is amazing! You deserve more subs and likes dude. You've at least gained one from me. I hope to see more in the future!
Thank you! I'm glad you enjoyed it! I'll definitely make them more consistently than I have been lol
This is NOT bro's first C++ project 💀
But genuinely, This is so fucking impressive. My first project in C++ was a login/registration system in the terminal.
Thanks! It is my first project though it is also my second attempt at it. The first one failed miserably but taught me a lot lol. That's why this one went as well as it did.
This is really awesome!
Mojang should take inspiration and make a C++ version of the game. Hope they don't add any in-game purchases tho
Yeah that would be horrible if they added micro transactions to Minecraft...
@@wsalevan fr
@@wsalevan also how tf do you deal with C++
you inspired me to try to learn C++ and C++ inspired me to jump into traffic
me and my small brain will stick to regular C :D
I just don't use features of C++ that I didn't learn yet and then slowly learn them over time
@@wsalevan WAIT THAT"S SMART
I dont understand the point of references, why cant we just use pointers/addresses
Could you explain why you'd use a reference instead of an address
damn so you're making this in c++ and opengl with no engine? crazy impressive for a first project.
chat gpt going crazy
@@filled9971 what?
@@filled9971 what?
@@filled9971 what makes u think he cheated?
This is so impressive considering i am struggling to make a calculator in c++
Thanks! C++ is hard
I guess welcome to the voxel gamedev community
Apparently that's the content I'm doing now lol
@@wsalevan well it's still a good fun to make voxels work
Yes it is. I'm enjoying this project a lot
If he did, Vulkan. He would be crying. I am, especially because I messed up one line, and now my 1 triangle won't show up.
Vulkan scares me
Super impressive! How did you learn base c++?
Thanks! I learned from learncpp.com
Decided to step it up a "Notch"
Nice :D
A while ago I saw a video, where somebody optimized the performance for rendering in minecraft.
Not sure where to find it, though. He got the rendering performance up by a factor of a million or something by taking advantage of the fact, that all faces only face in once direction and only the surface ones are shown.
dude, keep up! luv this vid
Thanks!
I made a Minecraft Clone too, but for the PSP based in C++ i have it on my youtube channel
Good video Bro 🤍
"it only took this much code for a single triangle" (shohws 149 lines)
me who has been using vulkan and just today got a triangle at code line 1000:
Vulkan scares me
WSAL: am bad at cpp. Also WSAL: I made Minecraft 👏
I made Minecraft but the code is atrocious lol
now imagine doing this in vulkan, its 900 lines for a single triangle
Yeah I think I'm going to remain blissfully ignorant for now lol
video=10000000
my brain=0.000000001
That was a very very cool video.
Thanks!
So cool! I love this!
Thanks!
@@wsalevan ofc
Looks a lot better than the Bedrock Edition of Minecraft.
You are hired mr. Microsoft is waiting. ✌🏻
Bet
@@wsalevan dude you can't come overseas to celebrate 🥂 cheers
amazing! keep it up man
Thanks!
You are epic , keep it up 🔥🔥
Thanks! I'll keep 'em coming!
WSAL Evan presents: Minecraft Bedrock Edition
Siiick
Bro this sh*t is underrated
BRO THATs AWSOME!!!!!!!!!!!!!!!
Thanks!
"dude, i cant afford minecraft, lemme make my own"
My exact thought process
1:40 149 lines for a triangle... I dare you to try this in Vulkan xD
Vulkan scares me
Now, add fireflys !
I'll put it on my to-do list. Love the idea lol!
bro is making bedrock edition but good 🙏🔥🔥
Perfect bedrock clone
Are you gonna comment this on every one of his videos?
He just made Bedrock Edition Minecraft, Bedrock runs C++.
Could you make a tutorial as to how to download the C++ compiler + OpenGL library. Awesome video
When I get better at C++, I wanna make a whole tutorial series. I just use Visual Studio, so I never downloaded a separate compiler. As for OpenGL, I followed learnopengl.com
@@wsalevan Wait so that's it, you just get it from Visual Studio
Yup
Wow! Can you do a tutorial pls? I searched how to do it, but i didn't understand what to install and there's no a normal wiki that is up to date!
I am very unqualified to make a tutorial and would probably do more harm than good if I tried making one. I don't know about C++ Minecraft tutorials but I learned everything about C++ and OpenGL from learncpp.com and learnopengl.com
You're a god
Fun fact: Minecraft bedrock edition is actually made in c++
Im glad it wasnt object oriented, I cant code it for nuts.
You should had PBR materials with pathtracing
I'm definitely going to do that sometime in the future
5:35 DEBUG builds typically have NO optimizations so real-time rendering will be extremely slow.
In large codebases such as UE5 it isn’t uncommon to compile _most of the program with optimizations_ on and to _turn off optimizations for the few functions_ you need to debug.
Yeah I definitely didn't explain myself very well in the video. I knew that debug builds don't have optimizations but I wasn't expecting that big of a difference. It's not shown very well in the video but the chunks take about a fifth of the time to generate when in a release build
@@wsalevan It depends on the task but yup, while computers are extremely fast the overhead of no optimizations, debug information, exceptions, and type safety can add up _significantly._
On a few Wii games I worked on I built our graphics library with full optimizations and compiled the rest of the game with debug info. and no optimizations to make it easier to trace when it crashed.
It is always fun to see the performance difference between no optimizations and -O2 or -O3.
Wow that's crazy. Yeah I never would've thought that the optimizations would have quite that big of an effect
@@wsalevan If you haven't seen it already you will love checking out Matt's excellent Compiler Explorer (godbolt) to see how various compilers optimize code.
I'll check it out. Compilers are pretty cool
where did you learn this stuff? which playlists or courses did you use?
I used learnopengl.com and learncpp.com
Shadows would add a lot.
True
@@wsalevan Apparently I was only four days late, oh well.
Well I didn't add proper shadows yet. I just have basic diffuse lighting
Minecraft: CPP Edition
Bruh... My first C++ program was Hello World 😂😂😂
To be fair, this project started out as hello world lol
@@wsalevan 😅
How and where did you learn making vertices to make 3d shapes. I have learned C++ from my university and they never told us about 3d shapes and GUI like stuff. I tried to find online but didn't understand anything. I have made apps in java with android studio and dart in flutter but they provide premade library. I want to create something custom like you have in this video. Can you tell me a little bit of road map. Do I really have to learn openGl with this as well?
My skill level in C++ is.... In my last project I made a game which ran in cmd. It was a robot catching numbers. I used 2d array to create game area. And gave the game some colors using ANSI escape characters, Which control the color of text and it's background.
To start making graphics, you need some sort of graphics library which is probably why they never taught you about it in university. I would recommend OpenGL to start with but there are others such as Vulkan and DirectX as well. If you want to use OpenGL, I would recommend following learnopengl.com.
@@wsalevan 👍 thanks❤️
gj bro
Thanks
Next video collisions or binary greedy meshing
I have the next few videos planned out already but I'm definitely planning on adding collisions soon and greedy meshing at some point when I do a bunch of optimizations
cool video
Thanks!
Now, i dont want to be a programmer! haha
subscribed
Imagine if he fixes minecrafts bedrocks bugs
That is if they even come up
huge chance that they wont
Where i can learn all this? I already know advanced programming on plain c but nothing of game dev
I suggest not using OpenGL anymore, but WGPU.
WGPU is a more modern rendering API written on top of the lower level Vulkan, originally supposed to be a more modern OpenGL for the web, but not as close to hardware as Vulkan, which would be difficult/impossible on the web.
But it's just a modern rendering API, without the old features and closer to Vulkan.
It especially doesn't use global variables internally, but instead relies on structs.
Also it's cross platform and works on Apple, which doesn't support OpenGL anymore.
Hmmm I'll look into it
Cara achei teu video muito bom, um dia eu vou me aventurar e criar um game também
You sound just like Acerola
It's the nerd voice lol
minecraft bedrock: I don't exist 🤣
Yeah Minecraft has never been made in C++ before lol
Cool, now do it in raw machine code
Bet
make the font bigger in the timelapse please
I'll keep that in mind for future videos
Any tips on how I can study this
I used learncpp.com and learnopengl.com for this video. I would recommend just starting simple and working your way up from there. Take each step of the process of making a game like this one step at a time and don't worry too much about optimizations or anything until you get it working.
do you have any tips for learning opengl?
Where did you learn how to do this
Well i have same bad news
They already made it
Big sad
Hmmmm, now I wonder if an AI could translate current Minecraft Java into C#...
Probably. I'm not sure how good of a job it'd do though
minecraft bedrock is in c++ xD
We don't talk about bedrock edition
yeah though bedrock edition was originally created as minecraft for phones but then they replaced console edition and kinda tried to replace java but they failed
Idk if you’ll answer but how did you learn c++ im 11 but super interested in how to code and it would help me as all the RUclips tutorials I don’t really understand
I learned C++ from learncpp.com. Though I already had a lot of programming experience when I started learning it. I actually started learning coding when I was 11 and I started with Scratch. If you want to start making games right off the bat, I would recommend learning something easier than C++ such as Scratch, Python and PyGame, or Unity/Godot/Unreal. If you learn an easier language, most of those skills will be easily transferrable to more difficult languages.
@@wsalevan yeah I have some programming experience with JavaScript and c# also scratch
Nice. If you want to get started with C++, I'd recommend learncpp.com and for OpenGL, learnopengl.com
Bedrock: wait a minute
We don't talk about bedrock...
@@wsalevan
me(a bedrock player): *crying cat thumbs-up*