Low-level stuff is very worth learning even if you're not planing to go full hardcore. I'm making my own drawing software in OpenGL and there is a lot of stuff is straight up easier/faster by using seemingly more cumbersome approaches. For example: implementing zoom is very tricky as zoom levels like 33.3% that doesn't translate well to pixel coordinates. But if you use NDC coordinates, you can easily calculate relative coordinate of mouse and yeet the data at GPU without worries Bit mask is also worth learning. Making improvised hex viewer taught me how to make my own encoders/decoders which is very useful to save raw data without having to rewrite entire logic on every change Memory saving fanaticism can be easily solved byoutputting size of struct via sizeof() and converting it to mb/kb. Turns out that even raw 1080p RGBA picture isn't that intimidating to keep in memory after seeing it's actual size
6:50 This part about global variables comes with a few caveats. The stack can overflow when doing that because the compiler might create temporary objects during initialization. If any of your structs are bigger than the stack size, you will have to break them up in order to avoid this.
idk what to say, the initialization happens at the start of the program so it's like the stack is empty, bit I don't think that usesthe stavk at all, also the stack is not that small like what are you putting in those structures to be that big 😂😂
@@lowlevelgamedev9330 Yeah, I had a few localvars lying around that were consuming stack space, lots of it. And I had a struct which was also pretty big. I managed to fix it by making more stuff global.
@@lowlevelgamedev9330 Bro yt is deleting comments. I tried to respond like 3 times. I had a few local variables that I forgot about lol. I fixed that and now my game works.
I'm not going to lie, I've been stuck on the multiplayer aspect of my game for at least two months. I've spent four years developing two games using C++ and SFML. For my third game, I decided to make it a 4-player co-op, but I hit a wall with the multiplayer component. I feel lost and unsure about the best approach to take for the game. I do have a plan to return to the project gradually. I don’t intend to give up on it, but it’s been hard to stay motivated. Cheers! Great video, btw!
7:53 I have to disagree here. It's weird of you to assume that your viewers only code for other PCs. Your type of content is very appealing to people who want to code on weak machines in general (what with you channel named low level game dev). Psp for example only has 32(64)mb of RAM, PS1 have only 2mb.
the target audience for this video is beginners, because like half of my audience is there, I know because I made a pool to ask, so not at the point where they do ps1 games. Buf if you are at the point that's a different story but I'm sure you know what you need to do to optimize your memory there 💪
I think global variables are demonized in excess. You can also declare them static, but for example I usually have my top systems like the render system as a global variable but I don't have any way to acces it outside that file without passing it explicitly. It is like a singleton in a way and I think there are perfectly ok. I wouldn't however use globabl variables for small things and acces them from other files, that's when they become problematic. Otherwise if that global variable is local to that file it is like having a variable in a class, it is just accesible from multiple methods
@@lowlevelgamedev9330 I agree that static vars are far better than global vars and indeed have their uses. FYI, if you want to be "more C++", prefer using "anonymous namespaces" instead of the "static" keyword to limit the visibility of the var/function/class to that specific file.
Loved the video man. Could you do a video on macros? In larger cpp projects (games includes) you tend to see a lot of #define and I keep getting confuised because in my head #define is a constant. What the heck is #define STATIC_ASSERT(0) supposed to do?💔 I don't thikn I'm even remembering the expression right. A.I fumbled the explanations so its a no go
that's not a bad idea, I will 100% consider it, that static assert (0) is probably there to do nothing or be a normal assert depending on how the defines are configured. I havea video on asserts if you want to look 💪
Too low/high level -> IMO, this is closely connected to how much of a code architect/engineer one is vs a simple code monkey. This only comes with experience.
Learning C++ dev thus far has been very daunting, and gratifying in equal parts. I do really like the whole multi paradigm bit, in combo with the static typing. Am excited to get to the point where I can really flesh out a complex game. Currently relegated to simple programs as I learn more SDL. I am devoting several hours a day though. Shouldn't be too long to make some headway.
@@lowlevelgamedev9330 Id rather stick to smaller projects to start, games that will take a few days, and will re-enforce my problem solving and architecture. I have ideas for grander projects. I just need to learn collision implementations and a few other things first in the guides I am working through. At my current pace I should be through my learning material in 14 days. From there yeah, it's gonna be straight building, until I eventually take the leap into OpenGL, and graphics programming. I gotta cram a bunch of primer math stuff first though. I did not go to college.
yes I would recomand visual studio and I don't have much experience with vs code to make a video so if you want you can ask me stuff on discord about it and tag me
Reading about multiplayer: 😄
Implementing multiplayer: 💀
fr 😂😂😂
couldn't get more real
@@lowlevelgamedev9330 bro needed 2 comments 💀
Me and my homies always prefer the stack 😅
fr
Bro made this video in between sets.
if you know you know 😎💪
@@lowlevelgamedev9330 💪
Low-level stuff is very worth learning even if you're not planing to go full hardcore. I'm making my own drawing software in OpenGL and there is a lot of stuff is straight up easier/faster by using seemingly more cumbersome approaches.
For example: implementing zoom is very tricky as zoom levels like 33.3% that doesn't translate well to pixel coordinates. But if you use NDC coordinates, you can easily calculate relative coordinate of mouse and yeet the data at GPU without worries
Bit mask is also worth learning. Making improvised hex viewer taught me how to make my own encoders/decoders which is very useful to save raw data without having to rewrite entire logic on every change
Memory saving fanaticism can be easily solved byoutputting size of struct via sizeof() and converting it to mb/kb. Turns out that even raw 1080p RGBA picture isn't that intimidating to keep in memory after seeing it's actual size
6:50 This part about global variables comes with a few caveats. The stack can overflow when doing that because the compiler might create temporary objects during initialization. If any of your structs are bigger than the stack size, you will have to break them up in order to avoid this.
idk what to say, the initialization happens at the start of the program so it's like the stack is empty, bit I don't think that usesthe stavk at all, also the stack is not that small like what are you putting in those structures to be that big 😂😂
@@lowlevelgamedev9330 Yeah, I had a few localvars lying around that were consuming stack space, lots of it. And I had a struct which was also pretty big. I managed to fix it by making more stuff global.
@@lowlevelgamedev9330 Yeah. I just had a few local vars that were eating up my stack space. I made them global and that fixed it.
@@lowlevelgamedev9330 Bro yt is deleting comments. I tried to respond like 3 times. I had a few local variables that I forgot about lol. I fixed that and now my game works.
@@lowlevelgamedev9330 RUclips is feeling like deleting my comments today. I literally can't respond.
I'm not going to lie, I've been stuck on the multiplayer aspect of my game for at least two months.
I've spent four years developing two games using C++ and SFML. For my third game, I decided to make it a 4-player co-op, but I hit a wall with the multiplayer component. I feel lost and unsure about the best approach to take for the game.
I do have a plan to return to the project gradually. I don’t intend to give up on it, but it’s been hard to stay motivated.
Cheers! Great video, btw!
yo I actually have a video about multi player and I think you can find it helfull 💪💪 + resources on my discord server
The highest level thing i do is memcpy and malloc
I might be in the do too many projects category, I've only looked at a couple of dsa and cherry picked the ones I saw as the most useful
7:53
I have to disagree here. It's weird of you to assume that your viewers only code for other PCs. Your type of content is very appealing to people who want to code on weak machines in general (what with you channel named low level game dev). Psp for example only has 32(64)mb of RAM, PS1 have only 2mb.
the target audience for this video is beginners, because like half of my audience is there, I know because I made a pool to ask, so not at the point where they do ps1 games. Buf if you are at the point that's a different story but I'm sure you know what you need to do to optimize your memory there 💪
Fair, great video, btw
07:00 did you just argue for global variables? lol I believe that belongs to the "too low level" axis.
I think global variables are demonized in excess. You can also declare them static, but for example I usually have my top systems like the render system as a global variable but I don't have any way to acces it outside that file without passing it explicitly. It is like a singleton in a way and I think there are perfectly ok. I wouldn't however use globabl variables for small things and acces them from other files, that's when they become problematic. Otherwise if that global variable is local to that file it is like having a variable in a class, it is just accesible from multiple methods
@@lowlevelgamedev9330 I agree that static vars are far better than global vars and indeed have their uses. FYI, if you want to be "more C++", prefer using "anonymous namespaces" instead of the "static" keyword to limit the visibility of the var/function/class to that specific file.
Loved the video man. Could you do a video on macros? In larger cpp projects (games includes) you tend to see a lot of #define and I keep getting confuised because in my head #define is a constant. What the heck is #define STATIC_ASSERT(0) supposed to do?💔 I don't thikn I'm even remembering the expression right. A.I fumbled the explanations so its a no go
that's not a bad idea, I will 100% consider it, that static assert (0) is probably there to do nothing or be a normal assert depending on how the defines are configured. I havea video on asserts if you want to look 💪
@@lowlevelgamedev9330 I'll rewatch it for sure. Didnt have my note book with me when I watched last time
Too low/high level -> IMO, this is closely connected to how much of a code architect/engineer one is vs a simple code monkey. This only comes with experience.
yes, that's very true, but I hope I can help people get to that experience faster 💪
Learning C++ dev thus far has been very daunting, and gratifying in equal parts. I do really like the whole multi paradigm bit, in combo with the static typing.
Am excited to get to the point where I can really flesh out a complex game. Currently relegated to simple programs as I learn more SDL. I am devoting several hours a day though. Shouldn't be too long to make some headway.
yo you should just start making a game, I totally think you are ready 💪💪
@@lowlevelgamedev9330 Id rather stick to smaller projects to start, games that will take a few days, and will re-enforce my problem solving and architecture.
I have ideas for grander projects. I just need to learn collision implementations and a few other things first in the guides I am working through. At my current pace I should be through my learning material in 14 days.
From there yeah, it's gonna be straight building, until I eventually take the leap into OpenGL, and graphics programming. I gotta cram a bunch of primer math stuff first though. I did not go to college.
Based
please make a video on vs code c++ game dev. i am too much frustated , please help man
just use visual studio bro, thank me later
yes I would recomand visual studio and I don't have much experience with vs code to make a video so if you want you can ask me stuff on discord about it and tag me
The only thing keeping me stuck is depression and the fact I'll be homeless, even anti-depressants don't help :/
what happens when u finish a project, how do u get people to care
oh yeah that's hard 😂 I show it on youtube for example and some people use X or reddit
please can you maek playing html
for web please
maek minecraft clone for web HTml please