Creating a Game Loop with C & SDL (Tutorial)

  Рет қаралды 49,701

pikuma

pikuma

Күн бұрын

This video is a beginner-friendly introduction on how to create a game loop using C & SDL.
We'll start by discussing how to install SDL on Linux, macOS, and Windows, and we'll then proceed to create a very simple C application that uses SDL to control game objects.
We'll briefly discuss how to create an SDL window, render simple objects on the screen, cap our framerate, and achieve framerate-independent movement.
Download the source code:
github.com/gustavopezzi/sdl-g...
Chapters:
00:00:00 Introduction
00:07:28 C & the SDL Library
00:09:37 Installing SDL on Linux
00:11:33 Installing SDL on macOS
00:12:26 Installing SDL on Windows
00:27:44 Starting our code
00:33:12 Using a Makefile
00:37:08 Including SDL in our C code
00:43:17 Creating an SDL window
00:58:59 Handling Process Input
01:04:53 Adding SDL Linker Flags
01:09:11 Drawing a filled rectangle with SDL
01:19:49 Capping our Framerate
01:32:37 Moving game objects as a function of delta-time
01:40:05 Using SDL_Delay
01:47:37 Deciding not to cap our framerate
01:49:26 Conclusion & next steps
As always, this is just the initial conversation about a potentially complex topic. For a more detailed overview of fixing our time step, Glenn Fiedler's blog post is a mandatory read:
gafferongames.com/post/fix_yo...
For comprehensive courses on computer science, retro programming, and mathematics, visit: www.pikuma.com.
Also, don't forget to subscribe to receive updates and news about new lectures and tutorials:
/ @pikuma
Enjoy!

