Why to use C++ for game development? 🤫

Today with an answer to some requests I got about game programming many guys wanted to know 
Why to use C++ for game development? 
And What are the advantages of using C++ for game programming?
 so let me point out the main reasons a C for using C++ but I don't want to say that you have to use C++ and no other language of course this also depends on the type of game you're going to create the first point for using C++ in my opinion is performance and efficiency the language is compiled directly to machine instructions this means you are really close to the CPU of your computer closer than using an interpreted language for example one could argue know that the engine is written in C++ anyway and the game logic is written by scripts that just called the native implementation of the engine but it worked on projects with a few hundred thousand lines of scripting code. And at this point it makes a difference if you use languages like JavaScript Lua or c-sharp the chords to the engine are known native system codes okay the calls to the native code has to be marshalled and these producers and overhead but ever said it highly depends on the kind of game you are creating and also the complexity of necessary calculations for example in C++. You don't have to use garbage collection you can be the master of construction and destruction I know garbage collection is nice it's convenient not to care for memory but on the other hand C++ with its new features.


Since version 11 like shared or unique pointers offers a great garbage collection as well but you are still able to control when memory is allocated and freed relying on a garbage collector. Means that there could be unpredictable performance glitches and problems that are not under your control especially for larger projects with a lot of scripting code this could have a significant negative impact in one project I remember I noticed a short pausing of the application we analyzed this and it was caused by the garbage collector threat so to sum it up you might not really notice the garbage collection impact in your game but it could be the case and if you want to have the best performance possible with a deterministic control of the resources used you should consider using C++ I would say that starting with C++ as a non programmer is a good decision you will run or you could run into problems that are not easy to solve for example when the linker brings errors that are really hard to understand or the compiler comes up with errors that are caused in completely different context this could be really frustrating for beginners the goal should always be to learn and understand the concepts of programming and once you did this you could go ahead and learn C++ if you understood the principles like memory management object-oriented programming compiling and linking you will be able to use this knowledge in any language in my opinion people are lazy they want to get results as fast as possible but this could interfere with creating good code you know I have the feeling that seedless plants forces you in a way to create clean solutions and to care for memory because otherwise your game just won't work it's a bit like that the compiler tells you do it correctly or this thing will crash this could be hard in the beginning but you will learn a lot of stuff in a short time ok the last thing that comes into my mind is the support for C++.
C++ is an old language which has a large community so if you run into problems there are thousands of C++ developers to ask for help for example on Stack Overflow you have the highest answer rate for C++ development and the interest in learning C++ still grows and grows because C++ developers are needed by large companies developing games and other applications for which performance is relevant or that need to be platform independent so this is also something that you could keep in mind when drawing a decision about using a specific game programming language okay guys these were my thoughts and answers to using C++ for game development I really hope you find this useful and if you like my channel then don't forget to subscribe new content will be available soon and perhaps you consider supporting me on my patreon this would really help to keep the quantity and quality of my videos thanks a lot for watching this and I really hope you come back soon.😉