🚨🚨 IMPORTANT🚨🚨 The Vim extension is optional and changes how you do text input, if you don't know what it does, please don't use it! Sorry about that. Build Systems in C++ can be annoying to deal with. This Tutorial aims to create an unorthodox, yet simple Build System that can be used on Windows, Linux and Mac at the same time.
Yeah I think so, too. It sucks because the original video was doing great, but it shouldn't be at the expense of the viewer and if they are following along
Excellent tutorial! You've achieved a remarkable balance between providing in-depth coverage of crucial steps for a seamless start and maintaining a brisk pace which allows developers to dive straight into action. As a contributor within the Mac platform community, your work inspires me to crack-on and complete my own contributions, ensuring that developers on any platform, including Mac 😉, can benefit from these tutorials.☺
Wow, surprised that you addressed the issue that quickly, so kudos for that. I don't get your argument, though, because whether you pass libs to clang++ or to your CMake target doesn't really change how it works under the hood. Same with warnings, definitions, etc. The only thing CMake abstracts are just some default flags for the profiles, but you could just specify them yourself. The rest is just boilerplate. Also, CMake will even print out the compiler commands with the arguments when building. The important concepts will be the same. Your old CMake example feels like a strawman, because you are comparing the "single source file with no non-system dependencies" with a "bunch of source files with tons of dependencies and even a package manager". Try to add a package manager to your bash file and see how complex THAT gets.. Also, you don't know what "project" does, but in your bash file pgrep, if -z, and tasklist | grep are clear? You need to learn the commands and syntax for either of them anyway.. I wouldn't care for it, since you just might have very specific preferences. However, you are actually presenting your videos as a tutorial, which means beginners will pick up that non-standard way, which causes more harm than good for them. Kinda how the Cherno spread the silly practice of macros around GL calls. They are now locked into a very specific setup(they can't even use basic Visual Studio with your solution, despite having to install it anyway, which is kinda nuts if you ask me). Also, there are more issues than just the incremental build times, but you only chery-picked one of the drawbacks that I mentioned before.
I have been using just a Makefile to compile my code for the reason being that I don't like the workings and syntax of CMake, so I can understand his stance on not liking CMake. I still think it is strange for him to use a shell script as a build system, but sometimes it is fun to make things from scratch.
7:30 If you don't know how Vim works, dont use the extension. Vim is really hard to learn, but if you do know it, can speed up development. Vim emulation changes VSCode's entire input system, so only install if you know what you are doing. EDIT: just saw ShadowDrakken's comment and that sums it up better.
omfg, don't tell people to install VIM without warning them that it will completely break all the default keyboard shortcuts in Windows. Took me an age to figure out Vim was why copy/paste no longer worked and Vim was causing every other shortcut to do random ass crap. It was also causing cout to have extra non-printing characters at the end, which was f*ing annoying.
Oh, I thought it was obvious that VIM is a different mode to type in, maybe I should have mentioned that. Sorry to hear that is gave you trouble, yeah VIM does change the entire input system
hahaha this is why you always read the youtube comments, I also had to spend some amount of time to figure this out. Glad to see I wasn't the only one hahaha
You don't need an .sh file Just put this on top of your main.cpp: #if 0 clang++ -o game.exe main.cpp ... all the other build arguments ... exit #endif Now your main.cpp can build itself. It's also possible to make it work as a batch script on Windows, just a little more complicated: #if 0 :; clang -o "bin/game" main.cpp ... :; exit cl.exe -Fe"bin/game.exe" main.cpp ... exit #endif In batch script, the colon ":" means a label and all the commands after it are ignored. In Linux shell, the colon ":" is a noop (and also true). You can make this script even more sophisticated with OS and compiler detection, etc.
That's actually very interesting lol. Never seen that. I think the sh file still makes sense as a file to build, like an installation file, really cool that this is possible tho
Goddamn clang gave me about an hour of troubleshoot time and still doesn't recognize the standard libraries. I'll keep using it for its intended purpose: linting, and stick with g++, which actually works as a compiler yes I am on Linux, how could you tell
I’m compiling llvm on my big box machine but in my bedroom my computer is minimally running compiling off mingw without visual studio . I was able to compile the ogl samples but also didn’t install glee yet so modern-tutorials-master can’t compile yet. Mingw uses g++ to compile on windows 10. I’m trying to start making a simple 2D game for windows and android and webgl (maybe) . I worked in Source engine 1 and Amazon lumberyard engine before so I have my heavy setup on my big box computer in garage with visual studio while my bedroom computer is has Android studio also installed with oldest ndk 9r for trying to make older device apps. The idea is to make games also for windows 7 possibly and other 32 but devices like raspberry pi zero arm 32 and windows 7 32 bit. Using notepad++ and command line to compile . Too avoid gradle and vs . Thank you for mentioning in detail about sh.exe this will help me. I’ll see how it goes when I start working on etc1 and kts textures and also net sockets for trying to add some multiplayer with this minimalist setup
You are right about that, but the feedback about the build system is still valid. Nonetheless the build system is decided, in the future I can add CMake for fun to see how it works
cmake is good and bad if not enough knowledge and proper setup. It a lot digging. But for SDL2 it not easy way to set up. But there couple way to do set up by youtubers. Knowing the docs aim for expert for beginner it not easy.
🚨🚨 IMPORTANT🚨🚨 The Vim extension is optional and changes how you do text input, if you don't know what it does, please don't use it! Sorry about that.
Build Systems in C++ can be annoying to deal with. This Tutorial aims to create an unorthodox, yet simple Build System that can be used on Windows, Linux and Mac at the same time.
i love the fact that you're doing these tutorials while actually focusing in doing a game
Thanks bro I appreciate the kind words!
I found gold with this series, I'm new in OpenGL and this series is basically for every level on programming, thank you so much for the series
I'm so lucky to have found this! Just started working on my own engine, and need more tutorials like these. (Still in planning stage)
That's cool, good luck bro
Its a good decision to clarify this stuff.
Yeah I think so, too. It sucks because the original video was doing great, but it shouldn't be at the expense of the viewer and if they are following along
Excellent tutorial! You've achieved a remarkable balance between providing in-depth coverage of crucial steps for a seamless start and maintaining a brisk pace which allows developers to dive straight into action. As a contributor within the Mac platform community, your work inspires me to crack-on and complete my own contributions, ensuring that developers on any platform, including Mac 😉, can benefit from these tutorials.☺
Glad you like the tutorial, would be really cool if we get mac to work too. The final engine is not gonna change much, so take your time.
This is great please continue
Sure sure, working on more
Wow, surprised that you addressed the issue that quickly, so kudos for that.
I don't get your argument, though, because whether you pass libs to clang++ or to your CMake target doesn't really change how it works under the hood. Same with warnings, definitions, etc. The only thing CMake abstracts are just some default flags for the profiles, but you could just specify them yourself. The rest is just boilerplate. Also, CMake will even print out the compiler commands with the arguments when building.
The important concepts will be the same.
Your old CMake example feels like a strawman, because you are comparing the "single source file with no non-system dependencies" with a "bunch of source files with tons of dependencies and even a package manager". Try to add a package manager to your bash file and see how complex THAT gets.. Also, you don't know what "project" does, but in your bash file pgrep, if -z, and tasklist | grep are clear? You need to learn the commands and syntax for either of them anyway..
I wouldn't care for it, since you just might have very specific preferences. However, you are actually presenting your videos as a tutorial, which means beginners will pick up that non-standard way, which causes more harm than good for them. Kinda how the Cherno spread the silly practice of macros around GL calls. They are now locked into a very specific setup(they can't even use basic Visual Studio with your solution, despite having to install it anyway, which is kinda nuts if you ask me). Also, there are more issues than just the incremental build times, but you only chery-picked one of the drawbacks that I mentioned before.
I have been using just a Makefile to compile my code for the reason being that I don't like the workings and syntax of CMake, so I can understand his stance on not liking CMake. I still think it is strange for him to use a shell script as a build system, but sometimes it is fun to make things from scratch.
This feels like an accelerated handmade hero, will follow it for sure! Thanks for doing this
Handmade Hero was a great inspiration for sure, and yeah unfortunately his videos are very long, but also filled with lots of information
7:30 If you don't know how Vim works, dont use the extension. Vim is really hard to learn, but if you do know it, can speed up development. Vim emulation changes VSCode's entire input system, so only install if you know what you are doing.
EDIT: just saw ShadowDrakken's comment and that sums it up better.
Yeah I should have talked about that in the video, thanks for the feedback
omfg, don't tell people to install VIM without warning them that it will completely break all the default keyboard shortcuts in Windows. Took me an age to figure out Vim was why copy/paste no longer worked and Vim was causing every other shortcut to do random ass crap. It was also causing cout to have extra non-printing characters at the end, which was f*ing annoying.
Oh, I thought it was obvious that VIM is a different mode to type in, maybe I should have mentioned that. Sorry to hear that is gave you trouble, yeah VIM does change the entire input system
hahaha this is why you always read the youtube comments, I also had to spend some amount of time to figure this out. Glad to see I wasn't the only one hahaha
You don't need an .sh file
Just put this on top of your main.cpp:
#if 0
clang++ -o game.exe main.cpp ... all the other build arguments ...
exit
#endif
Now your main.cpp can build itself.
It's also possible to make it work as a batch script on Windows, just a little more complicated:
#if 0
:; clang -o "bin/game" main.cpp ...
:; exit
cl.exe -Fe"bin/game.exe" main.cpp ...
exit
#endif
In batch script, the colon ":" means a label and all the commands after it are ignored.
In Linux shell, the colon ":" is a noop (and also true).
You can make this script even more sophisticated with OS and compiler detection, etc.
That's actually very interesting lol. Never seen that. I think the sh file still makes sense as a file to build, like an installation file, really cool that this is possible tho
This is actually genius, although as soon as you have multiple files things might get a bit dicey
What? I don't understand
@@bluesillybeard #include "other_file.c"
@@GillesLouisReneDeleuze Oh yeah, unity builds exist lol
Goddamn clang gave me about an hour of troubleshoot time and still doesn't recognize the standard libraries.
I'll keep using it for its intended purpose: linting, and stick with g++, which actually works as a compiler
yes I am on Linux, how could you tell
What was the perform with clang? Did you use the wrong version?
I’m compiling llvm on my big box machine but in my bedroom my computer is minimally running compiling off mingw without visual studio . I was able to compile the ogl samples but also didn’t install glee yet so modern-tutorials-master can’t compile yet. Mingw uses g++ to compile on windows 10. I’m trying to start making a simple 2D game for windows and android and webgl (maybe) . I worked in Source engine 1 and Amazon lumberyard engine before so I have my heavy setup on my big box computer in garage with visual studio while my bedroom computer is has Android studio also installed with oldest ndk 9r for trying to make older device apps. The idea is to make games also for windows 7 possibly and other 32 but devices like raspberry pi zero arm 32 and windows 7 32 bit. Using notepad++ and command line to compile . Too avoid gradle and vs . Thank you for mentioning in detail about sh.exe this will help me. I’ll see how it goes when I start working on etc1 and kts textures and also net sockets for trying to add some multiplayer with this minimalist setup
cmake -G "MinGW Makefiles" -S . -B . -DCMAKE_INSTALL_PREFIX=C:\mingw64\x86_64-w64-mingw32
mingw32-make all
mingw32-make install
i think using a script instead of CMake is a good and clean approach we want to learn how to make a games with c++, not how CMake works
You are right about that, but the feedback about the build system is still valid. Nonetheless the build system is decided, in the future I can add CMake for fun to see how it works
👍
Glad you like it bro
lol. I'll just stick with premake
Can you make one build system with Zig
I suppose we can do that in the future when the tutorial is finished, like an addition for fun. Same with CMake and then add that as an option
zig has its own build system.
cmake is good and bad if not enough knowledge and proper setup. It a lot digging. But for SDL2 it not easy way to set up. But there couple way to do set up by youtubers. Knowing the docs aim for expert for beginner it not easy.