The Cherno

The Cherno

I'm making a game engine called Hazel! Here you'll find videos about that and C++/programming

Conversion Operators in C++

Conversion Operators in C++

Asset Packs

Asset Packs

40 Days.

40 Days.

I'm Struggling.

I'm Struggling.

Hazel Engine ON LINUX!

Hazel Engine ON LINUX!

What exactly is HEADLESS?

What exactly is HEADLESS?

Пікірлер

  • @pepehimovic3135
    @pepehimovic3135Сағат бұрын

    My uni was C++11 last I took the classes. And I thought that was a bit outdated…

  • @HungryEagle2610
    @HungryEagle2610Сағат бұрын

    I had to go through all the videos till now twice to understand what was going on here. I don't think there is any such c++ intensive project on whole of KZread which not only teaches c++ but also helps visualize it. All hail @TheCherno

  • @Javad-ek4es
    @Javad-ek4es3 сағат бұрын

    Thank you so much. This playlist is the most comprehensive C++ playlist I’ve ever come across. I’m curious if you’ve covered the topic of writing makefiles for C++ programs. If not, I would greatly appreciate it if you could teach it in the same manner as your other playlists, or provide a thorough resource for me to study. As a Computer Science student, I’ve struggled to find a complete guide to learning makefiles.

  • @kiyasuihito
    @kiyasuihito7 сағат бұрын

    Hilarious and also really cool. 'Hazel. Better thumbnails, better games.'😅🎉

  • @chris52000
    @chris5200011 сағат бұрын

    std::execution_policy?

  • @SyIvIus
    @SyIvIus18 сағат бұрын

    The last example may be used in games like Final Fantasy, when you switch the character in action.

  • @GoncaloFerreira
    @GoncaloFerreira20 сағат бұрын

    I love these videos, and I'm not a beginner, I''ve created my own game engines, other softwares, etc. But it's great to watch these videos and trying to predict what you're gonna say. It's kind of like a game trying to reach the end predicting everything you're gonna say, sometimes we forget something and we think "Oh God how could I've forgotten this?". Please continue to do these videos, they are great. :) And yeah, it's very irritating when someone uses classes and heap memory for everything, in C++ we're really free, my favorite language. PS: You should have the unofficial C++ mascot plush there, it would look great in the videos, as sometimes you review some pretty unhealthy code and the mascot would fit perfectly, and you could exchange that mascot by a healthy rat plush at the end to show how the code got healthier. :)

  • @batchnerd
    @batchnerd20 сағат бұрын

    If you were to implement this, would you make the asset manager responsible for keeping assets current? I'm thinking that would be the easiest. Lets say every 100ms check all in use assets for an update? If there are some to be updated add them to a queue? This might simplify the thumbnail system a little bit because it would no longer have to check if a asset is up to date or not.

  • @reycors6871
    @reycors687122 сағат бұрын

    thanks bro

  • @sashareinhard6645
    @sashareinhard6645Күн бұрын

    mmm u suggested iterating through the std::map of the gameobjects cuz iterating the extra std::vector of gameobjs is over optimized. but then u challenged his vector of vectors over some cache misses? i dont think flattening the vector would make any noticeable difference performance wise tbh

  • @LeonardoTx1000
    @LeonardoTx1000Күн бұрын

    These videos always makes me feel stupid...

  • @JaydenCloudwalker
    @JaydenCloudwalkerКүн бұрын

    A pure virtual function serves as a declaration (it also imposes a requirement on derived classes to provide their own implementation). This declaration is needed when assigning a pointer of a base class type (by base, I'm referring to the abstract class - the class that provides the pure virtual function) to an object of a derived class type and subsequently calling the function. Without a pure virtual function (or just a virtual function if you want to implement the function inside the base class), the base pointer lacks awareness of any of the function's implementation in derived classes. Not every derived class needs to explicitly implement the function. Instead, if a derived class lacks an implementation, the program will search through the inheritance hierarchy to find one, starting from the current derived class and progressing back to the base class. Only if no implementation is found throughout the hierarchy does it result in a compile-time error.

  • @matiturock
    @matiturockКүн бұрын

    Can U make a code review of Godot?

  • @ayomikunodyssey
    @ayomikunodysseyКүн бұрын

    18:11

  • @isodoubIet
    @isodoubIetКүн бұрын

    An app set with subsystem Console doesn't even need system pause, VS will automatically make the window persist, but people keep writing system pause for some reason. It baffles me.

  • @davidfrischknecht8261
    @davidfrischknecht8261Күн бұрын

    What I don't like about ImGui is that it doesn't look native. I prefer desktop applications to look native.

  • @punpcklbw
    @punpcklbw2 күн бұрын

    I never felt an urge to use const in my code. For me, it only clutters up the program. Just assign something once in an initializer, and don't modify the var further down, and it will be implicitly "const".

  • @KaidenBird
    @KaidenBird2 күн бұрын

    Thats hoping the scheduler looks down upon you lightly.

  • @crooda3681
    @crooda36812 күн бұрын

    I had to slow down to 0.75x to understand the video 😭

  • @noosetime9423
    @noosetime94232 күн бұрын

    Dont make a 2nd file. Why the need for confusion. Just hide the meta file u make and auto reference it if it exists

  • @Aragubas
    @Aragubas2 күн бұрын

    wow so fast

  • @alan5506
    @alan55062 күн бұрын

    16 minutes talking about completely irrelevant things. Ok. It's 30 lines of code. There isn't a single goddamn principle that matters here. And these suggestions you are making are just shuffling code around and have no impact on anything else. Principles matter when there toooooooo much code and without these principles, you are swamped and confused.

  • @zipa72
    @zipa722 күн бұрын

    You should not start a game from within a constructor. The constructor should be used for initialization-related stuff. If there is an exception thrown from the constructor, you have to clean them there as well, as there will be no object to call its destructor later. And the delete method will fail.

  • @Zooiest
    @Zooiest2 күн бұрын

    Well now you're just comparing floats and Oranges

  • @sandipdas7206
    @sandipdas72062 күн бұрын

    Actually, since Java 21 it's not necessary to write the whole "public static void" in "public static void main" one can just get away with writing "void main"

  • @artemking4460
    @artemking44603 күн бұрын

    It does matter what you return from main. The return from main is the exit code, and if you omit return 0, it does not just do a return default(int) or whatever, it does not return at all - this is UB.

  • @PBlague
    @PBlague3 күн бұрын

    Watching this makes me happy that I learnt Rust in the past year. It just automatically makes you aware of all these issues and when you get the hang of it writing C++ will basically be a piece of cake!

  • @cycomkid
    @cycomkid3 күн бұрын

    You speak too much, unnecessarily

  • @fbarr050
    @fbarr0503 күн бұрын

    Hi Cherno and everyone! I want to buy a new laptop for programming... what would you recommend, a windows laptop with an intel processor and nvidia graphics card or a macbook pro with m3 chip? I want something versatile and powerful to build different kinds of apps

  • @pranavbadrinathan6693
    @pranavbadrinathan66933 күн бұрын

    Hey Cherno, a question for you. Do you only take C++ code in your code reviews? I have a project in C and another in Rust that I would love to get checked out by you, but I won't send it in if you don't do other programming languages 😅. I guess C should be fine if you already review C++ though...

  • @leducphuclong
    @leducphuclong3 күн бұрын

    Thank you so much !! Great Teacher !!

  • @OkOkOkIMightKnowYou
    @OkOkOkIMightKnowYou3 күн бұрын

    Brothers, visual studio is unholy, cmake is the only way to be redeemed 🙏🏽

  • @kzone272
    @kzone2723 күн бұрын

    You gotta move on from thumbnails

  • @ismbks
    @ismbks3 күн бұрын

    i have never watched this channel before but i know "thecherno" name from that famous c++ playlist (also never watched), kinda crazy

  • @leonardopantoja7121
    @leonardopantoja71213 күн бұрын

    Excelente. Gracias.

  • @momennasr1637
    @momennasr16373 күн бұрын

    if you can't include the Hazel.h try to add "$(SolutionDir)" instead of "$(SolutionDir)\Hazel\src"

  • @chrischoir3594
    @chrischoir35943 күн бұрын

    what is Hazel?

  • @tryrestartingit
    @tryrestartingit3 күн бұрын

    The nostalgia im feeling rn is crazy, this feels like my college years

  • @Tamtam-hh3xv
    @Tamtam-hh3xv3 күн бұрын

    It's all fun and games until the potato cpu of the end user gets congested

  • @AnythingSoup
    @AnythingSoup3 күн бұрын

    For anyone getting Linking errors from ImGui, make sure you have staticruntime "on" for the actual ImGui Project in premake!! Spent way too long debugging just to try that lmao

  • @raulguerreroflores1460
    @raulguerreroflores14603 күн бұрын

    circLe in 2D , sphere in 3D got it

  • @likewisepro
    @likewisepro3 күн бұрын

    Think of a time and multiples by 3

  • @RoboGameOfficial
    @RoboGameOfficial3 күн бұрын

    an icon in the top left corner of the thumbnail would be cool. I don't wanna be looking at the same image and thinking "why do I have another avocado"?

  • @microsoftgamerx854
    @microsoftgamerx8543 күн бұрын

    Benchmark: ``` #include <iostream> #include <chrono> struct Timing { std::chrono::time_point<std::chrono::steady_clock> start; Timing() { start = std::chrono::steady_clock::now(); } double Elapsed() { const auto end = std::chrono::steady_clock::now(); return std::chrono::duration<double, std::milli>(end - start).count(); } }; double Create2DArray() { Timing timing; int** a2d = new int* [5]; for (int i = 0; i < 5; i++) { a2d[i] = new int[5]; for (int j = 0; j < 5; j++) a2d[i][j] = 3; } return timing.Elapsed(); } double CreateDelete2DArray() { Timing timing; int** a2d = new int* [5]; for (int i = 0; i < 5; i++) { a2d[i] = new int[5]; for (int j = 0; j < 5; j++) a2d[i][j] = 3; } for (int i = 0; i < 5; i++) { delete[] a2d[i]; } delete[]a2d; return timing.Elapsed(); } double Create1DArray() { Timing timing; int* a1d = new int[25]; for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) a1d[j + i * 5] = 2; } return timing.Elapsed(); } double CreateDelete1DArray() { Timing timing; int* a1d = new int[25]; for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) a1d[j + i * 5] = 2; } delete[]a1d; return timing.Elapsed(); } int main() { double totalTimeCreate2D = 0.0; double totalTimeCreateDelete2D = 0.0; double totalTimeCreate1D = 0.0; double totalTimeCreateDelete1D = 0.0; for (int i = 0; i < 10; i++) { totalTimeCreate2D += Create2DArray(); totalTimeCreateDelete2D += CreateDelete2DArray(); totalTimeCreate1D += Create1DArray(); totalTimeCreateDelete1D += CreateDelete1DArray(); } std::cout << "AVG Time: Create 5x5 2D array: " << totalTimeCreate2D / 10.0 << " ms "; std::cout << "AVG Time: Create + Delete 5x5 2D array: " << totalTimeCreateDelete2D / 10.0 << " ms "; std::cout << "AVG Time: Create 5x5 1D array same behavior as 2D: " << totalTimeCreate1D / 10.0 << " ms "; std::cout << "AVG Time: Create + Delete 5x5 1D array: " << totalTimeCreateDelete1D / 10.0 << " ms "; /* AVG Time: Create 5x5 2D array: 0.00371 ms AVG Time: Create + Delete 5x5 2D array: 0.00648 ms AVG Time: Create 5x5 1D array same behavior as 2D: 0.00053 ms AVG Time: Create + Delete 5x5 1D array: 0.00095 ms */ return 0; } ```

  • @amingholizad
    @amingholizad3 күн бұрын

    It is a trick question. It does bot matter if you define it beforehand or not. It is not checking whether it is defined (there is no #ifndef GLFWAPI). It will be redefined in the header file.

  • @pterodactylboy1233
    @pterodactylboy12333 күн бұрын

    " end1 is not a member of std " "end1 is an undeclared identifier" ?

  • @CDBelfer4
    @CDBelfer43 күн бұрын

    Ah yes the game rendering with no assets 😎

  • @MrSofazocker
    @MrSofazocker3 күн бұрын

    ? You would want the game window etc. not lag or hang. That's what this is about. You remember all these loading screens that are just hanging and can't even play the loading bar animation smoothly? Yeah this here fixes that. You obviously will wait for things to be finished loading before showing it to the user. But while it's loading, the loading screen/music all of that should just continue without any hitches. The window should still be intractable and resizeable etc. etc.

  • @CDBelfer4
    @CDBelfer43 күн бұрын

    @@MrSofazocker don't worry I'm well aware of what multi threading is, but the point I'm making is that you still need to wait for those assets to be ready, loading screens have been responsive for decades now that's not really new, but you'd still need a loading screen. I think cherno is just selling this thumbnail driven data stuff a bit much, a good concept but its value isn't that great as far as engine features go imo

  • @kira.herself
    @kira.herself13 сағат бұрын

    @@CDBelfer4 what

  • @yashwanthcb
    @yashwanthcb3 күн бұрын

    so basically, multithreading?

  • @MrSofazocker
    @MrSofazocker3 күн бұрын

    no, process threads are just non-blocking code paths next to your mainThread. Doesn't have to be on different physical cores on your cpu, but yeah, can be.

  • @SNOZ562
    @SNOZ5623 күн бұрын

    ​@@MrSofazocker ...a separate "dedicated"/"background" thread that is not the main thread is literally what multithreading is. You are confusing multithreading with asynchronous code. What are you even talking about. Don't try correcting people if you don't even know the terminology.

  • @yassinesafraoui
    @yassinesafraoui3 күн бұрын

    Chill man he probably thought multithreading is related to multi core CPUs, that's why he brought up the cores thing

  • @EricPlayZ132
    @EricPlayZ13222 сағат бұрын

    @@yassinesafraoui doesn't matter what he thought, he's trying to correct someone else with incorrect information about what Cherno actually meant

  • @SownJevan
    @SownJevan3 күн бұрын

    Pretty neat.