I hope you weren't expecting him to just go full rawdog and program the entire graphics engine via WIN32 lol As a C programmer, there's a reason why I stay on Linux. Unless my livelihood depended on it (e.g.: as a job requirement), I would NOT touch WIN32 with a 10 foot pole.
Da*n! Really nice! Trying to learn C as well, and this helped me a lot! Love that you don't know everything, like a real world scenario! Looking forward to the next ep!
It is very satisfying to watch videos like this, where you don't just have a code ready and then just write it again in another file. Keep it up my friend!! I would just suggest that the facecam could be a slightly smaller or you could position at the bottom-right side of the window. It would be easier to read the code. Really excited for the next videos!! 👾
ahh i am loving this video so far i have watched this video like 5 time idk... every time i learn something new thanks man ... waiting for next episode 😀
I love SDL. It's powerful, yet not imposing. By that I mean: Powerful: You can do so much with it, and it's my goto whenever I'm making either something GUI based or something whose utility doesn't *need* a GUI, but would really benefit from a realtime graphical representation of what's going on in the code. Not Imposing: All of the data types and function names are pretty concise and describe what they're doing really well, to the point where their documentation is just icing on the cake. Their doc game is really strong even under normal standards, but it's exceptional when you take into consideration that SDL is FOSS. (not to dog on other FOSS libraries whose documentation is admittedly either barren (looking at you, XLib), vague, or just plain obtuse)
I enjoy it as well and thinks it's an awesome graphics library for C. Admittedly, I'm a complete C newbie and don't know much, but the bare fact that I am able to navigate around the docs and implement something meaningful with it is already awesome.
Hey man! Love the Video. The problem (IIRC) with your events is that the "typedef struct SDL_QuitEvent { ...} SDL_QuitEvent" is that you're comparing against the type (struct) definition itself, not an instance of it. Like trying to instantiate an abstract class, metaphorically speaking. the .type you're trying to read is just the description of the memory layout of the struct, you need an instance of the struct to actually have some value in memory. Hope this helps!
I am using "ALE" which is a vim plugin. And ALE is able to auto-detect the SDL2 library definitions based on the header in the .c file I think. I haven't configured anything for SDL2 specifically.
how did you manage to put sdl in an include folder without using a ide like visual studio? id really like to switch back to vs code, but it wont let me use sfml because i have it somewhere else on my computer
I simply followed the "Installing SDL" page of the official documentation. It was just an "apt install" command followed by using the compilations flags (shown in the video and in the docs). I have no idea about any IDE specifics
Following your code in macOS - to be exact, hackintosh - sonoma, I created windows and run. but no windows showed up even after SDL_Delay(5000). Any idea ?
@@HirschDaniel just three lines. #include int main() { SDL_InitSubSystem(SDL_INIT_VIDEO); SDL_CreateWiindow("Title",SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,640,480,0); SDL_Delay(5000); return 0; }
Ah yes, SDL2 programming in pure C, keep up the good work!
Thank you, I was looking for a tutorial that clearly explains how sdl works and this is by far the best I've found🙏
From scratch with SDL... Not what I expected when saw that title but it is still impessive enough. Keep going bro!
I hope you weren't expecting him to just go full rawdog and program the entire graphics engine via WIN32 lol As a C programmer, there's a reason why I stay on Linux. Unless my livelihood depended on it (e.g.: as a job requirement), I would NOT touch WIN32 with a 10 foot pole.
Da*n! Really nice! Trying to learn C as well, and this helped me a lot! Love that you don't know everything, like a real world scenario! Looking forward to the next ep!
Good job bro I really love these types of videos because I keep learning so much from them. Keep it up!
It is very satisfying to watch videos like this, where you don't just have a code ready and then just write it again in another file. Keep it up my friend!! I would just suggest that the facecam could be a slightly smaller or you could position at the bottom-right side of the window. It would be easier to read the code. Really excited for the next videos!! 👾
You just motivated me to go back to game dev and do some funny stuff :D
great video!
ahh i am loving this video so far i have watched this video like 5 time idk... every time i learn something new thanks man ... waiting for next episode 😀
Glad you enjoy it so much! Next episode is released on Monday!
amazing video
Nice, I like the idea of playing in SDL with C. At least to code classics games. A lot of tutorials out there are with C++.
Nice to watch something like this
I love SDL. It's powerful, yet not imposing. By that I mean:
Powerful:
You can do so much with it, and it's my goto whenever I'm making either something GUI based or something whose utility doesn't *need* a GUI, but would really benefit from a realtime graphical representation of what's going on in the code.
Not Imposing:
All of the data types and function names are pretty concise and describe what they're doing really well, to the point where their documentation is just icing on the cake. Their doc game is really strong even under normal standards, but it's exceptional when you take into consideration that SDL is FOSS. (not to dog on other FOSS libraries whose documentation is admittedly either barren (looking at you, XLib), vague, or just plain obtuse)
I enjoy it as well and thinks it's an awesome graphics library for C. Admittedly, I'm a complete C newbie and don't know much, but the bare fact that I am able to navigate around the docs and implement something meaningful with it is already awesome.
i found it really interesting, please release part 2 soon
Part 2 is planned to be released on Monday!
Thank you for sharing this!
awesome content! keep going :-)
Hey man! Love the Video. The problem (IIRC) with your events is that the "typedef struct SDL_QuitEvent { ...} SDL_QuitEvent" is that you're comparing against the type (struct) definition itself, not an instance of it. Like trying to instantiate an abstract class, metaphorically speaking. the .type you're trying to read is just the description of the memory layout of the struct, you need an instance of the struct to actually have some value in memory.
Hope this helps!
Hi, thanks! I am comparing the event type to SDL_QUIT, though, which is a Uint32 constant. Or are we looking at different code snippets?
Ah, I got you now. I was comparing to SDL_QuitEvent initially, but fixing it up a couple minutes later.
Part about events was painful to watch :). Overall nice video
haha, there is much more pain to be found in my other videos. This one went comparably smoothly. Thanks!
Thank you!!
Thank you. what LSP for SDL2 are you using ?
I am using "ALE" which is a vim plugin. And ALE is able to auto-detect the SDL2 library definitions based on the header in the .c file I think. I haven't configured anything for SDL2 specifically.
@@HirschDaniel Thank you Daniel
how did you manage to put sdl in an include folder without using a ide like visual studio? id really like to switch back to vs code, but it wont let me use sfml because i have it somewhere else on my computer
I simply followed the "Installing SDL" page of the official documentation. It was just an "apt install" command followed by using the compilations flags (shown in the video and in the docs). I have no idea about any IDE specifics
@@HirschDaniel I see, thank you man :)
Shame this wont work on Silicon Macs, there is an issue linking to SDL, and so far no solution has been accepted, they are still working on it.
Urgh, really? Maybe its possible to workaround that in a virtual linux environment. But yeah, not good.
Why are you using tmate?
Do you mean tmux? Usually I have several panes open simultaneously, just not this time
@HirschDaniel Tmate, and tmux literally has the same gui, so I got confused sorry!
Following your code in macOS - to be exact, hackintosh - sonoma, I created windows and run. but no windows showed up even after SDL_Delay(5000). Any idea ?
Did you include the SDL_Init command at the beginning of the main method?
@@HirschDaniel
just three lines.
#include
int main() {
SDL_InitSubSystem(SDL_INIT_VIDEO);
SDL_CreateWiindow("Title",SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,640,480,0);
SDL_Delay(5000);
return 0;
}
It must be a macOS specific issue. If I run the same code in WSL, it works. Thank you.
@@jinkijung6401 Yes, that's odd. Someone else mentioned to me lately that there are weird issues when using SDL on Mac.
error sound a bit annoying tho :D
I'll need to figure out how to turn that one off, thanks!