Why do we use SDL with C & C++?

  Рет қаралды 48,879

pikuma

pikuma

Күн бұрын

Пікірлер: 82
@chastitywhiterose
@chastitywhiterose 2 жыл бұрын
I have used Raylib, SDL, Allegro, and SFML in the past. They are all good. However one of the benefits of SDL seems to be the incredible speed at which it compiles and runs. It’s a smaller library and because it contains less, it can be easier to learn and debug. I like SDL for the same reason I like C. The simplicity.
@CykPykMyk
@CykPykMyk 2 жыл бұрын
You saw Raylib and SDL won? What? How? Raylib is the simpliest thing out there, plus it offers the most effortlesly.
@chastitywhiterose
@chastitywhiterose 2 жыл бұрын
@@CykPykMyk I like the minimalism of SDL but I wrote my game in Raylib because it was a lot easier.
@xr.spedtech
@xr.spedtech 2 жыл бұрын
Well said ...
@nickgennady
@nickgennady 2 жыл бұрын
@@CykPykMyk I chose SDL2 over Raylib. Main reason is that its “industry” standard for game dev. Unreal uses it as a base and even game maker. Other engines have also used it as a base. It has more platform support than Raylib such as Nintendo switch. All you need is a Nintendo dev account and you will get access to SDL2 version of Nintendo switch.
@w花b
@w花b 2 жыл бұрын
@@nickgennady that's pretty cool
@PebblesChan
@PebblesChan 3 жыл бұрын
In a nutshell, SDL is essentially a GUI version of stdio.
@pikuma
@pikuma 3 жыл бұрын
Well, there you go! That saves16 minutes of everyone's lives. 😅
@れいく-e6y8i
@れいく-e6y8i 2 жыл бұрын
so maybe when we are making bigger projects we may need more powerful library/SDK like wxWidget, Qt, etc but we always learn stdio before iostream for better understanding of code.
@chastitywhiterose
@chastitywhiterose Жыл бұрын
Yeah basically. It used to be that the only form of output I could rely on was printf statements to see if my code was working. Now I have thousands of pixels in a window to tell me!
@GaryChike
@GaryChike 3 жыл бұрын
I've subscribed to almost all your courses Gustavo. You're an excellent instructor! Keep up the good work! :)
@uanbu6539
@uanbu6539 2 жыл бұрын
This is an excellent video and an abundance of information from my perspective as a beginner C++ programmer. Thank you Gustavo!
@syntaxed2
@syntaxed2 2 жыл бұрын
In short: SDL allows communication with OS through a unified interface that works across platforms - No need to write your app 3 times for windows, linux and mac.
@astrah982
@astrah982 2 жыл бұрын
Well you could use WINE or even if it's a game Proton for Linux and Mac.
@saibalaji4713
@saibalaji4713 3 жыл бұрын
SDL helped me to make homebrew games for Orginal Xbox and Nintendo switch 😄
@pikuma
@pikuma 3 жыл бұрын
There you go!!! ❤
@jarreed0
@jarreed0 2 жыл бұрын
Hey! Any way you could point me in the right direction to learn to do so myself. Thanks!
@Plrang
@Plrang 3 жыл бұрын
I love to have the access to a hardware, that's the most fun for me. I started when that was the only option. Nowadays I have fun with some emulators or retro computers. Although prototyping in JS or C
@noros-troll9607
@noros-troll9607 2 жыл бұрын
Thank you! This is something that’s been confusing to me. I’m more interested in audio than making games, and I was puzzled about why I had to use a graphics/game programming library to code audio. Maybe it will be easier now. Have a good day!
@astrah982
@astrah982 2 жыл бұрын
NAudio is a really good library for audio as well.
@noros-troll9607
@noros-troll9607 2 жыл бұрын
@@astrah982 Cool! Definitely looks interesting.
@samuelazeredoo
@samuelazeredoo Жыл бұрын
Que maravilha achar esse canal! Sou estudante de Ciência da Computação e quero trabalhar como programador para jogos um dia! Great video!
@yessicadanielahernandez6348
@yessicadanielahernandez6348 Жыл бұрын
Buena suerte!!
@TheMathues123
@TheMathues123 Жыл бұрын
​@@yessicadanielahernandez6348brasileños no hablan español... nosotros hablamos p o r tu g u ê s
@Goldy131992
@Goldy131992 Жыл бұрын
pikuma, thank you so much for this explanation! Much appreciated!
@llamasarus1
@llamasarus1 3 жыл бұрын
I've only been marginally productive in C# and the MonoGame framework. And considering how I dont know C++, I dont know why I'm tempted to use SDL. I guess I have no game design ideas, I just want to learn game programming!
@lehisluguer9300
@lehisluguer9300 Ай бұрын
excellent explanation..
@lucabrito6155
@lucabrito6155 2 жыл бұрын
Esse sotaque eu reconheço de longe. Salve, Gustavo!
@pikuma
@pikuma 2 жыл бұрын
Tamo junto! 🇧🇷
@GoFuncYourself
@GoFuncYourself 3 жыл бұрын
Nice clean simple explanation, thanks for that
@astrah982
@astrah982 2 жыл бұрын
SDL2, what is it good for? True Answer: Everything.
@hanelyp1
@hanelyp1 Ай бұрын
Even back when we could directly access hardware from user level software, without an operating system abstraction our software had to know the hardware. CGA, EGA, VGA, or something else for video? What kind of sound hardware?
@visitor_t-w3p
@visitor_t-w3p Жыл бұрын
I subscribed and liked..realy thank you so much.. for clearing m concept
@loudthattrack8974
@loudthattrack8974 2 ай бұрын
thanks for the video, now i want to code games 💫💫💫
@mp-kq3vc
@mp-kq3vc 2 жыл бұрын
Do you have a course that would apply to my desire to create (in C and SDL) a wireframe dungeon crawler similar to Akalabeth? I've never understood to do such a thing when everyone has different screen resolutions. In other attempts, I've done it by line drawing to fixed positions (like on an Apple II). Thanks for reading. Cheers!
@chastitywhiterose
@chastitywhiterose Жыл бұрын
It is possible to get SDL working with msys2 on Windows to have a basic Linux compiling environment within Windows. That’s how I bypassed Visual Studio and could still compile SDL programs.
@mzg147
@mzg147 Жыл бұрын
Isn't wsl2 better than msys2?
@chastitywhiterose
@chastitywhiterose Жыл бұрын
@@mzg147 I haven’t used WSL2 but I read it was for making native Linux programs on Windows. But I’m more interested in making programs that run for regular Windows users who don’t even know what Linux is.
@NonTwinBrothers
@NonTwinBrothers 3 жыл бұрын
Nice channel
@nenelokao
@nenelokao 3 жыл бұрын
You have a Brazilian accent... vc é br ? Sdl ainda vale a pena?
@pikuma
@pikuma 3 жыл бұрын
Opa! Com certeza, BR com orgulho. Sim sim, a maioria dos apps compilados nativos modernos (games também) usam SDL pra comunicação com hardware. Quer cross-plataforma com rapidez, SDL é a melhor escolha na minha opimião. 😉
@nenelokao
@nenelokao 2 жыл бұрын
@@pikuma obrigado amigo...
@1968konrad
@1968konrad 8 ай бұрын
btw, in the 80ies or 90ies pixels or lines were drawn with commands in basic or pascal and not by poking.
@pikuma
@pikuma 8 ай бұрын
These were simply high-level functions that were often implemented in direct assembly. The assembly still has to go and access the display XY values somehow.
@estranhokonsta
@estranhokonsta 5 ай бұрын
Yeah. You could do all of it using a higher language, but if one wanted to do anything more powerfull than a intro program, then one had to use assembly and peek and poke the scrren ram. That is why in the 80 it was common for many people to have assembly as their second programming language. I was one such case.
@martinfinch5011
@martinfinch5011 Жыл бұрын
What's the difference between sdl and libraries like opengl? Is it that opengl only handles graphics and sdl can handle sound graphics input etc?
@pikuma
@pikuma Жыл бұрын
OpenGL is a graphics API that can communicate and abstract the GPU. So, if you want to draw polygons, 3D objects, use shaders, all this using the GPU, then you'll need OpenGL (or Direct3D, or Vulkan, etc.). SDL is smart enough to know if you have a GPU on your machine & OpenGL already installed, and SDL usually can use them behind the scenes for some sruff (like displaying a Window and some 2D graphics). I hope this helps. 😬
@martinfinch5011
@martinfinch5011 Жыл бұрын
@@pikuma thanks :) by the way, do you have your engine course on udemy?
@pikuma
@pikuma Жыл бұрын
@@martinfinch5011 No, unfortunately we don't use Udemy for our coyrses anymore.
@hanelyp1
@hanelyp1 Ай бұрын
Working with OpenG there are still operating system specific details for setup, that SDL will abstract for you.
@City__Walker
@City__Walker 3 ай бұрын
AAA SDL or SFML???
@Lohkat
@Lohkat 3 жыл бұрын
Cool, mas como eu sei que vc é br? 😁
@abrorabyyu6221
@abrorabyyu6221 2 жыл бұрын
because SDL is god tier low level access
@_iguana_
@_iguana_ 3 жыл бұрын
Nice video, brasileiro?
@pikuma
@pikuma 3 жыл бұрын
🇧🇷🇧🇷🇧🇷
@onaecO
@onaecO Жыл бұрын
I love you!
@antoniodosreisfeitosaneto7553
@antoniodosreisfeitosaneto7553 3 жыл бұрын
Your ideas seem to be a bit biased against Windows or Microsoft. As a former Unix dev, I do not see where the Windows Terminal is not as "powerful" as the Unix terminal. Could it be the lack of a package manager? Well, even you said that each Linux distro has a preferred one, probably because tar or cpio were never enough historically. In Windows you can use vcpkg and do the very same thing as you do with brew on MacOS. And be sure you can use the same line tools like make or CMake and keep your courses multi-platform and "modern", even on Windows.
@pikuma
@pikuma 3 жыл бұрын
Oh, don't get me wrong. I actually think Powershell is probably more powerful than bash or even zsh. For example, just the fact that I can import .net libraries and create a .net form via shell is amazing in my opinion. That's powerful! My mention of Windows and its command-line was basically that Windows is not a command-line focused OS. Most of what we do is via UI and I feel that is misleading to beginner programmers. It's nice to force students to touch the filesystem, and Linux is a good example of that.
@antoniodosreisfeitosaneto7553
@antoniodosreisfeitosaneto7553 3 жыл бұрын
@@pikuma :) Well, it is as misleading to beginner programmers at it is for someone that uses a Mac for a life without ever knowing about the existence of a thing like a terminal. The thing about Unix and derivatives is that, when it started life, programmers and non-programmers had the same interface. And it was a terminal. And it could be a tty one, with no fancy screen at all. It is the same for Windows, X-Windows and MacOS: people get "misleaded" by the UI. And can end up thinking that it is all that is. IDE included.
@unknownuser457gll4
@unknownuser457gll4 2 жыл бұрын
Everyone seems to forget thatLinux is pretty lit (especially having only a handful of tasks running), but Windows is used by the majority.
@estranhokonsta
@estranhokonsta 5 ай бұрын
I have not only seen that bias against windows in many people that have worked with it, i myself have been gulty of it. And it is a bias. No doubt. On the other hand, i do feel it is an arbitrary feeling. There is the obvious social status derived of the branding of each platform. But to me, i would that this bias comes, in great part, from the lack of interoperability between windows and linux. Windows wsl is changing that, but it will take many years more. Why linux? One only has to look at where linux is used in so many essential tech position because of it being free and open source.
@thorminator
@thorminator 3 жыл бұрын
Great stuff. Think you need a new microphone though
@pikuma
@pikuma 3 жыл бұрын
Thank you for the feedback Thor. I just replaced my mic last week. Would you be so kind and please check if the audio quality is better in this new video: kzbin.info/www/bejne/Y3bWiH6KbKmirdk
@thorminator
@thorminator 3 жыл бұрын
@@pikuma Definitely a lot better now! :)
@pikuma
@pikuma 3 жыл бұрын
@@thorminator Beautiful. Thanks! I'll try to learn more about video recording and hopefully improve things.
@thorminator
@thorminator 3 жыл бұрын
@@pikuma I think you're doing great! You fixed the main issue I had which was the audio clipping, so I'm very happy :D
@filipesimoes5398
@filipesimoes5398 3 жыл бұрын
Radar de brasileiro pii pii pii
@lookoomas
@lookoomas 2 жыл бұрын
Muti platform ?
@pikuma
@pikuma 2 жыл бұрын
Exactly. Note to self: always review the slides before publishing. :)
@lookoomas
@lookoomas 2 жыл бұрын
@@pikuma it's ok, i am a troll i admit it
@pikuma
@pikuma 2 жыл бұрын
@@lookoomas My people! ❤
@clintonreisig
@clintonreisig 11 ай бұрын
The sound problem of this video is too annoying
@OneMeanDragon
@OneMeanDragon Жыл бұрын
Students have a valid question, why use SDL when you have Direct2D.
@pikuma
@pikuma Жыл бұрын
Most of my students do not use Windows.
@leonardodias3393
@leonardodias3393 Жыл бұрын
Soa meio estranho ver um video em ingles de um brasileiro
@MaxPenelope-w4j
@MaxPenelope-w4j 5 ай бұрын
Martin Angela Wilson Eric Hernandez Karen
@BoMiles
@BoMiles 5 ай бұрын
Great video!! I’m starting to understand 😅😅🫡🫡
Triangle Rasterization
2:17:06
pikuma
Рет қаралды 31 М.
Creating a Game Loop with C & SDL (Tutorial)
1:50:46
pikuma
Рет қаралды 63 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Game Development with SDL 2.0 (Steam Dev Days 2014)
51:11
Steamworks Development
Рет қаралды 230 М.
Tools to make a Game Engine in C++
48:03
pikuma
Рет қаралды 60 М.
Jonathan Blow on Refactoring
7:10
Anton Swifton
Рет қаралды 142 М.
2 Years Of Learning C | Prime Reacts
22:24
ThePrimeTime
Рет қаралды 334 М.
Is SDL3 Ready For Production?
1:37:32
Tsoding Daily
Рет қаралды 40 М.
Writing 2D Games in C using SDL by Thomas Lively
47:32
CS50
Рет қаралды 193 М.
(Neo)Vim Made Me a Better Software Developer
40:27
vim-jp
Рет қаралды 61 М.
RayLib 5 Released - The Easiest C/C++ Game Library Just Got Even Better
10:42
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН