I Made a Minecraft Clone in C++

preview_player
Показать описание
After making a Minecraft clone in Unity, I decided to step it up a notch and make Minecraft again in C++ with OpenGL. It's the Scuffed Minecraft Part 3 you've all been waiting for. I hope you enjoy!

Let me know if you have any tips or suggestions for this project or any other projects.

Timestamps:
0:00 - Intro
0:58 - Cube
3:03 - Chunks
3:31 - Planet
4:03 - World Generation
4:55 - Improvements
9:29 - Outro

#minecraft #gamedev #cpp #opengl #devlog
Рекомендации по теме
Комментарии
Автор

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!

wsalevan
Автор

bro said I'm not good at c++ then makes a Minecraft Clone. Good video you just earned a sub

darkphinkwastaken
Автор

This is actually insanely impressive for your first c++ program, great job

Автор

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.

dampfwatze
Автор

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!

Console.Log
Автор

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!

RoseGoldKR
Автор

With this big magnitude for your first c++ project I can't imagine how many companies out there are trying to recruit you

vinhtiennguyen
Автор

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

mariovelez
Автор

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!

callmedanker
Автор

I don't know if you'll ever see this, but don't call destructors for chunks manually. The destructor will get automatically called when the object is deleted, which means you're potentially doubling the number of times the destructor runs. If you do any memory management inside the destructor, it can lead to some nasty bugs like double frees or even use-after-free. For example, if you have an array, m_array, that gets accessed and then destroyed, it will already be destroyed on the second call to the destructor, meaning you'll access deallocated memory and either SIGSEGV or, even worse, continue uninterrupted until the program crashes to corrupted memory later

ryanilari
Автор

Nicely done mate! That’s impressive. Can’t wait for the next vid

BAG
Автор

Video's awesome. Aesthetic, clean, and fun. Touched all the nerdy parts of my brain I haven't touched since I graduated CompSci. Subscribed.

Dominator
Автор

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:)

Shadowsfowls
Автор

THIS LOOKS AMAZING ALREADY! (I could never)

FuGyz
Автор

I have no idea what video I watched to subscibe to you, but I'm glad that I am subscribed lol, good video ❤

RealPnoenix
Автор

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

marcboss
Автор

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!

mawzyyyy
Автор

Here at 900 subs bro! I believe in you

J.C
Автор

This video inspired me to also make a minecraft clone. I've always wanted to give it a try.

DrJones
Автор

Hello brother you are on fyp congrats!!!🎉🎉🎉

HTFilo