I wanted to learn how to make game engine for a long time now. Today youtube recommended me your video "Why you SHOULD build your own GAME ENGINE" and now I see this video which was uploaded yesterday.
Quick and simple. I'll be following the series with interest, so keep up the good work. Your setup and development environment is reminiscent of Casey Muratori's style, which isn't necessarily a bad thing.
Loving these videos. Will be coming back to rewatch them, while making my own little engine+game. Please continue making them! BTW, you have a new subscriber.
Really love the tutorial series, you don't go indepth into pointless things like how to download files from the internet, like most tutorials I see You actually state the prerequisites AND continue to acknowledge that said person would already know how the prerequisites during the tutorial Awesome content, subscribed
Ah, finally the project gets to the light of day. :) Your game looks and sounds pretty cool. As I am on Linux, I am still why wondering why Windows folks bother with copying DLLs manually. I have seen it so many times by now. But besides that I think it will teach people a lot about how to get started with game and game engine programming in C. Ah, C my eternal programming language love
@@DylanFalconer I am thinking of a script perhaps but this is just my Linux being trying to make sense of that. It's not like I know a solution. I just see so many people doing this, so I assume there at least not too man obvious solutions to that issue. But if you hear of something I would gladly hear it.
copying dll by far is the most safe practice..sure windows folks can build from source as well but why bother when there are risk all those header propagation and dependency hell..
3:27 how to set up the MinGW's gcc compiler into this .bat file, if I do not want to install Visual Studio Build Tools? I've solved this issue, no libs now but it works in general. set files=src\main.c gcc -Wall ./%files% -o game
After your three Zig tutorial videos, I would have half-expected you to do this in Zig, but I guess maybe it's wise to wait for it to hit 1.0 so I don't blame you. But I like C anyway so it's good either way.
I was going to rewrite in in Zig and Vulkan and then make that instead but I already put the work into this and I think it can be valuable. Plus I need to work on my own game project too
Looks like a great series...only one small problem, i can't tell what folders your putting the downloaded lib's into. i tried pausing the video but still can't tell.
I wish I knew how to do this myself, I would make a very good game. I want to make a game that has fighting, and crafting, similare to rune scape, except. You can kill enemies and combine their body to weapons, this way you have infninte scaling that anyone can do. So basically all armor, weapon and player scaling goes up by the amount of uprading you do, but it also goes up by a certain amount every single time you upgrade. So level 1 is one upgrade, 2 is 2, 3 is 3, so on and so forth for the amount of resources you need. So at a certain point, you will be willing to pay for upgrades once there starts to be a competative community that has a bunch of players who played for a long time, and have high upgrade levels. then I want the game to have a modifier for every time you get to max character level. So every time you max out, now your stats go up by 1, so eventually it will be quick to upgrade stats, but that too should constantly become a steeper grind. I want there to be a combat system similare to devil may cry, but a bit more like tekken. So you get a punch and kick button, then you get a powers button. You get to change something siilare to stances, except it changes what you do. Example: You get mobility,powers,defence, and 2nd weapon. If you change to mobility, your power button lets you dash, super speed, etc. Whatever your mobility abilities are set to. Powers will change your power button. So you can have it set for what ever ability you want, but only one at a time. Then your defence will let you block with your power button, and other defence moves like lets say throwing down a shield, or barrier, etc. Then your 2nd weapon selection will let you do powers with ranged weapons, or a 2nd weapon if you decide to duel weild, or switch to duel wielded weapons. But if I could design game stuff, I would make a 2d version of this game, I would make a 3d version, and an isometric version of this game. I would want transformations, and the ability to destroy a world, tons of different things in the game.
It sounds like your are bursting with ideas, I suggest trying to distil them into a focused idea, explore that idea to it's conclusion. If you are more interested in game design and your game doesn't have special technical requirements then look into using a 3rd-party engine like Unity, Unreal, etc. That is unless you are very interested in programming, then rolling your own is fun (and time consuming).
@@DylanFalconer My computer doesn't do unreal engine n stuff very well. So I started trying to learn programming, because when I try to do stuff like roblox, and unreal, you need to learn some coding to make the games anyway, and I don't always have internet. So I looked up how to do coding until I found out about html this year. I wana try to make simple platform games with all of that kind of stuff put into it first. That would be the 2d version. My current ideas are to have a motorcycle you can get off of, and fight. And the other idea is a 1000 round game, that once you get to the end, you unlock a city. And that's when crafting gear, and all that other stuff comes into play. The idea for the 2nd one is to be a very hard 2d fighting game where the pvp is only for people who beat the 1000 rounds, and build their city that generates income, and resources. Then you can go back through the 1000 rounds any time you want for extra items that those enemies drop, and to expand the city to about 2x, or 4x its size as a limit. The city would have a character driven story. So about 5 to 10 npc that have a story revolving around each other, and you can kill of the npcs to shorten their story, or change it. But completing their story would unlock them as someone you can get to build a thing, or follow you to fights, depending on what each one of the 10 npcs do in the city. So not killing any of them will help you more than killing them, or letting them kill each other.
Hi I need Help. so i downloaded the SDL2 repo project, but the lib folder is messing, do i need to build the project first or i am doing something wrong. I didn't even start and i am facing problems. thanks
Great! We need something like this. Last couple of days, I was thinking C++ is just too complicated. People say you can only use a subset of C++, but that does not cut it when even the standard library uses things like `std::cout
I share your hate for header files! Part of why I'm trying out Zig. I think C will suffice for many projects without the extra features, but I guess we'll "C"!
I tried, C for game development starts nice, cool, but does not last for long. Memory management hell, no standard library, no templates/generics, multiple flavors of C, lack of CG libraries. C++ without OOP is what I've settled to.
@@utkua Yeah, I think that is a very meaningful choice. The best route to take is probably dividing the application to two layers: huge amount of immutable instances of a `struct` and a single mutable instance of a `class`, which holds those using containers. Deciding to go full C disables the usage of `namespace`s, `template`s etc. a big loss as you said.
@@cemgecgel4284 What you describe is close to an entity component system, that I also tried, in fact I compiled systems into a dll, and hot reloaded changes, I described game as data, implemented systems that project that state into graphics API, allocated necessary resources and adapt if changes happened on game entities. Then I decided to say fuck it and moved to developing a game using C++, focus on cross compilation and portability instead of game engine, write python plugins for Blender instead of wasting time developing my own editor... Story of game engine development, you never reach the end but journey worth it.
@@utkua The journey is more important than the destination I would say as well. The thing is, I have the idea of writing an engine that loads the game and additionally mods for that game as dynamic libraries too. I do not have any experience on loading dynamic libraries on any platform; thus, I think this journey will teach me a lot. But this time I'm trying to stay away from feature creep as much as possible. Hopefully I will get something done.
Dear Dylan, Thanks for the tutorial. There's something weird with your subst (substitute) drive command. "A drive letter mapped with the subst command does not persist between startups. I do something similar by running a batch file on startup to do the substitution. You can place it in the users startup folder. C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" After you set it up, if you shut down your computer, the entire drive will be wiped. I hope this helps. Thank you.
Thanks Igor. Unfortunately I don't remember exactly what my setup was - though it was not WSL (too many read/write permission issues between Linux/Windows + we are using the M$ compiler and linker CL). I believe I just used git-bash in WezTerm or Alacritty.
-Can someone help me I'm at 6;50 and I get this error when I run the code "No GL driver has been loaded"- edit: nvm fixed it. I just put a 0 instead of SDL_WINDOW_OPENGL for the window flags when creating the window.
Alright, so it's been almost a year since I commented this, and I just wanted to say that the fact that it's easier to set stuff up by writing to the renderer's pixel buffer (indirectly, using a texture and an array) than it is to set up opengl is certainly something.
Wait, I found out the problem, the equivalent download was named "SDL2-devel-2.28.2-mingw.zip" I totally overlooked the "devel" part of the link there...
How did you achieve autocompletion on (Neo)vim using the cl.exe compiler? I've been looking for a few days but I always get to a dead end because I need to create a json compilation database in order to use the ccls or clangd LSPs.
In this video I'm using Kakoune rather than Vim/Neovim, but in the future I use Neovim and my config is available on GitHub. github.com/Falconerd/nvim Apologies for the late response.
Thanks so much for theses videos ! I only have an issue, while i m using a laptop i then have two graphic cards, a performant one and one for the basic programs and windows display. I want to specify the program to start with my powerful graphic card, how can i specify this ?
Can you use python to make a game engine IDE with C compiler to complie your python code? I am currently making a game engine in python with C/C++ game dev library but I am using the python version of the C/C++ game dev library like imgui, jolt physics engine, ogre graphics rendering engine, vulkan, bullet physics engine and other C/C++ library and I am using pygame pyglet for 2D and 3D game framework for the game engine. The game engine will be for simple 2D and complex 3D games.
Can you make beginner one? Like quickly explaining what is variable/pointer/etc is and showing this in action, or other way, using something and explaining what is it and why/when we use it? It will be best C++ course ever
I have one question. I am using neovim to follow your course and the builtin lsp I use is clangd but because of that, I have lots of errors because the lsp cannot find the header files even though the code compiles and runs perfectly. I noticed that you are also using neovim(assumption) so how did you manage to get around the problem.
@@DylanFalconer yeah I did the same. My solution was to use a dummy cmake and build in wsl then mv the json file to root. What is your solution? I just want to learn if there is a more efficient way to do this.
Alacritty has a windows build that you can download. I was using WSL and Kakoune with it but have since switched to WezTerm + Neovim - both Windows builds.
@@DylanFalconer Why dont you use them over windows terminal? I use window's native Neovim too when I'm on windows. Edit: forgot to ask, why would you recommend using msvc isntead of mingw?
@@miguelborges7913 I just don't like windows terminal, it feel sluggish to me. As for the reason to use msvc, I have found when using mingw that I have a false sense of security when writing platform specific code. In the past I have had bugs come from the cross-compilation process because I was using POSIX style C and cross-compiling for Windows. It was probably user error, but since then I just compile with msvc on Windows and GCC on Linux and everything is fine.
I'm sorry for the late response, did you find a solution to this? It's a common issue with SDL2 overriding WinMain. You should be able to find a few solutions just on the SDL2 Wiki.
If you check out the github repo, I added a Makefile in the more recent commits as I was running on Debian myself. You'll need to install some dependencies like libsdl2-dev. I can't remember everything off the top of my head, but when you run make it'll tell you what symbols are missing.
Excuse me, I didnt see that it wasn''t supposed to be included, Im getting this error when trying to build in cmd: c1: fatal error C1083: Cannot open source file: 'src\main.c': No such file or directory Im very confused, was I supposed to get this file from somewhere? I didn't see you place it in there in the montage.
This tutorial is not helpful at all. I need the links, nothing i'm getting is the same. all i want is to setup sdl and a simple text renderer that's IT why can't it be that simple omfg
I agree, the setup stage for these projects can be frustrating. The links have changed since a few years ago. Is there a specific reason want to use SDL for your text renderer?
@@DylanFalconer tbh I js want a text renderer, whatever works. Also the reason I want to use Sdl is because I'm challenging myself to make a 3d raycaster
Gotcha, in that case have you considered something like Raylib? It's pretty flexible, you can still write shaders but it has a bunch of built in functionality (including text rendering)
You just need the DLLs in your main project directory, libraries (.lib) wherever you want (will specify in the build script), and header files also wherever you want (usually some include directory, I use C:\Work\include now)
2:30 thats why I absolute 100% dislike C etc. It is just a langage spec and has no standard tooling = no packagemanager = no dependency management. Not even standard compiler and unit testing etc. That's the 1980 way still done in 2022. I can anybody new to coding only recommend to go directly to like any other compiling language with better tooling like Golang, C# (dotnet core or what ever they call it now), or Rust. C/C++ produces legacy code out of the box if you are not a kernel or driver developer or coding for MCUs. May no problem with deploy and forget software like games where you never will update any dependencies or need CD, in short you don't care about maintanance, but for any other group of coders this tech is obsolete. And if you do all this because you love C/c++ for what ever reason, just give at least some tooling like Conan a chance and don't copy dependencies all over the system and check them into your VCS. Especially never ever binaries. oO
My career is in web development and the last thing I want is for game programming to end up anything like that. Having a package manager only makes things easier in some cases. I and my colleagues have spent many hours fixing dependency, build, tooling issues in that space. Adding more complexity doesn't automatically make things easier for the programmer. Your first complaint about there being no dependency management is counteracted by your second paragraph in which you state that games "... never will update any dependencies or need CD". This is, in fact, a game programming project in which we won't be updating the dependencies. As for checking binaries into VCS, I'd say that really depends on your situation. In my case I'm working alone and I find it easier to just have the dlls in the project. If there's a security concern when working at a company with a team, that's a different matter. I haven't tried Conan, I may give it a review at some point, thanks for the tip!
hey i need some help, at the last step after coppying the code int the while(!should_quit) loop i get the error: "unresolved external symbol SDL_POllEvent referenced in function main mygame.exe : fatal error LNK1120: 1 unresolved externals" even though i have included SDL.h. anyone still active here and able to help me out i would hate to get stuck on the first episode (again TT)
If you keep making same quality videos throughout the serie, this will be an epic classic tutorial milestone in the history of UA-cam 💖
I wanted to learn how to make game engine for a long time now. Today youtube recommended me your video "Why you SHOULD build your own GAME ENGINE" and now I see this video which was uploaded yesterday.
Quick and simple. I'll be following the series with interest, so keep up the good work. Your setup and development environment is reminiscent of Casey Muratori's style, which isn't necessarily a bad thing.
Loving these videos. Will be coming back to rewatch them, while making my own little engine+game. Please continue making them! BTW, you have a new subscriber.
Amazing! I'll be sure to share this series with my friends
Yes!! I can't wait to watch this after work
Hope you enjoy!
Really love the tutorial series, you don't go indepth into pointless things like how to download files from the internet, like most tutorials I see
You actually state the prerequisites AND continue to acknowledge that said person would already know how the prerequisites during the tutorial
Awesome content, subscribed
This is the first tutorial that I actually had to SLOW DOWN and not speed up lol
looking forward to this series, very interesting project
Ah, finally the project gets to the light of day. :)
Your game looks and sounds pretty cool.
As I am on Linux, I am still why wondering why Windows folks bother with copying DLLs manually. I have seen it so many times by now.
But besides that I think it will teach people a lot about how to get started with game and game engine programming in C.
Ah, C my eternal programming language love
What's the alternative to copying DLLs manually? I'm not that experienced with Windows dev tbh.
@@DylanFalconer I am thinking of a script perhaps but this is just my Linux being trying to make sense of that. It's not like I know a solution. I just see so many people doing this, so I assume there at least not too man obvious solutions to that issue.
But if you hear of something I would gladly hear it.
@@DylanFalconer vcpkg on windows seems to be a c/c++ dependency manager, but i haven't personally used it, so i can't really tell how good it is
copying dll by far is the most safe practice..sure windows folks can build from source as well but why bother when there are risk all those header propagation and dependency hell..
This is amazing, and I love your code editor setup
WoW! WoW!
What am I looking at?
This
...
Is
....
AWESOME!!!!!
😍😍😍
Absolute quality, thanks for upping! What text editor are you using here?
Thank you! I'm using Kakoune
not sure why you thought the 4x speed multiplier was needed for the setup. Just makes our lives harder
Thanks the incredible project!
3:27 how to set up the MinGW's gcc compiler into this .bat file, if I do not want to install Visual Studio Build Tools?
I've solved this issue, no libs now but it works in general.
set files=src\main.c
gcc -Wall ./%files% -o game
nice tutorial! the flickering white boxes while you type are quite distracting, hopefully that's fixed in the next episode, gonna keep watching.
Thank you - I do change editors in the future, sorry about that
After your three Zig tutorial videos, I would have half-expected you to do this in Zig, but I guess maybe it's wise to wait for it to hit 1.0 so I don't blame you.
But I like C anyway so it's good either way.
I was going to rewrite in in Zig and Vulkan and then make that instead but I already put the work into this and I think it can be valuable. Plus I need to work on my own game project too
Looks like a great series...only one small problem, i can't tell what folders your putting the downloaded lib's into. i tried pausing the video but still can't tell.
same
Wow this stuff is gold
Thanks!
I wish I knew how to do this myself, I would make a very good game.
I want to make a game that has fighting, and crafting, similare to rune scape, except. You can kill enemies and combine their body to weapons, this way you have infninte scaling that anyone can do. So basically all armor, weapon and player scaling goes up by the amount of uprading you do, but it also goes up by a certain amount every single time you upgrade. So level 1 is one upgrade, 2 is 2, 3 is 3, so on and so forth for the amount of resources you need. So at a certain point, you will be willing to pay for upgrades once there starts to be a competative community that has a bunch of players who played for a long time, and have high upgrade levels. then I want the game to have a modifier for every time you get to max character level. So every time you max out, now your stats go up by 1, so eventually it will be quick to upgrade stats, but that too should constantly become a steeper grind.
I want there to be a combat system similare to devil may cry, but a bit more like tekken. So you get a punch and kick button, then you get a powers button. You get to change something siilare to stances, except it changes what you do. Example: You get mobility,powers,defence, and 2nd weapon. If you change to mobility, your power button lets you dash, super speed, etc. Whatever your mobility abilities are set to. Powers will change your power button. So you can have it set for what ever ability you want, but only one at a time. Then your defence will let you block with your power button, and other defence moves like lets say throwing down a shield, or barrier, etc. Then your 2nd weapon selection will let you do powers with ranged weapons, or a 2nd weapon if you decide to duel weild, or switch to duel wielded weapons.
But if I could design game stuff, I would make a 2d version of this game, I would make a 3d version, and an isometric version of this game. I would want transformations, and the ability to destroy a world, tons of different things in the game.
It sounds like your are bursting with ideas, I suggest trying to distil them into a focused idea, explore that idea to it's conclusion.
If you are more interested in game design and your game doesn't have special technical requirements then look into using a 3rd-party engine like Unity, Unreal, etc.
That is unless you are very interested in programming, then rolling your own is fun (and time consuming).
@@DylanFalconer My computer doesn't do unreal engine n stuff very well. So I started trying to learn programming, because when I try to do stuff like roblox, and unreal, you need to learn some coding to make the games anyway, and I don't always have internet.
So I looked up how to do coding until I found out about html this year. I wana try to make simple platform games with all of that kind of stuff put into it first. That would be the 2d version. My current ideas are to have a motorcycle you can get off of, and fight. And the other idea is a 1000 round game, that once you get to the end, you unlock a city. And
that's when crafting gear, and all that other stuff comes into play. The idea for the 2nd one is to be a very hard 2d fighting game where the pvp is only for people who beat the 1000 rounds, and build their city that generates income, and resources. Then you can go back through the 1000 rounds any time you want for extra items that those enemies drop, and to expand the city to about 2x, or 4x its size as a limit. The city would have a character driven story. So about 5 to 10 npc that have a story revolving around each other, and you can kill of the npcs to shorten their story, or change it.
But completing their story would unlock them as someone you can get to build a thing, or follow you to fights, depending on what each one of the 10 npcs do in the city. So not killing any of them will help you more than killing them, or letting them kill each other.
Nice Super Crate Box clone!
It's a nice game to clone for sure
Hi I need Help.
so i downloaded the SDL2 repo project, but the lib folder is messing, do i need to build the project first or i am doing something wrong.
I didn't even start and i am facing problems.
thanks
Thanks so much
You're welcome!
Great! We need something like this.
Last couple of days, I was thinking C++ is just too complicated. People say you can only use a subset of C++, but that does not cut it when even the standard library uses things like `std::cout
I share your hate for header files! Part of why I'm trying out Zig. I think C will suffice for many projects without the extra features, but I guess we'll "C"!
I tried, C for game development starts nice, cool, but does not last for long. Memory management hell, no standard library, no templates/generics, multiple flavors of C, lack of CG libraries. C++ without OOP is what I've settled to.
@@utkua Yeah, I think that is a very meaningful choice.
The best route to take is probably dividing the application to two layers: huge amount of immutable instances of a `struct` and a single mutable instance of a `class`, which holds those using containers.
Deciding to go full C disables the usage of `namespace`s, `template`s etc. a big loss as you said.
@@cemgecgel4284 What you describe is close to an entity component system, that I also tried, in fact I compiled systems into a dll, and hot reloaded changes, I described game as data, implemented systems that project that state into graphics API, allocated necessary resources and adapt if changes happened on game entities. Then I decided to say fuck it and moved to developing a game using C++, focus on cross compilation and portability instead of game engine, write python plugins for Blender instead of wasting time developing my own editor... Story of game engine development, you never reach the end but journey worth it.
@@utkua The journey is more important than the destination I would say as well.
The thing is, I have the idea of writing an engine that loads the game and additionally mods for that game as dynamic libraries too.
I do not have any experience on loading dynamic libraries on any platform; thus, I think this journey will teach me a lot.
But this time I'm trying to stay away from feature creep as much as possible. Hopefully I will get something done.
Dear Dylan,
Thanks for the tutorial.
There's something weird with your subst (substitute) drive command.
"A drive letter mapped with the subst command does not persist between startups. I do something similar by running a batch file on startup to do the substitution. You can place it in the users startup folder. C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
After you set it up, if you shut down your computer, the entire drive will be wiped.
I hope this helps.
Thank you.
where can i download the c++ compiler ?
Programming is amazing
It's so great
No.
when i do the "build && mygame" it says 'CL' is not recognized as an internal or external command,
operable program or batch file. Have any idea why?
Hello there, excellent video! How do you set up alacritty with tmux on windows? Are you using wsl?
Thanks Igor. Unfortunately I don't remember exactly what my setup was - though it was not WSL (too many read/write permission issues between Linux/Windows + we are using the M$ compiler and linker CL). I believe I just used git-bash in WezTerm or Alacritty.
-Can someone help me I'm at 6;50 and I get this error when I run the code "No GL driver has been loaded"-
edit: nvm fixed it. I just put a 0 instead of SDL_WINDOW_OPENGL for the window flags when creating the window.
Sorry I took a long time between reading comments, glad you got it worked out.
Alright, so it's been almost a year since I commented this, and I just wanted to say that the fact that it's easier to set stuff up by writing to the renderer's pixel buffer (indirectly, using a texture and an array) than it is to set up opengl is certainly something.
glad.obj : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
does anyone know how to fix?
hey man your github repo doesnt have the state of the project in this episode, the link directs to the rec branch which was updated a few months ago
You should be able to access old branches from the dropdown menu or just check the history on rec for when each ep is merged in.
@@DylanFalconer at the time of posting that comment, the branch for ep1 was nowhere to be found
Help. I can't find any of the .lib files in any of the SDL downloads. How do I get the development library equivalent on their new github setup?
Wait, I found out the problem, the equivalent download was named "SDL2-devel-2.28.2-mingw.zip" I totally overlooked the "devel" part of the link there...
Based
How did you achieve autocompletion on (Neo)vim using the cl.exe compiler? I've been looking for a few days but I always get to a dead end because I need to create a json compilation database in order to use the ccls or clangd LSPs.
In this video I'm using Kakoune rather than Vim/Neovim, but in the future I use Neovim and my config is available on GitHub. github.com/Falconerd/nvim
Apologies for the late response.
Thanks so much for theses videos ! I only have an issue, while i m using a laptop i then have two graphic cards, a performant one and one for the basic programs and windows display. I want to specify the program to start with my powerful graphic card, how can i specify this ?
Can you use python to make a game engine IDE with C compiler to complie your python code? I am currently making a game engine in python with C/C++ game dev library but I am using the python version of the C/C++ game dev library like imgui, jolt physics engine, ogre graphics rendering engine, vulkan, bullet physics engine and other C/C++ library and I am using pygame pyglet for 2D and 3D game framework for the game engine. The game engine will be for simple 2D and complex 3D games.
Breitenberg Expressway
May I know what's the Code Editor/IDE you are using ?
Hi there, in this video I'm using Kakoune - but later on switch to Neovim.
The wall tiles look like floor tiles, so it's very confusing. I thought it was a top down game until I see the characters jumping and falling.
Can you make beginner one? Like quickly explaining what is variable/pointer/etc is and showing this in action, or other way, using something and explaining what is it and why/when we use it? It will be best C++ course ever
Here is much more C++ stuff than C. I still prefer C, and here is less tutorials about game engines in C.
I only just started learning C++ recently for competitive programming - in this series we use C. Apologies for the late reply.
I have one question. I am using neovim to follow your course and the builtin lsp I use is clangd but because of that, I have lots of errors because the lsp cannot find the header files even though the code compiles and runs perfectly. I noticed that you are also using neovim(assumption) so how did you manage to get around the problem.
Sorry for the late reply - I added a compile_flags.txt file to the root directory!
What is your compiler bro? I think clangd only work in LLVIM
@@DylanFalconer yeah I did the same. My solution was to use a dummy cmake and build in wsl then mv the json file to root. What is your solution? I just want to learn if there is a more efficient way to do this.
@@Schwartz866 I don't think I understand your sentence. My compiler is gcc but that should not be a problem as clangd works fine.
i didnt understand how you crated scripts what program is that ?
What theme are u use
does this work with mac?
So you have recommended videos pop up while still coding. Is there way to disable them on my side for myself when they pop up?
Oh, I should have realised that would happen. Thanks for letting me know. Unsure how/if you can change it but I'll change it on my end.
At 3:07, how do we turn on the Build Script?
On Windows you can run a .bat file by opening up cmd in the directory and typing the name of the script "build.bat" and hitting enter
Awesome, but you lost me with windows...
I add a Makefile for linux later on. If you are a linux user then I'm sure you can easily convert the batch file, they are pretty similar!
why mine doesn't have lib. Please respone
I need more information
@@DylanFalconer On freetype 2.12.1 downloaded from savannah there is no .lib or .dll files.
How are you using alacritty on windows? Is it running through WSL?
Alacritty has a windows build that you can download. I was using WSL and Kakoune with it but have since switched to WezTerm + Neovim - both Windows builds.
@@DylanFalconer Why dont you use them over windows terminal? I use window's native Neovim too when I'm on windows.
Edit: forgot to ask, why would you recommend using msvc isntead of mingw?
@@miguelborges7913 I just don't like windows terminal, it feel sluggish to me. As for the reason to use msvc, I have found when using mingw that I have a false sense of security when writing platform specific code. In the past I have had bugs come from the cross-compilation process because I was using POSIX style C and cross-compiling for Windows. It was probably user error, but since then I just compile with msvc on Windows and GCC on Linux and everything is fine.
When I compile I get this error
LINK : fatal error LNK1561: entry point must be defined
I'm sorry for the late response, did you find a solution to this? It's a common issue with SDL2 overriding WinMain. You should be able to find a few solutions just on the SDL2 Wiki.
I am using Ubuntu, can I do these on ubuntu?
Absolutely, you'll just need to install the required libraries through the package manager. I am running on debian later in the series
How can i set this up in debian linux?
If you check out the github repo, I added a Makefile in the more recent commits as I was running on Debian myself. You'll need to install some dependencies like libsdl2-dev. I can't remember everything off the top of my head, but when you run make it'll tell you what symbols are missing.
Thanks for the reply man, I appreciate it
@@DylanFalconer when I run make it gives me this message Could not init SDL: No available video device even though I installed all the dependencies
glad download didnt have a main.c file in source
Excuse me, I didnt see that it wasn''t supposed to be included, Im getting this error when trying to build in cmd:
c1: fatal error C1083: Cannot open source file: 'src\main.c': No such file or directory
Im very confused, was I supposed to get this file from somewhere? I didn't see you place it in there in the montage.
You are going to make the main.c in your src folder, it is your program's entry point
LINK : fatal error LNK1561: entry point must be defined
did you ever fix this?
@@rustic_void nope
Can you make a better tutorial on how to set SLD2 up? You went way too fast and I coulden't tell what you where doing.
Thomas Margaret Williams Jennifer Jackson Patricia
Man please, don't drop this series please
literally countn't keep track. had the video on the slowest setting and even that was too fast.
This tutorial is not helpful at all.
I need the links, nothing i'm getting is the same.
all i want is to setup sdl and a simple text renderer that's IT why can't it be that simple omfg
I agree, the setup stage for these projects can be frustrating.
The links have changed since a few years ago.
Is there a specific reason want to use SDL for your text renderer?
@@DylanFalconer tbh I js want a text renderer, whatever works.
Also the reason I want to use Sdl is because I'm challenging myself to make a 3d raycaster
@@DylanFalconer oh by the way it WAS helpful, i was just upset with all the errors i got. Its just that I'm struggling and idk what to do
Gotcha, in that case have you considered something like Raylib?
It's pretty flexible, you can still write shaders but it has a bunch of built in functionality (including text rendering)
2:30 this is really hard to follow with just one screen.
You just need the DLLs in your main project directory, libraries (.lib) wherever you want (will specify in the build script), and header files also wherever you want (usually some include directory, I use C:\Work\include now)
Vim user
Zoom in more next time. I have a smaller monitor and can't see anything in this video
I’m watching on a phone 🤷♂️
I'm watching on a 📱
Say please
You might need glasses then.
Phone users be like
Wow, that fast forward bit was lame..no thanks
2:30 thats why I absolute 100% dislike C etc. It is just a langage spec and has no standard tooling = no packagemanager = no dependency management. Not even standard compiler and unit testing etc. That's the 1980 way still done in 2022. I can anybody new to coding only recommend to go directly to like any other compiling language with better tooling like Golang, C# (dotnet core or what ever they call it now), or Rust.
C/C++ produces legacy code out of the box if you are not a kernel or driver developer or coding for MCUs. May no problem with deploy and forget software like games where you never will update any dependencies or need CD, in short you don't care about maintanance, but for any other group of coders this tech is obsolete. And if you do all this because you love C/c++ for what ever reason, just give at least some tooling like Conan a chance and don't copy dependencies all over the system and check them into your VCS. Especially never ever binaries. oO
My career is in web development and the last thing I want is for game programming to end up anything like that. Having a package manager only makes things easier in some cases. I and my colleagues have spent many hours fixing dependency, build, tooling issues in that space. Adding more complexity doesn't automatically make things easier for the programmer.
Your first complaint about there being no dependency management is counteracted by your second paragraph in which you state that games "... never will update any dependencies or need CD".
This is, in fact, a game programming project in which we won't be updating the dependencies.
As for checking binaries into VCS, I'd say that really depends on your situation. In my case I'm working alone and I find it easier to just have the dlls in the project. If there's a security concern when working at a company with a team, that's a different matter.
I haven't tried Conan, I may give it a review at some point, thanks for the tip!
So the entire industry is dumb and you're the intelligent.
hey i need some help, at the last step after coppying the code int the while(!should_quit) loop i get the error: "unresolved external symbol SDL_POllEvent referenced in function main
mygame.exe : fatal error LNK1120: 1 unresolved externals" even though i have included SDL.h. anyone still active here and able to help me out i would hate to get stuck on the first episode (again TT)