Пікірлер: 134
@pavelnezamayev
@pavelnezamayev Жыл бұрын
This is very well explained. And the code is beautiful. I love the simplicity of C. Thanks a lot, Gustavo!
@lusca_182
@lusca_182 8 ай бұрын
Amazing video! Thanks for sharing your knowledge here. I learned about capping and delta time in the past but the concepts never consolidated in my mind, now I really understand. Thanks again.
@demon_hunter9547
@demon_hunter9547 Жыл бұрын
This was a rather nice introduction to SDL, thanks for making this !!!!!
@cybergizmo6902
@cybergizmo6902 9 ай бұрын
Thank you. I am writing an emulator for the first time in C with SDL and this was a very useful resource!
@gordonmccrary6279
@gordonmccrary6279 9 ай бұрын
this is one of the best channels on youtube for gamedev. thanks for your content!
@BryanChance
@BryanChance 9 ай бұрын
What a great class! Great explanation of important points in game development concepts.
@alpha001
@alpha001 Жыл бұрын
Pretty well explained tutorial, Keep going! Helped me a lot to solve some problems i've been having during my journey on learning about SDL-based game dev :)
@ChrisMabryTV
@ChrisMabryTV Жыл бұрын
Fantastic video. You are a great teacher - I look forward to doing your 2d game engine course soon!
@hapboyman
@hapboyman 5 ай бұрын
Many thanks, Gustavo. I studied a lot from this very brief explanation.
@SirenSeph
@SirenSeph 15 күн бұрын
truly the best sdl explanation i have seen clear and concise thx very much!
@rodrick2312
@rodrick2312 8 ай бұрын
The best explanation so far, thanks for this content!
@ulysses_grant
@ulysses_grant Жыл бұрын
I'm saving money to enroll in the 3D Computer Graphics Programming course. I love your videos!
@jayaganthan1
@jayaganthan1 Жыл бұрын
Great explanation! Thanks for making this video.
@oytun3074
@oytun3074 4 ай бұрын
this has helped me a LOT thanks for the lecture!
@jyuart
@jyuart 9 ай бұрын
Just what I needed. Thank you very much
@dhoncrisley
@dhoncrisley 3 ай бұрын
O sotaque não nega, esse cara é BR
@pikuma
@pikuma 3 ай бұрын
Óbvio! 😅
@AnkitSinghKushwah
@AnkitSinghKushwah 6 ай бұрын
Thanks Gustavo. You are always so helpful man
@dhruvasambhoo3496
@dhruvasambhoo3496 27 күн бұрын
Thanks a lot, you saved me a lot of time and effort!, GREAT EXPLANATION!, and so far the best video that really helped me on this topic!
@specialx9856
@specialx9856 10 ай бұрын
Very helpful, thanks for the video👏.
@Exotic69420
@Exotic69420 2 ай бұрын
Haven't touched C before. Only some bare C++. I loved this eitheray and learned a lot.
@PolarisMyWay
@PolarisMyWay Жыл бұрын
Well done! Thank you!
@ductive
@ductive 4 ай бұрын
Great lecture, thanks
@peterjansen4826
@peterjansen4826 Ай бұрын
On Arch anyone who has a general gaming-setup has SDL2 too (used by many games) and the name of the package is sdl2 so people can figure that out. :)
@gameprogramming6550
@gameprogramming6550 10 ай бұрын
Great Content. Love it
@mecaniac9605
@mecaniac9605 Ай бұрын
cara como eu gostaria de que vc fosse meu professor, estou fazendo um curso seu de assembly de atari 2600 e achei este video por acaso, mt obg por disponibilizar esse material ❤!! dica: se puder ponha legendas em pt-br em alguns cursos da udemy issuo ajudaria mt a acelerar alguns topicos (a pesar do seu ingles ser otimo e mt compreensivel)
@eugenevladoff2758
@eugenevladoff2758 4 ай бұрын
This will now be my favorite video. And of course, I subscribed and liked)
@a.v7998
@a.v7998 4 ай бұрын
Damm! this was awesome! learned soo much from this video! look forward to follow along ;)
@spowrei
@spowrei 8 ай бұрын
great video it really helped me
@chill8873
@chill8873 6 ай бұрын
Very good video!
@weitnow
@weitnow 10 ай бұрын
Great video😊
@fabianrr
@fabianrr Жыл бұрын
Que bueno que lo subiste aca 👏
@kwameopareasiedu
@kwameopareasiedu Жыл бұрын
I created a relatively simple game without an engine using Electron (Typescript) which ended up around 200mb. Feedback was the game consumed too much resources (I actually expected this from an Electron app running at 60fps on the Chromium browser). Ive started learning C and will port the project over to C and SDL. I think I can do way way better. Thanks for this amazing guide... ❤
@maxraj4280
@maxraj4280 7 ай бұрын
Really nice tutorial it almost made me cry that his channel only has 14k subs :(
@HypesReactive
@HypesReactive 10 ай бұрын
great video!
@abbasio
@abbasio 7 ай бұрын
This is a fantastic video, thank you! Great introduction to lower level game programming. For anyone like me who might have had issues with the window loading initially - I'm working on Linux (Fedora 39), and when I tried to run the game at 1:07:39 it ran with no errors, but no window appeared. Apparently for some platforms, the window won't appear if you don't have anything to render - continuing with the tutorial and changing the render color made the window show up once I hit the 1:14:00 mark
@alnaif3241
@alnaif3241 7 ай бұрын
I'm also fedora 39 user everything worked perfectly but my window is not centered though I've written the same code. Would you please tell me whether your window was centered?
@abbasio
@abbasio 7 ай бұрын
@@alnaif3241 My window was also not centered - but I wasn't too bothered by that, so I didn't look into it. My assumption is that there's just some difference in how the origin is calculated in SDL vs how it visually appears in Fedora, so you could probably just play around with the parameters there manually until it looks centered.
@alnaif3241
@alnaif3241 7 ай бұрын
@@abbasio I came to know that the window positioning doesn't work on wayland... So I used Xorg and it worked perfectly.
@jasonboyd782
@jasonboyd782 Жыл бұрын
Hi Gustavo. I appreciate all your content and your book on graphics programming is great. I took a couple days to figure out, earlier this year, how to get SDL running on my Macbook. Contrary to what you say in this video, gcc/clang was not pre-installed, I had to install Xcode and do xcode-select install to get "command line tools" including clang. Beyond that, I installed homebrew and SDL (homebrew is also not pre-installed), and it took a while to figure out how to get a project in Visual Studio Code to know where the SDL headers and library files were. Finally, because VSCode for some reason was very buggy when trying to run my code in the debugger -- it would typically take a few minutes to start up and another few minutes to respond to each step over, I switched to XCode, where selecting the include and library files was another hurdle. I don't know why such things are not well documented somewhere (like SDL's site). It would be good if you could include such things. It was nowhere near as simple as one line of using homebrew to install. I'm also curious as I'm learning C and C++, why do we need both .lib files and .dll files on Windows, and what are the equivalent on OSX and Linux? I'm wondering how one bundles up their application for distribution. My understanding is for Windows you would just need to include the .dll file(s) alongside your app? But I'm not sure for Mac and Linux. Any help is welcome.
@pikuma
@pikuma Жыл бұрын
I think I recorded that from what I did on my old Intel-based MacBook. I recently tried an M2 MacBook Pro and I had to install the Xcode command-line tools, yes! Also, with SDL now the easiest way of setting the compiler and linker flags is by using: `sdl2-config --libs --cflags` in your gcc/clang build command. Windows .DLLs are usually .SO (shared objects) files on Linux. This is actually a pretty big thing and I'd rather leave a link here to explain it: stackoverflow.com/questions/9688200/difference-between-shared-objects-so-static-libraries-a-and-dlls-so Even if we don't manually copy the .DLLs on Linux or MacOS, the correct equivalent .so and .dylib files are there in the OS and were installed by the apt or brew package manager.
@s1lkysl1m83
@s1lkysl1m83 6 ай бұрын
the documentation included with the SDL download from the site has all of the installation and configuration information included
@detroit1988
@detroit1988 6 ай бұрын
Thanks for your tutorial. I get a fluid game (at 60 hz) like love2d when I put SDL_RENDERER_PRESENTVSYNC option (see my fork of your Github project). In this way it is like love2d : automatically sync. I have notices the SDL 3 wich is an improvement with for example stream sound.
@DougLopes
@DougLopes 11 ай бұрын
Além da ótima didática, é exatamente o que eu tava procurando GameDev em C puro, porque escrever código sem orientação a objetos é bem difícil de entender depois de estar acostumado.
@pikuma
@pikuma 9 ай бұрын
That's great to hear. Gustavo usually uses C in his lectures.
@simardeepsinghmudhar7065
@simardeepsinghmudhar7065 3 ай бұрын
Fantastic Tutorial
@amund8821
@amund8821 5 ай бұрын
Wanted to switch from using pygame and I know pygame uses SDL so I decided to try this out. Have to say I like this way of doing this a lot better.
@shaikshakur
@shaikshakur 7 ай бұрын
Best coding video ever
@paulooliveiracastro
@paulooliveiracastro Жыл бұрын
I wouldn't agree with the argument used when picking 24fps. We certainly can perceive less fps as smooth movement (Zelda ran at 20fps on n64). And we can certainly perceive high fps (just see how many people complain when their games are running under 30fps on newer consoles)
@pikuma
@pikuma Жыл бұрын
Oh, I agree! What I meant to say is that ~24 fps (used by films) is about the lowest FPS that the human eye can perceive as animation (instead of frame by frame images). I remember playing Daytona USA back in the day, and the high FPS value was clearly visible! It was different than previous ~30 FPS games we were used to play.
@paulooliveiracastro
@paulooliveiracastro Жыл бұрын
​@@pikuma what I mean is that even lower FPS can be perceived as animation. The game "The Legend of Zelda: Ocarina of Time" on the Nintendo 64 (and many other games on that platform) ran at just 20fps. Was it great? No way! 30 fps is actually much much smoother. But we still perceive that as animation and not as a series of photos.
@pikuma
@pikuma Жыл бұрын
Yeah. I guess you're right. There were games in the past that ran even lower FPS numbers than that and they were still fun. Maybe the 24 FPS is mostly a soft value for the claim. Here's what HP said about it. www.hp.com/us-en/shop/tech-takes/what-is-frame-rate#:~:text=At%20a%20minimum%2C%2024%20fps,and%20viewing%20experience%20will%20be. It's not an academic journal, but I've seen the number 24 more than once in this claim. Still, not really something to sweat too much over.
@idc2120
@idc2120 Жыл бұрын
I've often seen that substepping is used along with delta time, as a solution to get around some issues where the processing time between frames is large. For example, moving a object with delta time during a lag spike could cause the object to pass through collision that is smaller than the position delta. There are ways around this particular issue such as ray casting, but I just wanted to ask about how this substepping might be introduced in your example.
@nelbr
@nelbr 7 ай бұрын
Loved your video. Just subscribed and will definitely check you book. Thanks for sharing.
@happygofishing
@happygofishing 8 ай бұрын
Amazing video, I've always found game engines to be too high level, I keep loosing motivation to learn godot/unity etc, I want to see the raw functions, the render loop, whats really going on etc.
@adamhafchadi4924
@adamhafchadi4924 3 ай бұрын
greate video greate explnation! how can i avoid using all the global var that you have used? usally global var are bed practice , myby bulding a struct?
@user-gh4lv2ub2j
@user-gh4lv2ub2j Ай бұрын
Hurray! C rules!
@heyheyheyhoev419
@heyheyheyhoev419 Жыл бұрын
20:01 Maybe it's stupid question, but is there any way to skip the all "VC++ Directories" and etc. stuff in VStudio in interface? It's too confusing even if you have done this many times, it's always difficult to manage right parameters without errors. Only way I remember is to generate project files with CMake(GUI for example)
@mesmodev
@mesmodev 5 ай бұрын
Hey Gustavo! Loved this course (I saw it back on Udemy)! Could you please tell me how do you record your terminal? I want to achieve a similar style in my videos. Do you record with OBS?
@caracal3892
@caracal3892 5 ай бұрын
I have followed the tutorial up to 1:14. I am using vs2022 for c++ and SDL2.30, named the main.c main.cpp and everything compiles without errors. However the screen is black. The program reacts to closing with escape. The console output reports no errors. Not entirely sure where the issue is. All functions appear to work as intended, input reacts to the correct key, the window isUsing SDL 2.30the correct size. Just that it is all black.
@erzei
@erzei 10 ай бұрын
just for anyone having the "error LNK2019: unresolved external symbol SDL_Init referenced in function main", instead of using x86 on the linker I used the x64 libs and the code works as shown on the video
@brecoldyls
@brecoldyls 8 ай бұрын
Thank you for the video. I have a question. At 1:45:55, why do we need the right hand side of the logical and expression in the if statement condition? Won't time_to_wait always be less than or equal to FRAME_TARGET_TIME? Or is this to handle integer underflow?
@FxWitch
@FxWitch 7 ай бұрын
Did you figured out the answer? I think he added that to only sleep if the game updates slightly faster than the target frame just to sync with fps. Idk.
@momenttomoment1007
@momenttomoment1007 Жыл бұрын
Hey my fellow bassist, could you do a quick video on Raylib with C?
@Metrix2024
@Metrix2024 4 ай бұрын
I was trying to find the doc to see what each function do and the arguments they take but I am just the ask 1.2 versions docs and the only other thing I saw is how to migrate from 1.2 to 2
@alnaif3241
@alnaif3241 7 ай бұрын
I'm on Fedora 39, the problem is my window is not centered though I've written the same code. Will anyone please help me?
@DogeOfWar
@DogeOfWar 2 ай бұрын
Why is it not considered redundant effort by WIndows MSVC projects to have to manually add the lib to BOTH the library directories AND the linker? what is the reason for it not being able to deduce the linkage based on the included libs?
@adampassaretti9149
@adampassaretti9149 9 ай бұрын
Great video, can i ask you how to use the process monitor you used?
@pikuma
@pikuma 9 ай бұрын
Hi there. Gustavo used "htop" for that particular example.
@costelinha1867
@costelinha1867 10 ай бұрын
Você é Brasileiro, Gustavo? Por que se sim, primeiramente, seu Ingles é MUITO BOM! E segundo, acho que esse é o primeiro tutorial de desenvolvimento de jogos em C que eu já vi que n foi postado a mais de 3000 séculos atrás. O que é bom, já que eu tive que usar C num curso que eu fiz alguns meses atrás, mas desde então n consegui achar nenhum motivo pra usar essa linguagem em expecifico. (O que é uma pena, já que eu até que gostava de usar C no curso.)
@pikuma
@pikuma 9 ай бұрын
Hi. Yes, Gustavo is Brazilian. 🙂
@zrIywcN8XJdHaY13K3tx
@zrIywcN8XJdHaY13K3tx 7 ай бұрын
Notei o sotaque dele de br também
@joaobarreto3671
@joaobarreto3671 6 ай бұрын
@@pikuma Wow that's so nice to hear! knowing we have someone with so much knowledge out there to represent us, is a big motivation to the studies
@GameDevBoss
@GameDevBoss Ай бұрын
Gustavo eu tb volto a esse video de tempos em tempos. Hoje eu desenvolvo em SDL por influência sua
@viylouu
@viylouu 9 ай бұрын
i still get the linker issue after adding the linker stuff in im at 24:29
@dishtroyer142
@dishtroyer142 7 ай бұрын
1:32:57 best part of the video
@eugenevladoff2758
@eugenevladoff2758 3 ай бұрын
Hello, Gustavo! Is it possible in SDL2 to find out when the SDL_RendererPresent() function finished working if the SDL_RENDERER_PRESENTVSYNC flag is turned on? Then I could start a new rendering of the back buffer. And I could accurately calculate FPS.
@eugenevladoff2758
@eugenevladoff2758 3 ай бұрын
I tried to measure the FPS and it turned out that in this case no delays are needed. It looks like the render itself adds delays of up to 60 fps. The CPU load is minimal.
@nskeip
@nskeip 8 ай бұрын
I got a question about "unlimited" FPS. What happens if we have a very-very small delta time, such that multiplying a "x-speed" of a ball by its value we get something close to 0? Seems like it would be converted to int value (as we can not have 0.01 px), and it will be 0. Does it mean that on a very fast computer the ball will not move at all? UPDATE: just realized that the GameObject's x and y are floats
@FxWitch
@FxWitch 7 ай бұрын
But then those float will be typecasted to int for rect, so still 0? how?
@jamessouza6927
@jamessouza6927 Жыл бұрын
👏👏👏👏👏👏👏👏👏👏👏👏
@thomasnguyen1150
@thomasnguyen1150 6 ай бұрын
What’s the font you use?
@radshahmaddaiyan1633
@radshahmaddaiyan1633 5 ай бұрын
why after running "The application was unable to start correctly " is showing?
@VI-VI228
@VI-VI228 6 ай бұрын
Gustavo, I've got a question about a "C++ 2D game engine developer programming" course in your site. Should I buy it if I'm already familiar with Java programming language(syntax, OOP, multithreading), if I worked with VERY little android apps, and haven't ever touch C++? Or I should learn C++ for first?
@pikuma
@pikuma 6 ай бұрын
Hi there. All you really need is *some* experience with programming, and if you're familiar with OOP even better. I believe you'll have no problems following along. :)
@mactheknifeguinness
@mactheknifeguinness Жыл бұрын
Great series. Do you have a book?
@pikuma
@pikuma Жыл бұрын
No, unfortunately no. Only lectures. 😶
@mactheknifeguinness
@mactheknifeguinness Жыл бұрын
@@pikuma well its great to find you. I have a great interest in the didactics of mathematics and gameification and programming. I am also in the uk. I might get the 3D course seems like right what i have been looking for. So far your videos are perfect and the direction of this channel excellent.
@pikuma
@pikuma Жыл бұрын
@@mactheknifeguinness Great to meet you. Let me know if you need any help or want to discuss ideas. 🙂
@mactheknifeguinness
@mactheknifeguinness Жыл бұрын
@@pikuma very nice to meet you too. I look forward to everything.
@owdoogames
@owdoogames 10 ай бұрын
This is great, thank you Gustavo. But I'm just wondering why you went with C++ with SDL for your 2D game engine course instead of C? I'm a hobbyist wanting to get 'back to basics' after 4 years of jumping from game engine to game engine and not feeling satisfied, but I've found C++ too complex when I've looked at it in the past. I've been learning C and really appreciate and enjoy its simplicity.
@kseo-u
@kseo-u Жыл бұрын
Was this previously not uploaded? Just having a deja vu moment that I've seen it before.. Unless its on the site
@pikuma
@pikuma Жыл бұрын
Good eye. I'm in the process of removing all the free courses from our website to improve the quality of people enrolling. This was an old lecture that was free on the school website that is now being uploaded to KZfaq. 🙂
@kseo-u
@kseo-u Жыл бұрын
@@pikuma Sounds like a valid and reasonable plan!
@SABaruj
@SABaruj 10 ай бұрын
currently there are like 15 versions of SDL on windows and i dont know wich one to install, im asking everywhere and i dont know, i just need one that works and thats it, my system is 64 bits windows 10 but im aiming to do a game that can be launched even on 32 bits machines.
@pikuma
@pikuma 10 ай бұрын
If you're using Visual Studio, what you want is the dowload option that contains "devel-VC" in its name. This one comes with the development files (header files, .libs, .dlls) that work well with Visual Studio. Visit the SDL homepage, click the "Releases" link, and scroll down to find the "devel-VC" one. Here's a direct link to the page: github.com/libsdl-org/SDL/releases/tag/release-2.28.4
@pikuma
@pikuma 10 ай бұрын
This file also contains two folders, one with the library files for x86, and another folder for x64.
@SABaruj
@SABaruj 10 ай бұрын
@@pikuma thanks, its on the "lib" folder, i will keep going with my proyect.
@tempyreuz9469
@tempyreuz9469 5 ай бұрын
Hey Gustavo, I was just wondering if you're currently working on any new courses or videos? Your twitter page seems to have been deleted.
@pikuma
@pikuma 5 ай бұрын
We are the handle @pikuma on Twitter. And yes, full-force working on a new course.
@minhan4444
@minhan4444 Жыл бұрын
Can you give me name of C font in video, please ?
@pikuma
@pikuma Жыл бұрын
Code Page 437
@minhan4444
@minhan4444 Жыл бұрын
@@pikuma thanks :3
@2dapoint424
@2dapoint424 Жыл бұрын
Can you do a game tutorial using Raylib?
@pikuma
@pikuma Жыл бұрын
I'll probably focus my efforts on new courses at the school first, but I'll see if I can squeeze something small using Raylib here on KZfaq in the future. 👍
@2dapoint424
@2dapoint424 Жыл бұрын
@@pikuma thank you :)
@grenadier4702
@grenadier4702 9 ай бұрын
What font do you use?
@pikuma
@pikuma 9 ай бұрын
Code page 437
@tullman3craggs102
@tullman3craggs102 2 ай бұрын
feel when now its github download link, and theres no lib folder
@RegenerationOfficial
@RegenerationOfficial Жыл бұрын
Explains what he doesn't want to do like foreshadowing
@tsukamigames
@tsukamigames Жыл бұрын
tu é br né?
@pikuma
@pikuma Жыл бұрын
Sim.
@FrankBudino
@FrankBudino 19 күн бұрын
bro yappin
@pikuma
@pikuma 18 күн бұрын
I was not aware of what that meant in English. "Yapping" means to talk a lot in a very annoying way." I guess it all checks out. 😅
@FrankBudino
@FrankBudino 18 күн бұрын
@@pikuma It's kind of a zoomer phrase nowdays, just a joke. Appreciate the SDL2 tutorial very much, as there are virtually no pure C tutorials around and most use C++. It is much easier to build a 2D engine using just C.
@hobbit125
@hobbit125 2 ай бұрын
Creating a Game Loop in an extremely old version of C & SDL.
@rexoverwatch
@rexoverwatch Жыл бұрын
i need a very simple 15v15 first person shooter game made for me, do you know of any programmers willing to take on small projects? thank you
@patrickjaeger9714
@patrickjaeger9714 12 күн бұрын
why is main() returning FALSE?
@pikuma
@pikuma 11 күн бұрын
GOod question. So, a C executable might be called by the operating system or other application, and some of these applications or OS would expect a return from your C program. This return is basically an "error code". In our case, since everything ran perfectly and there were no errors, our return error is 0. If there was some issues mid-program, we might also return something else. But in this simple example, return 0 at the end is enough. Some modern versions of the C language also allow programmers to return the constant EXIT_SUCCESS, which is exactly the same as return 0.
@designordu159
@designordu159 2 ай бұрын
install on linux: quite easy. install on mac: hmmm! easy too install on windows: incantations n magic spells, windows need true love kiss to work
@clintonreisig
@clintonreisig 5 ай бұрын
What is wrong with the sound?
@pikuma
@pikuma 5 ай бұрын
Probably the old mic I had when I started to record these videos years ago. Hopefully the newer videos are a bit better.
@jvega1793
@jvega1793 Жыл бұрын
Promo>SM 👉
@pikuma
@pikuma Жыл бұрын
Sorry, I don't understand what that means. 😔
@Oaifee
@Oaifee Жыл бұрын
Você é Brasileiro não é?
@pikuma
@pikuma Жыл бұрын
Sim. 🙂🇧🇷
@kalekold
@kalekold Жыл бұрын
Jesus, use a proper font!
@pikuma
@pikuma Жыл бұрын
Sorry, I don't understand what that means.
@kalekold
@kalekold Жыл бұрын
@@pikuma That doesn't surprise me.
@paulooliveiracastro
@paulooliveiracastro Жыл бұрын
Wtf? This font is great. Please keep that
@c3vette47
@c3vette47 Жыл бұрын
my makefile build command gives me 'build' is up to date. It doesn't build. Yet if I enter gcc -Wall -std=c99 ./src/*.c -o game directly in the terminal I get a build. I can then make run and make clean and the Makefile executes as it should. Can you help me out please?
@TheBitProgress
@TheBitProgress Жыл бұрын
You can use... #linux timeval timeout; timeout.tv_sec = 0; timeout.tv_usec = ms * 1000; select_(0,NULL,NULL,NULL,@timeout); #windows WaitForSingleObject(event_, ms); ...instead of delay. I think you will get higher precision.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 700 М.
Game Development with SDL 2.0 (Steam Dev Days 2014)
51:11
Steamworks Development
Рет қаралды 226 М.
Schoolboy - Часть 2
00:12
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 4,9 МЛН
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 104 МЛН
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 21 МЛН
Making a Game With C++ and SDL2
5:34
Goodgis
Рет қаралды 602 М.
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 242 М.
How 2D Game Collision Works (Separating Axis Theorem)
7:29
Getting The Game Loop Right
8:27
Vittorio Romeo
Рет қаралды 29 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 294 М.
Voxel Space (Comanche Terrain Rendering)
2:43:36
pikuma
Рет қаралды 25 М.
RayLib 5 Released - The Easiest C/C++ Game Library Just Got Even Better
10:42
Making a Game With C++ and SDL2
8:14
PolyMars
Рет қаралды 1,7 МЛН
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 1 МЛН
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 1,8 МЛН